opentelemetry-java-instrumentation icon indicating copy to clipboard operation
opentelemetry-java-instrumentation copied to clipboard

Add support for Failsafe

Open neilfordyce opened this issue 11 months ago • 1 comments

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

neilfordyce avatar Mar 14 '24 10:03 neilfordyce

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

trask avatar Mar 14 '24 15:03 trask