-
Notifications
You must be signed in to change notification settings - Fork 872
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
Collection of HTTP request metrics shouldn't be on by default #4930
Comments
Hi @twz123. A couple of clarifying questions:
Thanks! |
Hi @twz123 - to clarify, the SDK is not quite an uncontrolled explosion, we currently cap the exported metrics to 2000. There are two problems with this though
I don't think cardinality limits in the SDK are actually a solution to cardinality issues for users as even if it protects the app it can kill the metrics backend itself easily still. For 1.10 we should go ahead and remove HTTP_TARGET from all metrics and live with it being gone until providing view configuration to javaagent users. Line 98 in 0c58129
|
Also if you are using the collector, you can add metrics transformation there If you're not using the collector, you may consider it - metrics SDKs are still quite alpha and it will still take time to work out specifications, for example how to allow users to configure attribute collection via non-programmatic means. The collector in the meantime provides essential functionality for using OTel metrics somewhat more stably for production environments. |
Answering @breedx-splk questions:
Just added the otel java agent to the JVM startup parameters. The application itself doesn't have any otel libs in the class path.
I guess you mean HTTP server? In this case it's Tomcat. Incoming HTTP requests were from the internet. Mostly web browsers. @anuraaga Thanks for the clarification about the metrics cap and the status about the metrics SDK. We disabled otel metrics for the time being. |
@twz123 Ok thanks, so it's auto-instrumentation with tomcat server instrumentation. |
I created an issue #5047 to decide on removing http.target before the 1.10.0 release. |
The |
Describe the bug
After upgrading from 1.3 to 1.9 of the otel java instrumentation, the metric cardinality exploded for us, bringing down our whole metrics ingestion pipeline. Reason for this was excessive HTTP metrics for each and every path that the application ever encountered, including buckets and everything.
Steps to reproduce
Start a server that accepts arbitrary HTTP requests, fire up a client that issues HTTP requests to arbitrary paths, and see what happens to the number of metrics being collected.
What did you expect to see?
No uncontrolled explosion of metrics.
What did you see instead?
Metric explosion.
What version are you using?
1.9.1
Additional context
This might even be a way to DDoS a service. The metrics being produced rely on user input, which is probably kind of a problem.
The text was updated successfully, but these errors were encountered: