-
Notifications
You must be signed in to change notification settings - Fork 858
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
Add Jaeger remote sampler #1089
Add Jaeger remote sampler #1089
Conversation
private static final Logger logger = Logger.getLogger(JaegerRemoteSampler.class.getName()); | ||
|
||
private static final int DEFAULT_POLLING_INTERVAL_MS = 60000; | ||
private static final Sampler INITIAL_SAMPLER = Samplers.probability(0.001); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial sampler is used before the configuration is obtained from the server.
I am not sure whether we should use this default from Jaeger clients or use default sampling probability from OTEL.
cc) @yurishkuro Also as I mention on the email thread, this PR does not include |
exporters/jaeger/src/main/java/io/opentelemetry/exporters/jaeger/JaegerRemoteSampler.java
Outdated
Show resolved
Hide resolved
exporters/jaeger/src/main/java/io/opentelemetry/exporters/jaeger/JaegerRemoteSampler.java
Outdated
Show resolved
Hide resolved
exporters/jaeger/src/main/java/io/opentelemetry/exporters/jaeger/RateLimiter.java
Outdated
Show resolved
Hide resolved
exporters/jaeger/src/main/java/io/opentelemetry/exporters/jaeger/RateLimitingSampler.java
Outdated
Show resolved
Hide resolved
High-level question - why does this need to be |
@yurishkuro great point. I think we should start considering defining a config protocol for OTLP. We have a starting point in the definition of the TraceConfig. We need to define a gRPC service/method. |
@yurishkuro my initial point was if a current user of Jaeger library wants to move to OpenTelemetry we need to support the current Jaeger way to configure sampling, was not thinking to add a new protocol. |
It may sound like a good idea, but what it means in practice is that
I think this is unnecessary complicated way, which also puts the burden on OTel SDK to support Jaeger sampling formats natively. I would rather:
The second upgrade path is simpler for the end user, and does not require technical debt in OTel SDK. |
So what do we do with this PR, shall I close it? I can start the proposal/design in OTLP. I do agree with @yurishkuro posts. We have discussed this feature on the OTEL java call. The consensus for implementing this was to have something ready for early adopters that are using Jaeger, and also showcase that a "vendor" specific functionality can be added to the OTEL SDK. |
@bogdandrutu @carlosalberto @yurishkuro can you please comment on my last comment? |
If we're adding this as "vendor specific" extension, can it be in contrib somewhere? |
@yurishkuro it can be moved to a separate artifact in https://github.com/open-telemetry/opentelemetry-java/tree/master/contrib. I just need to know if I should close this or continue. |
If we want this, I think moving it to a contrib module is the right way to go, until we have hashed out the details of the OTLP config option. |
266cd76
to
e119812
Compare
I have moved the remote sampler to a separate |
...ler/src/main/java/io/opentelemetry/sdk/contrib/trace/jaeger/sampler/JaegerRemoteSampler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
909f16d
to
0ad014b
Compare
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't speak to the correctness, as I'm not a Jaeger expert, but this looks fine from a code quality perspective.
Not a Jaeger expert neither, but this looks great to me. Maybe @yurishkuro can provide a final review? Else, we definitely should merge and start letting users play with this one ;) |
Can somebody merge if it is good to go? |
* Add Jaeger remote sampler Signed-off-by: Pavol Loffay <[email protected]> * Add tests Signed-off-by: Pavol Loffay <[email protected]> * Add remote sampler to all BOM Signed-off-by: Pavol Loffay <[email protected]> * Make docker test optional Signed-off-by: Pavol Loffay <[email protected]> * Use scheduled thread pool * Use daemon thread factory Signed-off-by: Pavol Loffay <[email protected]> * Cosmetic changes Signed-off-by: Pavol Loffay <[email protected]> * Add readme Signed-off-by: Pavol Loffay <[email protected]>
Resolves #796
This PR adds Jaeger remote sampler. The sampling configuration is retrieved via gRPC (as opposed to thrift in Jaeger clients).
Othe notable changes:
io.opentelemetry.exporters.jaeger.proto.api_v2
), this differs from the package defined in Jaeger proto (io.jaegertracing.api_v2
)Signed-off-by: Pavol Loffay [email protected]