Skip to content

Add an option to use Opentelemetry tracing, support zipkin + otlp #19505

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wiikip
Copy link
Contributor

@wiikip wiikip commented May 9, 2025

#10545
This PR allows using Opentelemetry to export traces thanks to [opentracing-bridge]
(https://pkg.go.dev/go.opentelemetry.io/otel/bridge/opentracing).
I initially wanted to remove all the opentracing things but it is not that easy if we want all the plugins built with the older version of the Go sdk to still have working tracing.
So in the end I used the bridge and introduced an environment variable to use Opentelemetry tracing, with either zipkin to stay compatible with the old tracing, and otlp that is very convenient to send traces to any backend.

When using OPENTELEMETRY_INSTRUMENTATION env var it will fully work only if the plugins are built with the latest version of the SDK, if that variable is not set nothing changed.

Note: For Zipkin exporter with Opentelemetry we need to use the v2 trace endpoint, otherwise it works, but traces have an empty service name

Validated the behavior with Jaeger UI, the traces emitted by Opentelemetry instrumentation are similar to the ones emitted by Opentracing. I also tried the OTLP exporter and was able to export my trace to an Otel collector

Copy link

github-actions bot commented May 9, 2025

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@wiikip wiikip marked this pull request as ready for review May 9, 2025 23:16
@wiikip wiikip requested a review from a team as a code owner May 9, 2025 23:16
@wiikip wiikip marked this pull request as draft May 9, 2025 23:20
@wiikip wiikip marked this pull request as ready for review May 10, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy