Comments (6)
Only attributes set at the start of the span are available for sampling, so attributes such as http.response.status_code or request duration won't work for sampling.
Alternatively, you could try to use DCR. A tutorial: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-workspace-transformations-portal
from applicationinsights-java.
@zwilling79 you can use OpenTelemetry Extension to filter telemetry based on http.reponse.status_code.
Here is an example how to filter out telemetry based on duration . You can do something similar.
from applicationinsights-java.
Hm, this may work. Nonetheless, I would prefer to have this part of the configuration file so that it can be easily adjusted, especially if it is specific to certain environments. For instance, today I just want to filter out the health checks and the prometheus endpoint requests which have a response code of 200. Tomorrow I want to filter out some additional business application endpoints that have a response code of 200. To compile/package/distribute the otel extension JAR for such changes looks a bit overkill. Furthermore, if you want to use different configurations for different environments, you have to maintain different otel extension JARs or add more complexity to read/evaluate further configuration files.
I think, the problem in the code is that the values of the sampling override attributes are always treated as strings but the actual attribute is of type integer. So it is perhaps similar to #3378.
from applicationinsights-java.
Only attributes set at the start of the span are available for sampling, so attributes such as http.response.status_code or request duration won't work for sampling.
It is very confusing which attributes are available for sampling since 3.5.0. The docs point you to the "exporting span" line but that line is basically useless as it includes the http.status_code and is not printing for example url.full which i am able to use even though it is not included in the "exporting span" line. While the next line warns you that only attributes at the start of the span are available for sampling it would be great to know which attributes are available when i set my loglevel to debug.
from applicationinsights-java.
Have done exactly the same. Enabled the debug logging to see on which fields I can filter on. And because I saw http.response.status_code=200
in the attributes list, I thought I could filter on this.
from applicationinsights-java.
we are thinking to add a warning during startup if there are sampling override attributes used which are known not to be available at span start such as http.response.status_code
from applicationinsights-java.
Related Issues (20)
- Application Insights runtime attach agent metric-filtering not working HOT 10
- Is there a way to sample overrides Servicebus requests? HOT 18
- Workflow failed: OWASP dependency check (daily) (#532) HOT 1
- Workflow failed: OWASP dependency check (daily) (#542)
- Workflow failed: OWASP dependency check (daily) (#547)
- Sampling based on dependency result HOT 2
- OpenTelemetry support for MQTT pub/sub with Application Insights Java agent HOT 1
- Ignore newline and carriage return in the connection string file
- Sampling override based on request processing time? HOT 7
- Support for OTEL Synchronous Gauge HOT 3
- ignore InProc sampling dependencies
- MySql dependency tree not available with applicationinsights-agent-3.5.1 HOT 4
- Question: How to turn off instrumentation of just Azure Service Bus
- Workflow failed: OWASP dependency check (daily) (#585)
- Custom Availability telemetry not working HOT 2
- Azure ServiceBus dependency tree not available with applicationinsights-agent-3.5.2 HOT 2
- Can't load log handler "com.microsoft.applicationinsights.TelemetryClient" - AI 3.5.2 in Java HOT 2
- SFTP dependency tree not available with applicationinsights-agent-3.5.2 HOT 3
- APPLICATIONINSIGHTS_CONNECTION_STRING does not work in 3.5.x, works in 3.4.x HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-java.