Skip to content

docs: rename SpelValueExpressionResolver to CustomValueExpressionResolver and add clarification#7605

Open
won-seoop wants to merge 1 commit into
micrometer-metrics:mainfrom
won-seoop:doc-6465-spel-value-expression-resolver-clarification
Open

docs: rename SpelValueExpressionResolver to CustomValueExpressionResolver and add clarification#7605
won-seoop wants to merge 1 commit into
micrometer-metrics:mainfrom
won-seoop:doc-6465-spel-value-expression-resolver-clarification

Conversation

@won-seoop

Copy link
Copy Markdown

Summary

Closes #6465

The documentation showed new SpelValueExpressionResolver() in the @MeterTag examples, 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 CustomValueExpressionResolver to make it clear that it is a custom (user-provided) implementation, and adding a note explaining that ValueExpressionResolver is not shipped with Micrometer.

Changes

  • Renamed SpelValueExpressionResolverCustomValueExpressionResolver (the "Spel" prefix implied framework-provided)
  • Added a comment block in the class explaining it is an example SpEL-based implementation, not part of the Micrometer API
  • Updated imports in TimedAspectTest, CountedAspectTest, ObservationHandlerTests
  • Added a NOTE callout in timers.adoc and counters.adoc (the @MeterTag on Method Parameters section) explaining:
    • ValueExpressionResolver must be implemented by the user or provided by the framework
    • CustomValueExpressionResolver is a sample implementation — it is not part of the Micrometer API

Test plan

  • Docs build with Antora renders the NOTE callout correctly
  • Tests compile and pass with the renamed class
  • The included Java snippets (via include:: tags) still render correctly

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing class SpelValueExpressionResolver from documentation

1 participant