Skip to content

Document how to customize tags in micrometer-java11 HttpClient instrumentation#7593

Open
won-seoop wants to merge 1 commit into
micrometer-metrics:mainfrom
won-seoop:doc-java11-httpclient-customization
Open

Document how to customize tags in micrometer-java11 HttpClient instrumentation#7593
won-seoop wants to merge 1 commit into
micrometer-metrics:mainfrom
won-seoop:doc-java11-httpclient-customization

Conversation

@won-seoop

Copy link
Copy Markdown

Summary

Closes #4962

The Java HttpClient reference page described how to instrument an HttpClient but didn't explain what tags are emitted by default or how to add/override them.

Changes

Added a Customizing observations section to docs/modules/ROOT/pages/reference/java-httpclient.adoc with:

  1. Default tags table — documents the four low-cardinality key values produced by DefaultHttpClientObservationConvention (method, uri, status, outcome).

  2. Custom convention example — shows how to extend DefaultHttpClientObservationConvention and override getLowCardinalityKeyValues to add an extra tag.

  3. Builder usage example — shows how to register the custom convention via MicrometerHttpClient.instrumentationBuilder().customObservationConvention(...).

Test plan

  • Build the docs (./gradlew :docs:antora) and verify the new section renders correctly on the Java HttpClient reference page
  • Confirm the code snippets in the new section compile against the current API

🤖 Generated with Claude Code

…mentation

Adds a "Customizing observations" section to the Java HttpClient reference
documentation covering:

- A table of the default low-cardinality tags produced by the instrumentation
  (method, uri, status, outcome)
- A code example showing how to extend DefaultHttpClientObservationConvention
  to add or override tags
- A code example showing how to register the custom convention via
  MicrometerHttpClient.instrumentationBuilder().customObservationConvention()

Closes micrometer-metricsgh-4962

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.

Document how to customize tags in micrometer-java11 HttpClient instrumentation

1 participant