Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micrometer Observation API Support #793

Merged
merged 2 commits into from Nov 21, 2022

Conversation

jonatan-ivanov
Copy link
Member

@jonatan-ivanov jonatan-ivanov commented Nov 19, 2022

This change auto-configures MicrometerObservationCapability. The previous auto-configuration for MicrometerCapability is still available but for that MicrometerObservationCapability should not be present (disabled, no observation registry, micrometer-observation is not on the classpath).

Breaking change: properties were renamed from spring.cloud.openfeign.metrics to spring.cloud.openfeign.micrometer.

Previous Micrometer support in SC-OpenFeign: #462
MicrometerObservationCapability support in Feign: OpenFeign/feign#1760

@jonatan-ivanov jonatan-ivanov added the enhancement New feature or request label Nov 19, 2022
@jonatan-ivanov jonatan-ivanov added this to the 4.0.0-RC3 milestone Nov 19, 2022
@codecov
Copy link

codecov bot commented Nov 19, 2022

Codecov Report

Merging #793 (5e250b8) into main (47d8094) will decrease coverage by 0.02%.
The diff coverage is 84.61%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #793      +/-   ##
============================================
- Coverage     78.57%   78.54%   -0.03%     
  Complexity      552      552              
============================================
  Files            65       65              
  Lines          2007     2009       +2     
  Branches        282      283       +1     
============================================
+ Hits           1577     1578       +1     
  Misses          268      268              
- Partials        162      163       +1     
Impacted Files Coverage Δ
...amework/cloud/openfeign/FeignClientProperties.java 86.48% <66.66%> (-0.79%) ⬇️
...enfeign/FeignClientMicrometerEnabledCondition.java 100.00% <100.00%> (ø)
...ork/cloud/openfeign/FeignClientsConfiguration.java 97.77% <100.00%> (+0.05%) ⬆️

@@ -57,9 +57,9 @@
"defaultValue": "false"
},
{
"name": "spring.cloud.openfeign.metrics.enabled",
"name": "spring.cloud.openfeign.micrometer.enabled",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the property name need to change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. I don't think metrics.enabled makes any sense when the users don't even have metrics, e.g.: they enable tracing but not metrics through the Observation API.
Or to put it in a different way: SC-OpenFeign has no idea what the user will configure in their ObservationRegistry.

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @jonatan-ivanov. LGTM.

@OlgaMaciaszek OlgaMaciaszek merged commit 372a631 into main Nov 21, 2022
@jonatan-ivanov jonatan-ivanov deleted the micrometer-observation-api-support branch November 21, 2022 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants