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

Go: Getting started should set the global propagator #3404

Closed
pellared opened this issue Oct 17, 2023 · 5 comments · Fixed by #3408
Closed

Go: Getting started should set the global propagator #3404

pellared opened this issue Oct 17, 2023 · 5 comments · Fixed by #3408
Assignees
Labels
enhancement New feature or request sig:go

Comments

@pellared
Copy link
Member

pellared commented Oct 17, 2023

What needs to be changed?

The getting started examples should enable propagation. While it is not needed for the sake of the dice example, I got direct feedback from people adopting OpenTelemetry Go that they spent a lot of time finding out that they have to set the propagator explicitly.

Reference: https://opentelemetry.io/docs/instrumentation/go/getting-started/#initialize-the-opentelemetry-sdk

@open-telemetry/docs-maintainers It would be worth to check if the same problem does not exist for in getting started for other languages.

@pellared pellared added bug Something isn't working sig:go enhancement New feature or request and removed bug Something isn't working labels Oct 17, 2023
@pellared pellared changed the title Go: Getting started should set the propagator Go: Getting started should set the global propagator Oct 17, 2023
@pellared pellared self-assigned this Oct 17, 2023
@cartermp
Copy link
Contributor

AFAIK this is mostly a Go problem, but I haven't gone and audited all 11 languages, heh.

@svrnm
Copy link
Member

svrnm commented Oct 18, 2023

It might be an issue for Rust, C++ as well? Not sure.

As an additional note: Propagation and by that correlation of traces across services is a key feature of tracing vs just writing logs, so we should indeed have more specific content around it. For some languages it is hidden in the Manual Instrumentation chapter. JS has a "Context" and "Propagation" page, but both are already very advanced. My thinking was to have a "Context Propagation" page per language that starts with expanding on the "Getting Started" example:

  1. Add a new (preinstrumented) service in your particular language that's called "game-service" or something
  2. That game-service is just calling the dice-service twice and then looking who is the winner
  3. Look at the combined spans (in console or jaeger?)
  4. Add a link to that in the "What's Next" of the Getting Started
  5. Put everything else about context & propagation below that

(See https://github.com/pavolloffay/kubecon-eu-2023-opentelemetry-kubernetes-tutorial/blob/main/03-app-instrumentation.md for an example)

wdyt?

@pellared
Copy link
Member Author

pellared commented Oct 18, 2023

I propose to just ensure that the propagator is set for sake of having a simple getting started.

The alternative could be to extend the example with simple CLI app which calls the rolldice service using an instrumented HTTP Client instead of using the browser.

This is e.g. how I demonstrated OTel Go (https://github.com/pellared/gopherconpl-opentelemetry-go) on https://gophercon.pl/

@svrnm
Copy link
Member

svrnm commented Oct 18, 2023

I propose to just ensure that the propagator is set for sake of having a simple getting started.

I agree with that, so having that set properly in the getting started is set for me (and we need eventually to validate other languages as well where we are unsure if this needs to be done)

The alternative could be to extend the example with simple CLI app which calls the rolldice service using an instrumented HTTP Client instead of using the browser.

That would work as well of course!

@pellared
Copy link
Member Author

For now I just propose open-telemetry/opentelemetry-go#4644

In future, I can also try adding a CLI app which calls the rolldice service using an instrumented HTTP Client instead of using the browser. However, I suggest tracking it as a separate issue as probably this should be something language agnostic as #2623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sig:go
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants