-
Notifications
You must be signed in to change notification settings - Fork 986
Failsafe 3.0 instrumentation introduced #14057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
settings.gradle.kts
Outdated
include("instrumentation:failsafe-3.0:library") | ||
include("instrumentation:failsafe-3.0:testing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other instrumentations are listed in alphabetical order
import java.util.Objects; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public abstract class AbstractFailsafeTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate testing module is often used to share code between library and javaagent instrumentation. Here you only have the library instrumentation, consider getting rid of the testing module. Also merging the testing code into the library module would probably resolve the latest dep test failure you have.
LongCounter failureCounter = | ||
meter | ||
.counterBuilder("failsafe.circuitbreaker.failure.count") | ||
.setDescription("Count of failed circuit breaker executions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually metric descriptions end with a .
|
||
final class CircuitBreakerEventListenerBuilders { | ||
private CircuitBreakerEventListenerBuilders() { | ||
throw new AssertionError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't add throw new AssertionError();
to private constructors
} | ||
|
||
dependencies { | ||
library("dev.failsafe:failsafe:3.0.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.0.0
doesn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, .builder(PolicyConfig)
is added in 3.0.1. This enables us to extend user configured CircuitBreaker
with the instrumentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trask is it ok to name the instrumentation 3.0.1
when the first supported version is really 3.0.1
? I think it is fine, we don't have any other instrumentations that would use patch version in the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think it's better to keep the name of the instrumentation as 3.0
to conform with others and just mention 3.0.1+ in the docs
@@ -626,7 +627,6 @@ include(":instrumentation:xxl-job:xxl-job-2.3.0:javaagent") | |||
include(":instrumentation:xxl-job:xxl-job-common:javaagent") | |||
include(":instrumentation:xxl-job:xxl-job-common:testing") | |||
include(":instrumentation:zio:zio-2.0:javaagent") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep this empty line as separator.
@@ -65,6 +65,7 @@ These are the supported libraries and frameworks: | |||
| [Elasticsearch API Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html) | 7.16 - 7.17.19,<br>8.0 - 8.9.+ [4] | N/A | [Elasticsearch Client Spans] | | |||
| [Elasticsearch REST Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html) | 5.0+ | N/A | [Database Client Spans], [Database Client Metrics] [6] | | |||
| [Elasticsearch Transport Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html) | 5.0+ | N/A | [Database Client Spans], [Database Client Metrics] [6] | | |||
| [Failsafe](https://failsafe.dev/) | 3.0.1+ | [opentelemetry-failsafe-3.0](../instrumentation/failsafe-3.0/library) | none | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trask I think this might be the first library only instrumentation we have. Do we need to point this out somehow here? Set the Auto-instrumented versions
to N/A
? Any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N/A
in the auto-instrumented versions column sounds good to me 👍
As requested in #10856, Failsafe instrumentation introduced. Intrumentation of other Failsafe policies such as
RetryPolicy
,RateLimiter
,Bulkhead
will be added with upcoming PRs.