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

sdk/trace: add Jaeger remote sampler #2150

Closed
wants to merge 2 commits into from

Conversation

kvrhdn
Copy link
Contributor

@kvrhdn kvrhdn commented Aug 1, 2021

This adds the Jaeger remote sampler.

Closes #2148

Usage:

tp := tracesdk.NewTracerProvider(
	tracesdk.WithSampler(
		tracesdk.JaegerRemoteSampler("myService", "http://localhost:5778"),
	),
	// ...
)
otel.SetTracerProvider(tp)

Comment on lines +10 to +11
// TODO switch to https://github.com/jaegertracing/jaeger-idl
github.com/jaegertracing/jaeger v1.24.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of importing jaegertracing/jaeger we should import jaegertracing/jaeger-idl. This is currently blowing up go.sum.
In fact, we only need proto/api_v2/sampling.proto.

I'm not sure how to do this though, help/feedback is welcome!

We should add it as git submodule:

[submodule "jaeger-idl"]
	path = sdk/trace/internal/jaeger-idl
	url = https://github.com/jaegertracing/jaeger-idl

But I'm not sure how to generate and import the proto as part of the build process.

  • Do I add a target in Makefile?
  • Should I check in the generated code or should people generate it themselves first?

fyi, the jaegertracing/protobuf image doesn't work on my machine (Apple M1). So that's also making testing more difficult... 😬

Copy link
Member

Choose a reason for hiding this comment

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

This would need to live in a separate module to ensure that the increased dependency footprint only impacts applications that choose explicitly to include this sampler. Indeed, it might be best for this to live in the contrib repo as it is not required to conform to the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, sounds good 👍 There aren't any other samplers yet in contrib, should I create a new folder, i.e. samplers/jaeger_remote?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, sounds good There aren't any other samplers yet in contrib, should I create a new folder, i.e. samplers/jaeger_remote?

Yeah, please create a new sampler directory. We can discuss in the contrib PR, but I would prefer samplers/jaeger.

@kvrhdn
Copy link
Contributor Author

kvrhdn commented Aug 4, 2021

Closing in favour of open-telemetry/opentelemetry-go-contrib#936

@kvrhdn kvrhdn closed this Aug 4, 2021
@kvrhdn kvrhdn deleted the sampler-jaeger-remote branch August 4, 2021 18:20
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.

New sampler: Jaeger remote
3 participants