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
As a user, I would like to hold references to just Id's. Currently I have to keep a reference to the registry, in the cases where my Id's are dynamic based on the data, e.g
In my constructor, I would do establish a base Id and have to keep a registry around:
Idid = null;
try {
ResponseAnalysisresponseAnalysis = analyzeResponseRaw(requestState);
id = RESPONSE_ANALYZE_ID
.withTag("success", "true")
.withTag("action", responseAnalysis.getAction().name())
.withTag("reason", responseAnalysis.getReason().name());
} catch(Exceptione) {
id = RESPONSE_ANALYZE_ID
.withTag("success", "false")
.withTag("exception", e.getClass().getSimpleName());
} finally {
if (id != null) {
registry.counter(id).increment();
}
}
There isn't currently a way to establish a counter based on the dynamic Id, without keeping a reference to the registry around. Since the original RESPONSE_ANALYZE_ID Id in this example came from a registry, it doesn't seem far fetched that it could have a reference to the registry, that would allow some call like id.counter().increment().
I get that it's a big ask to be adding memory references to lightweight objects. I guess my big goal to be able to reduce some of the code in the example, since we follow this pattern a lot and it is more verbose than we would hope and more than the legacy Servo wrapper we have used in the past.
The text was updated successfully, but these errors were encountered:
As a user, I would like to hold references to just Id's. Currently I have to keep a reference to the registry, in the cases where my Id's are dynamic based on the data, e.g
In my constructor, I would do establish a base Id and have to keep a registry around:
Then in the main code path:
There isn't currently a way to establish a counter based on the dynamic Id, without keeping a reference to the registry around. Since the original RESPONSE_ANALYZE_ID Id in this example came from a registry, it doesn't seem far fetched that it could have a reference to the registry, that would allow some call like
id.counter().increment()
.I get that it's a big ask to be adding memory references to lightweight objects. I guess my big goal to be able to reduce some of the code in the example, since we follow this pattern a lot and it is more verbose than we would hope and more than the legacy Servo wrapper we have used in the past.
The text was updated successfully, but these errors were encountered: