opentracing-contrib / java-jdbc

OpenTracing Instrumentation for JDBC
Apache License 2.0
82 stars 56 forks source link

New option to exclude spans faster than a latency threshold #109

Closed naveedyahyazadeh closed 3 years ago

naveedyahyazadeh commented 3 years ago

Similar to slowQueryThresholdMs, another beneficial optional setting would be a flag to omit spans that are faster than some latency threshold (i.e: excludeSpansBelowQueryThreshold=100ms). This can be implemented identically to the existing flag, but will reduce the number of spans produced by the Driver.

This change will have significant performance benefits on systems that produce high numbers of JDBC spans. It will also keep spans whose latencies are small (fast requests) enough to be considered non-negligible.

I think I have a solution in mind, and if you all are ok, I can spin up a PR!

malafeev commented 3 years ago

@naveedyahyazadeh PR is welcome

naveedyahyazadeh commented 3 years ago

Done, see PR #112 @malafeev

naveedyahyazadeh commented 3 years ago

Thank you for merging. Might I also bother you to release a new minor version release?

malafeev commented 3 years ago

@naveedyahyazadeh 0.2.14 is released

naveedyahyazadeh commented 3 years ago

Thank you for the swift responses and action!