-
Notifications
You must be signed in to change notification settings - Fork 199
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
Sampling override based on request processing time? #3637
Comments
Currently using v3.5.1 |
@kemuri-9 sorry for the late response. |
Looking at the referred example, it looks like the core functionality being referred to is within https://github.com/Azure-Samples/ApplicationInsights-Java-Samples/tree/main/opentelemetry-api/java-agent/extensions/FilterSpanBasedOnDuration |
@kemuri-9 please take a closer look at the sample, it doesn't require a json configuration. sampling overrides apply at the beginning of the span. span duration is captured at the end of a span. Extensions give you more control to make decision what to export. You can filter based on any attributes or anything else that can be used uniquely identifying a span. |
Sorry, had a bit of a mistyping in my last comment about the intent, I've edited it to add the missing "not". |
Yes |
Then there is a methodology to achieve the desired behavior, so resolved. |
Is your feature request related to a problem? Please describe.
On a particular project I've found that most of the ingestion into application insights is from dependency metrics collected.
For us this includes JDBC, HTTP client, and Redis.
For quickly responding requests these dependency metrics aren't actually that desired, as performance evaluation of the request will not be evaluated.
I've been trying to go through the configuration to see how there could be an override to change the sampling rate for dependencies when the request is "quick" (as a concrete example, let's say <5 seconds is "quick").
But so far I've not been able to see anything like this. I have not yet found any span that was the processing time of the request to do this override.
Describe the solution you would like
Is this currently possible somehow? It would be great for us to be able to not sample dependencies for quick requests to reduce our ingestion into insights (and reduce our running cost).
Describe alternatives you have considered
Not interested in turning off all dependency sampling as this is necessary to investigate why slow requests are slow.
Additional context
The text was updated successfully, but these errors were encountered: