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

http plug-in problem #120

Closed
congim opened this issue Sep 12, 2019 · 5 comments
Closed

http plug-in problem #120

congim opened this issue Sep 12, 2019 · 5 comments

Comments

@congim
Copy link
Member

congim commented Sep 12, 2019

I tried to run the http instance code,and use wireshark to capture network messages,why didn't i find traceID spanID in the http message?

@congim
Copy link
Member Author

congim commented Sep 12, 2019

network msg:

GET /hello HTTP/1.1
Host: localhost:7777
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

HTTP/1.1 200 OK
Date: Thu, 12 Sep 2019 02:17:58 GMT
Content-Length: 14
Content-Type: text/plain; charset=utf-8

Hello, world!

@congim
Copy link
Member Author

congim commented Sep 12, 2019

I traced the code and found a NoopTracer~ ~,

// Inject does nothing.
func (NoopTracer) Inject(ctx context.Context, span Span, injector Injector) {
}

@congim congim closed this as completed Sep 12, 2019
@congim
Copy link
Member Author

congim commented Sep 12, 2019

Do I need to implement this tracer myself?

@congim congim reopened this Sep 12, 2019
@iredelmeier
Copy link
Member

@congim rather than implementing the tracer yourself, you can use the SDK via [Register](https://godoc.org/go.opentelemetry.io/sdk/trace#Register with an exporter registered via RegisterExporter. Currently, the only out-of-the-box exporter is the Jaeger exporter.

Here's a complete example. Hope that helps!

@congim
Copy link
Member Author

congim commented Sep 29, 2019

@iredelmeier nice, thank you!

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

No branches or pull requests

2 participants