-
Notifications
You must be signed in to change notification settings - Fork 116
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
[Feature] Transaction sample min duration #361
Comments
@NikitaGl thanks for opening the issue! Agents are not in a good position to make a sampling decision based on the transaction duration, as the sampling they perform is "head based" -- the decision is made as soon as the trace begins, to ensure the decision can be propagated and is coherent throughout the trace. The problem you describe (but not the exact solution you describe) will be addressed by elastic/apm-server#4185. |
@axw thanks for quick response! Issue you addressed is exactly what we are looking for. But like we see on screenshot above, apm-server could potentially have no "interesting" samples to filter if sampling rate on agent is set to less than 100%. And then we are balancing between potential performance overhead or your tracing being less effective :) Anyway, I've subscribed to future updates for tail-based sampling, so I guess, this issue could be closed? |
Yes, you're right that it's still not guaranteed. Our current approach to tail-based sampling is to prefer keeping slow transactions; the sampling probability will be weighted based on the transaction duration, rather than being uniform. Once the implementation is available for testing, your feedback will be greatly appreciated :)
Agreed, will close. Thanks again! |
Is your feature request related to a problem? Please describe.

Configuring sample rate in APM agents is a great feature to decrease unwanted performance overhead on application and APM server itself, but on the other hand we faced with the problem when almost every of our "anomaly" traces are not covered up with transaction samples:
Describe the solution you'd like
APM agents already have a parameter to configure minimus duration for including a stacktrace for span (
ELASTIC_APM_SPAN_FRAMES_MIN_DURATION
). How about same for transaction samples? (e.g.ELASTIC_APM_TRANSACTION_SAMPLE_MIN_DURATION
)The text was updated successfully, but these errors were encountered: