MeterTag docs suggest availability of a SpelValueExpressionResolver
which is not (yet) a real API
#1
Labels
SpelValueExpressionResolver
which is not (yet) a real API
#1
The reference documentation for
@MeterTag
at https://docs.micrometer.io/micrometer/reference/concepts/timers.html#_metertag_on_method_parameters suggests that there could be aSpelValueExpressionResolver
available to users of Micrometer. However, it looks like this is currently not the case because, while this class does indeed exist, it resides in a test package for Micrometer itself: https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/test/java/io/micrometer/core/aop/SpelValueExpressionResolver.javaAs a result. it is not possible to simply copy the example code and fix up imports, because the class is not available.
Depending on your perspective either the documentation could use some clarification that this is merely a "hypothetical" example, in which case embedding the actual
SpelValueExpressionResolver
implementation somewhere might make sense as an additional convenience for users, or theSpelValueExpressionResolver
class should be published somewhere as part of the suite of Micrometer libraries/APIs.Either way, right now the documentation is a little confusing (suggestive) on this point and might get the hopes up of users that were looking for a convenient feature like a
SpelValueExpressionResolver
to use with their own@MeterTag
annotations.The text was updated successfully, but these errors were encountered: