-
Notifications
You must be signed in to change notification settings - Fork 122
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
Question: Can I configure a sampling rate? #8
Comments
Sampling is usually done as a feature of the tracing libraries. I'm ok adding it to zipkin-cpp-opentracing and exposing it as an option. I believe the Jaeger implementation already has an option for this, though I don't know if it's quite ready for use yet. |
@rnburn thank you for the answer. Jaeger is the tracer I'm using and I'm asking because I don't know any way how to configure this in Jaeger agent. This option is available in all Jaeger client libraries and I was expecting it to be here too. It would be great to have such option. |
Adding @isaachier, @yurishkuro to see if they can answer. I think the library is still under development so it may not have all the options yet. |
Yes there is a way and I have a fork of this project in development now. Builds on docker but haven't tested it yet. |
while Jaeger clients provide a way to configure sampling priority, the default mode we recommend is letting the clients pull the sampling strategy from Jaeger backend (cf. jaegertracing/jaeger#365). |
This sounds great and should be much easier to work with, however this is something from the future. We still need a way to set sampling rate for current usage.
Thank you, this is not exactly what was my question about :) |
@kop I just put in some fixes to make the Jaeger module work. I did some testing and I believe writing something like this in your nginx.conf will give you what you want:
But note that there's a bug in Jaeger if you try to use a sample param of 100% (jaegertracing/jaeger-client-cpp#6). @isaachier -- Could you document the different options available for jaeger_sampler_type? I had to grep through Jaeger's code to find this. |
Sure thing. Not sure when but soon enough. |
Closing. If you also want sampling for zipkin, please put in an issue to https://github.com/rnburn/zipkin-cpp-opentracing. |
Hi,
Thank you for this module, looks really great.
However, I'm a little bit scary to enable this on production nginx. I was not able to find any control on amount tracing spans to create. Do I understand correctly that it will create a span for every request?
For high production traffic, it would be great to have an option to trace only, let's say, 0.5% or 1% of the requests.
The text was updated successfully, but these errors were encountered: