opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Add support for Failsafe
Is your feature request related to a problem? Please describe.
Failsafe is a popular library for handling request failures. We gather metrics from it to understand how well it's handling failures and how close it is to reaching thresholds. Is that the kind of library that would make sense to instrument via a new InstrumentationModule in this repository?
Describe the solution you'd like
I'd like to replace some existing metrics from my services which are generated using Codahale. I'm particularly interested in gathering Circuit Breaker and Retry metrics.
Possible instrument names:
failsafe.circuitbreaker.delay.time
failsafe.circuitbreaker.execution.count
failsafe.circuitbreaker.success.count
failsafe.circuitbreaker.failure.count
failsafe.retry.attempted.count
failsafe.retry.failed.count
failsafe.retry.succeeded.count
Describe alternatives you've considered
Instrumenting manually in each time we use Failsafe, but there's obvious duplication of effort to configure in every service Failsafe is used.
Additional context
No response
hi @neilfordyce! sounds reasonable, you could check out the existing hystrix instrumentation in case there's any common semantic conventions we can/should share
ideally we recommend starting with standalone library instrumentation first, and then adding javaagent instrumentation (if desired) which reuses/injects the library instrumentation
check out https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/writing-instrumentation.md
another option is to contribute instrumentation directly to the failsafe project