-
Notifications
You must be signed in to change notification settings - Fork 494
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
Fix otelhttptrace example to avoid duplicating the generated data #5564
base: main
Are you sure you want to change the base?
Fix otelhttptrace example to avoid duplicating the generated data #5564
Conversation
36f5302
to
d734223
Compare
i recommend you reserve the first way. first way:
second way:
the first way's jaeger ui is easier for user to understand. and is much easier for user to use(it could just replace global http.Transport) |
You're right, thank you. |
69ece88
to
99488d8
Compare
instrumentation/net/http/httptrace/otelhttptrace/example/client/client.go
Outdated
Show resolved
Hide resolved
…t/client.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
07ad70c
to
000e6ff
Compare
Closes #5562
This example shows both ways to setup otelhttptrace, but WithClientTrace appends tracers, it does not replace them. So someone running the example gets duplicated data, which is confusing.
I have chosen to remove the example from the client, as that's our own option. Passing it to the context is "the httptrace way".