-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Bug]: Sampling strategies not working as expected #3925
Comments
How are you verifying that? |
Hi @yurishkuro , |
Jaeger backend does not perform sampling, sampling happens in the SDK. Which SDK are you using? Which sampler is the SDK configured to use? |
Hi @yurishkuro , In the collector we are configuring file sampling as decribed in the below link :https://www.jaegertracing.io/docs/1.36/sampling/#file-sampling |
Hi @yurishkuro, |
|
Hi @yurishkuro , jaegerRemoteSampler := jaegerremote.New( After configuring the SDK using the above configuration,samplingstrategies.json file configuration is successfully fetched. |
What is printed when you do spewCfg.Dump(jaegerRemoteSampler)? |
Hi @yurishkuro, |
What tags do you get in the root span? The original Jaeger samplers would record the sampling method in the tags, not sure if OTEL SDK does that. The output of the sampler state shows default probability of 0.7 |
Hi @yurishkuro , |
We have an open ticket for it, but nobody stepped up to implement it. #1420 |
My bad, it's been already implemented: #1971 |
Hi @yurishkuro , |
Sorry, I don't follow what you mean by "implementation changed", the collector is using the same shared http handler for sampling jaeger/cmd/collector/app/server/http.go Line 28 in 3029a0f
The discussion on JAEGER_SAMPLING_ENDPOINT is irrelevant because it applied to Jaeger SDKs (now deprecated), but you're using OTEL SDK. |
Hi @yurishkuro , Also, Does the sampling works for all the interfaces(ZIPKIN and HTTP, GRPC, OTLP) of collector? |
Sorry, I don't follow your question. The code you showed is already for OTEL SDK |
Hi @yurishkuro , |
Sampling via SDK and collector are not interchangeable |
Hi @yurishkuro, From Jaeger collector side,we have sampling_strategies.json file with similar configuration available in https://www.jaegertracing.io/docs/1.36/sampling/#file-sampling After making above changes, We are generating spans. |
How did you confirm that?
How did you verify that? |
Hi @yurishkuro , How did you verify that? |
The samplers are supposed to record the description & parameters of the sampler in the attributes of the root span. What do they say? |
Hi @yurishkuro, |
Hi @yurishkuro , |
Well, it is possible that OTEL SDK that you're using does not record the type of sampler in the attributes, although they should, precisely for this reason, it allows debugging issues like this. The old Jaeger SDKs always recorded the sampler type/param on the root span so that you would know the kind of sampling that was used. I recommend raising an issue in the corresponding OTEL SDK repository, there is not much we can investigate from Jaeger side. |
Hi @yurishkuro , |
Hi @yurishkuro, |
Hi @yurishkuro , Using opentracing if sampling.Type is selected as "remote", can we see same in Jaeger UI tags section, like "const" we are seeing in above commented screenshot? |
I did not see any concrete issue with Jaeger in this ticket, more like OTEL implementation / configuration, so closing |
What happened?
Configured the Sampling strategies as per the Jaeger documentation: https://www.jaegertracing.io/docs/1.34/sampling/
Sampling strategy does not seem to affect even after configuring the strategy using .json file. I can also see in the collector logs that the input json file is read but the output is not obtained as expected.
Following is the configuration .json file used by us by default:
{
"service_strategies": [],
"default_strategy": {
"type": "probabilistic",
"param": 0.1
}
}
Even after providing the sampling configuration as above keeping the type as probabilistic and parameter as 0.1.
When 100 spans are generated all of those spans are seen on UI and no filtration of spans is done.
Tested with the parameter as 0, even then I could see all the spans are stored and seen on UI.
Steps to reproduce
Expected behavior
Sampling has to be performed as per the input configuration file.
Relevant log output
Log that Samplingstrategies file is being read:
{"level":"info","ts":1663994011.7913685,"caller":"static/strategy_store.go:138","msg":"Loading sampling strategies","filename":"/etc/sampling/samplingstrategies.json"}
Jaeger backend version
v1.34.0
Storage backend
Issue is seen with both Cassandra and Elastic search as backends.
Operating system
Ubuntu 18.04.6
The text was updated successfully, but these errors were encountered: