micrometer
micrometer copied to clipboard
Allow injecting a function into TimedAspect to create tags based on method result
Please describe the feature request.
Update TimedAspect
to allow injecting a Function
to create tags based on method result, similar to the Function
injected to create tags based on ProceedingJoinPoint
.
Rationale
I am using the Timed
annotation and would like to include information from the Object
returned by the target method in the tags.
Additional context I'm willing to submit a PR for this enhancement.
Hi, any news on this? I think that would be really interesting, not just for TimedAspect
but for CountedAspect
as well. I'm also willing to participate in the implementation.
We already have it since 1.7.0? https://github.com/micrometer-metrics/micrometer/blob/v1.12.1/micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java#L156 Or am I missing sth?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open.
This seems to suggest adding a function that provides tags from the return value of ProceedingJoinPoint.proceed()
while Micrometer currently supports a function that provides tags from ProceedingJoinPoint
.