apm-agent-php
apm-agent-php copied to clipboard
Send span only if duration geater than a threshold (ELASTIC_APM_SPAN_MIN_DURATION)
Is your feature request related to a problem? Please describe. I use agent on a website with a lot of db queries. I don't necessary need all span about that, just slower
Describe the solution you'd like Be able to have an option like ELASTIC_APM_SPAN_MIN_DURATION Perhaps be able to specify a threshold by span type (eg : ELASTIC_APM_SPAN_MIN_DURATION="mysql:5ms,http:50ms...'
Additional context I tested a solution by implemented that on endSpanEx method by setted isDropped property to true I didn't update code about options..., but if you think it's a good idea, I can do on a PR
Hey @julien-maurel
Some of the agents already implemented that option but with limited functionality (only one allowed time value) . Please take a look into Java agent documentation. https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-span-min-duration
If you could prepare a PR which is handling only one time value (without breakdown to span type).
Thank you, Pawel