You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using reusable fault tolerance, I would like the description of the FaultTolerance instance to be automatically bsed on the method name. Consider:
@ApplicationScoped
public class PreconfiguredFaultTolerance {
@Produces
@Identifier("my-fault-tolerance")
public static final FaultTolerance<String> FT = FaultTolerance.<String>create()
.withRetry().maxRetries(2).done()
.withFallback().handler(() -> "fallback").done()
.build();
}
and
@ApplicationScoped
@ApplyFaultTolerance("my-fault-tolerance")
public class MyService {
public String doSomething() {
...
}
public String doSomethingElse() {
...
}
}
The generated metrics for my-fault-tolerance will be an UUID as per the documentation. I could add withDescription("my-fault-tolerance") to my-fault-tolerance, but then I will not be able to distinguish between the doSomething and doSomethingElse methods.
If instead I used the regular annotations, the method attribute of the metrics is set to the names of the methods as expected.
The text was updated successfully, but these errors were encountered:
That sounds natural, but it goes directly against the current design. A single FaultTolerance object has a single MeteredOperation and single MetricsRecorder, which means there's a single "method name" (the FT description). It doesn't even know it's used via @ApplyFaultTolerance.
We might be able to do something on the @ApplyFaultTolerance level to override the "method name", need to check.
When using reusable fault tolerance, I would like the description of the
FaultTolerance
instance to be automatically bsed on the method name. Consider:and
The generated metrics for
my-fault-tolerance
will be an UUID as per the documentation. I could addwithDescription("my-fault-tolerance")
tomy-fault-tolerance
, but then I will not be able to distinguish between thedoSomething
anddoSomethingElse
methods.If instead I used the regular annotations, the method attribute of the metrics is set to the names of the methods as expected.
The text was updated successfully, but these errors were encountered: