docs: rename SpelValueExpressionResolver to CustomValueExpressionResolver and add clarification#7605
Open
won-seoop wants to merge 1 commit into
Conversation
…lver and add clarification note micrometer-metricsGH-6465: The documentation showed `new SpelValueExpressionResolver()` as if it were a built-in Micrometer class, but it only existed as a private helper in the docs test package. Users who tried to use it got a compilation error. Changes: - Renamed SpelValueExpressionResolver -> CustomValueExpressionResolver (the class name "Spel" implied it was framework-provided) - Added a comment in the class explaining it is an example implementation - Updated imports in TimedAspectTest, CountedAspectTest, ObservationHandlerTests - Added a NOTE callout in timers.adoc and counters.adoc explaining that ValueExpressionResolver must be implemented by the user (or the framework) and that CustomValueExpressionResolver is only an example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6465
The documentation showed
new SpelValueExpressionResolver()in the@MeterTagexamples, implying it was a built-in Micrometer class. However, it only existed as a private helper in the docs test package (io.micrometer.docs). Users who followed the docs got a compilation error.The maintainer suggested renaming it to
CustomValueExpressionResolverto make it clear that it is a custom (user-provided) implementation, and adding a note explaining thatValueExpressionResolveris not shipped with Micrometer.Changes
SpelValueExpressionResolver→CustomValueExpressionResolver(the "Spel" prefix implied framework-provided)TimedAspectTest,CountedAspectTest,ObservationHandlerTestsNOTEcallout intimers.adocandcounters.adoc(the@MeterTag on Method Parameterssection) explaining:ValueExpressionResolvermust be implemented by the user or provided by the frameworkCustomValueExpressionResolveris a sample implementation — it is not part of the Micrometer APITest plan
include::tags) still render correctly