-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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 new relic correct dependency is "difficult"/"wrong" to use. #29908
Comments
Thanks for the report. Unfortunately I'm a bit confused by the steps that you have described. If you want to use |
@wilkinsona you are correct about that part, I apologize. Note I also added what are the most "painful" parts for me, which is using a different prefix. We work with multiple applications, some which still uses the "old" versions where spring boot configuration doesn't strictly depends on the 1st implementation. For our infrastructure we have config for So now for newer apps that wants to both use new spring version and the "correct" implementation, we need to use a different prefix, on the infrastructure as well. |
Thanks for the clarification. While I believe the plan is for Micrometer's NewRelic registry to be replaced by NewRelic's own that isn't a straightforward transition. Until such a time as NewRelic's implementation is, functionality wise, a drop-in replacement and Micrometer's implementation is then deprecated, I don't think we can do anything here. Spring Boot supporting both would not achieve what you want as the two have different configuration options so Boot would end up with different property prefixes. @shakuzen please let me know if I've missed anything here or things have moved on since the discussion in newrelic/micrometer-registry-newrelic#46. |
Since that discussion, New Relic Insights (the API/system used by the implementation in the Micrometer repo) has been deprecated (see micrometer-metrics/micrometer#3033), which hopefully means the transition from Insights has been made as smooth as possible by now on the New Relic side and us deprecating the registry in Micrometer does not cause too much disruption for users. We'd like to get feedback from users about anything we can do in Micrometer to help switching. Spring Boot users can follow micrometer-metrics/micrometer#3033 for updates on the registry in the Micrometer repository and provide that feedback. |
Thanks, @shakuzen. I've subscribed to micrometer-metrics/micrometer#3033. If necessary, we can re-open this issue or open a new issue once the direction for the New Relic registry is finalized. |
Currently there are 2 implementations for micrometer new relic:
io.micrometer:micrometer-registry-new-relic
com.newrelic.telemetrymicrometer-registry-new-relic
According to the repo of the 2nd implementation site (which is by newrelic): https://github.com/newrelic/micrometer-registry-newrelic, that is the version one should use, as it will supersede the 1st implementation
Note: the micrometer project currently includes a NewRelicMeterRegistry that writes metrics to NewRelic as custom events. This implementation is intended to supersede that, as [dimensional metrics](https://docs.newrelic.com/docs/using-new-relic/data/understand-data/new-relic-data-types#dimensional-metrics) are a better fit for micrometer metrics than custom [events](https://docs.newrelic.com/docs/using-new-relic/data/understand-data/new-relic-data-types#events-new-relic).
However currently spring uses the 1st implementation.
If one wants to use spring boot (specifically actuator autoconfigur) together with the 2nd (and "correct") implementation of newrelic, they have to:
implementation
.ClientProviderType
)management.metrics.export.newrelic.enabled: false
management.metrics.export.newrelic2.enabled: true
, together with@ConditionalOnExpression("${management.metrics.export.newrelic2.enabled:false}")
on the config class you created in step 3The text was updated successfully, but these errors were encountered: