Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry support #7621

Closed
wants to merge 17 commits into from
Closed

OpenTelemetry support #7621

wants to merge 17 commits into from

Conversation

dmathieu
Copy link
Contributor

What this PR does / why we need it:

This PR adds support for OpenTelemetry (using the official plugin), to send request traces to any otel collector.

This is still a draft, but I'm opening a PR anyway to start getting potential feedback.
The missing things are testing, as well as open-telemetry/opentelemetry-cpp-contrib#52 to avoid using my own fork.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

This has been proposed in #5883

How Has This Been Tested?

This is being tested through the E2E tests. Before moving this out of draft, I will be running it in a test cluster as well.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 10, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @dmathieu!

It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-nginx has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @dmathieu. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 10, 2021
@tao12345666333
Copy link
Member

wow! Thanks

@rikatz
Copy link
Contributor

rikatz commented Sep 10, 2021

A question, from someone that does not know how OT works properly:

If we add OT support, can we remove all the jaeger and opentracing and have just one additional library?

Thanks for the PR!

@dmathieu
Copy link
Contributor Author

Yes. Opentracing is deprecated anyway.
As for jaeger, they support OTLP today and their official position is that in the future, they will only support OTLP (the OpenTelemetry GRPC format).

@rikatz
Copy link
Contributor

rikatz commented Sep 10, 2021

Amazing news. This should simplify some things A LOT! :)

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 11, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
@duhow
Copy link

duhow commented Oct 31, 2021

While this is still pending to merge, how can I do to manually deploy this in my Kubernetes cluster?
I wanted to use OpenTracing but latest nginx-controller version gives an error, and also since it's going to be deprecated by this OpenTelemetry, I'd like to setup it.

@dmathieu
Copy link
Contributor Author

dmathieu commented Nov 2, 2021

You can't. This is still WIP. We should have the CPP plugin installed in the base image, but there are what seems to be timeouts preventing the image from being built/pushed.

@indrekj
Copy link

indrekj commented Nov 23, 2021

Is it still blocked due to the base image?

@dmathieu
Copy link
Contributor Author

dmathieu commented Dec 1, 2021

Yes. This hasn't moved forward yet.

internal/ingress/controller/nginx_test.go Outdated Show resolved Hide resolved
internal/ingress/controller/nginx_test.go Outdated Show resolved Hide resolved
@rcjsuen rcjsuen mentioned this pull request Jan 21, 2022
9 tasks
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2022
internal/ingress/annotations/opentelemetry/main.go Outdated Show resolved Hide resolved
Comment on lines 1123 to 1226
buf.WriteString("opentelemetry_config /etc/nginx/opentelemetry.toml;\r\n")

if cfg.OpenTelemetryOperationName != "" {
buf.WriteString(fmt.Sprintf("opentelemetry_operation_name \"%s\";\n", cfg.OpenTelemetryOperationName))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first line uses \r\n but the second line uses \n. Should one be changed to match the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, though the PR is still a draft and I'm trying to avoid a big bang PR. I am therefore opening several smaller ones, and this one probably shouldn't be reviewed so carefully (yet).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am therefore opening several smaller ones, and this one probably shouldn't be reviewed so carefully (yet).

That's a great idea!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 14, 2022
@linux-foundation-easycla
Copy link

CLA Missing ID CLA Not Signed

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 22, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dmathieu
Once this PR has been reviewed and has the lgtm label, please assign elvinefendi for approval by writing /assign @elvinefendi in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

@dmathieu: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2022
@bixu
Copy link

bixu commented Sep 27, 2022

@dmathieu, are you looking for help on this PR?

@longwuyuan
Copy link
Contributor

@bixu https://github.com/kubernetes/ingress-nginx/pulls/esigo

@dmathieu
Copy link
Contributor Author

I have fallen a bit behind on what was happening with this work. And it seems other folks are more up to date than me. If somebody wants to take over, I would be happy with that.

@rikatz
Copy link
Contributor

rikatz commented Jan 8, 2023

@dmathieu I'm closing this in favor of some work @esigo has been doing on OTEL, but if I'm wrong please feel free to reopen and reach me on Slack!!

Thank you for your effort on this one!
/close

@k8s-ci-robot
Copy link
Contributor

@rikatz: Closed this PR.

In response to this:

@dmathieu I'm closing this in favor of some work @esigo has been doing on OTEL, but if I'm wrong please feel free to reopen and reach me on Slack!!

Thank you for your effort on this one!
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mjallday
Copy link

mjallday commented Jan 9, 2023

@rikatz do you have a link to the work that this was closed in favor of?

@dmathieu dmathieu deleted the otel branch January 9, 2023 09:49
@bixu
Copy link

bixu commented Jan 9, 2023

@mjallday, I think you are looking for https://github.com/kubernetes/ingress-nginx/pulls/esigo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.