Skip to content

Add opt-in target host and port observation tags - #3546

Open
henriquejsza wants to merge 1 commit into
OpenFeign:masterfrom
henriquejsza:fix/micrometer-target-host-port
Open

Add opt-in target host and port observation tags#3546
henriquejsza wants to merge 1 commit into
OpenFeign:masterfrom
henriquejsza:fix/micrometer-target-host-port

Conversation

@henriquejsza

Copy link
Copy Markdown

Summary

  • add an opt-in TargetHostAndPortFeignObservationConvention
  • emit net.peer.host and an explicitly configured net.peer.port
  • preserve the existing default low-cardinality key set
  • safely omit target tags for URL-less or invalid targets
  • document activation, port semantics, and cardinality considerations

supportsContext is declared explicitly with the existing semantics so JApiCmp can validate the new public convention.

Testing

  • ./mvnw -Pdev -Dtoolchain.skip=true -pl micrometer -am verify

Fixes #2630

* Add a convention that emits the configured target host and explicit port.
* Keep the default low-cardinality key set unchanged.
* Cover explicit, omitted, and URL-less targets and document opt-in usage.

Fixes OpenFeign#2630
@henriquejsza
henriquejsza force-pushed the fix/micrometer-target-host-port branch from f2be94e to 6e282cf Compare August 28, 2026 20:11
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.

feign.micrometer.DefaultFeignObservationConvention not adding hostname and port to Observations

1 participant