elastic / apm

Elastic Application Performance Monitoring - resources and general issue tracking for Elastic APM.
https://www.elastic.co/apm
Apache License 2.0
384 stars 114 forks source link

Support for excluding SQL statements from being captured #590

Open tobiasstadler opened 2 years ago

tobiasstadler commented 2 years ago

Is your feature request related to a problem? Please describe.

We hope to reduce the pressure on our APM servers by not sending these spans to them.

Describe the solution you'd like I would like to have the possibility to ignore certain SQL statements from being captured. Basic wildcard matching would be sufficient for us. I already implemented a (JDBC only) solution for the Java agent: elastic/apm-agent-java#2293.

Describe alternatives you've considered Right now we are dropping the spans when ingesting the events in Elasticsearch.

felixbarny commented 2 years ago

We don't have support for it in the Java agent yet, but do you think span compression could be an alternative to reduce the load?

tobiasstadler commented 2 years ago

Yes, because it will reduce the number of "SELECT", "PREPARE", "COMMIT" spans, but no as it it will most probably combine spans which I don't want to be combined.

I will give it a shot once it is released in the Java agent, but I still think I want to control what spans are discarded.