-
Notifications
You must be signed in to change notification settings - Fork 58
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
More "intelligent" sampler option(s) #56
Comments
Ok, I found some nice skeletons in the Jaeger extensions upstream (in the java-sdk). I built my own agent by adding my own classes to your project but I cannot get the SPI
What am I missing? public class HelloSamplerProvider implements ConfigurableSamplerProvider {
/**
* Returns a {@link Sampler} that can be registered to OpenTelemetry by providing the property
* value specified by {@link #getName()}.
*/
@Override
public Sampler createSampler(ConfigProperties config) {
return new RateLimitingSampler(1);
}
/**
* Returns the name of this sampler, which can be specified with the {@code otel.traces.sampler}
* property to enable it. The name returned should NOT be the same as any other exporter name. If
* the name does conflict with another exporter name, the resulting behavior is undefined and it
* is explicitly unspecified which exporter will actually be used.
*/
public String getName() {
return "hello";
}
}
|
I will continue trying rolling my own agent for now, as the current one doesnt work for us... Is the plan to support X-Ray sampling rules any time soon? Ping @anuraaga |
What am I missing? |
Hi @stnor For the issue of the agent, I didn't confirm myself but believe the problem is putting the code in the https://github.com/stnor/aws-otel-java-instrumentation/blob/main/otelagent/build.gradle.kts#L58 As for sampling in general, its indeed an area OTel still needs to spec out much better. Out of curiosity, can you clarify your priority of these aspects
We will want to get some issues filed in |
Ah also just noticed the repo you linked seems to be missing the |
Hi @anuraaga Thanks for the feedback, and for taking the time to look at this. I will revisit the code later today. As for my priorities; Remote sampling configuration is not important at all. The ability to change configuration in runtime isn't important for us ever. Per operation-configuration is my top prio as things stand, but I think that wouldn't be needed (I think) if the sampler would try to meet a budget with a lower and upper bound of traces per time unit per operation automatically. But I am not a statistician. AppDynamics keeps track of typical invocation response times per operation and samples (more) based on deviations, which is very useful, https://docs.appdynamics.com/display/PRO21/Diagnostic+Sessions |
Got the sampler registration to work now. Thanks. Did a reset, and created a new branch for this work in my fork. https://github.com/stnor/aws-otel-java-instrumentation/tree/nomp-sampler |
I will try this simple hack to start with. When testing my code, I realised I should be using a parent based sampler. |
Is your feature request related to a problem? Please describe.
We've just migrated from AppD (javaagent) to X-Ray using the OTEL agent, v1.1. We're currently using
traceidratio
sampling and a 1/200 ratio.This causes high frequency service calls to be over-represented in the sample set and low frequency services to be under-represented, or simply not present at all.
Describe the solution you'd like
I'd like a more sophisticated sampler that will collect data from all spans every time period, regardless of traffic.
See jaegertracing/jaeger#365 for problem description and possible inspiration.
It seems like a common and basic need for instrumentation? Is anything planned upstream?
I should also add that we're running a monolitic application, so we can't configure each service with a different sample rate, as they are running in the same JVM / javaagent. But even in a micro service architecture, this problem would exist.
We do use Spring AOP to create custom spans for the Spring
@Service
business services.I'd rather not have to roll my own OTEL java agent to address this issue... Are there any ways to address this from user-space?
The text was updated successfully, but these errors were encountered: