Currently there are 2 implementations for micrometer new relic: 1. io.micrometer:micrometer-registry-new-relic 2. 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: 1. Add the 2nd implementation, using implementation. 2. Create a new NewrelicProperties class which will not have any dependency on the 1st implementation (e.g. without ClientProviderType) 3. Create config classes/beans for the 2nd implementation of Newrelic. e.g. https://github.com/newrelic/micrometer-registry-newrelic/wiki/Spring-Config-Example . 3. Disable the existing implementation: management.metrics.export.newrelic.enabled: false 4. Use a different prefix for your own configuration and enable it, e.g. management.metrics.export.newrelic2.enabled: true, together with @ConditionalOnExpression("${management.metrics.export.newrelic2.enabled:false}") on the config class you created in step 3

Comment From: wilkinsona

Thanks for the report. Unfortunately I'm a bit confused by the steps that you have described. If you want to use com.newrelic.telemetrymicrometer-registry-new-relic with Spring Boot, there should be any need to compile Spring Boot's code. The only step that should be necessary is to define your own NewRelicRegistry bean that's configured to meet your needs. Can you please clarify?

Comment From: mshukry11

@wilkinsona you are correct about that part, I apologize. Updated the description accordingly.

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 management.metrics.export.newrelic prefix. Not in any specific app, but for all of them.

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.

Comment From: wilkinsona

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 https://github.com/newrelic/micrometer-registry-newrelic/issues/46.

Comment From: shakuzen

Since that discussion, New Relic Insights (the API/system used by the implementation in the Micrometer repo) has been deprecated (see https://github.com/micrometer-metrics/micrometer/issues/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 https://github.com/micrometer-metrics/micrometer/issues/3033 for updates on the registry in the Micrometer repository and provide that feedback.

Comment From: wilkinsona

Thanks, @shakuzen. I've subscribed to https://github.com/micrometer-metrics/micrometer/issues/3033.

If necessary, we can re-open this issue or open a new issue once the direction for the New Relic registry is finalized.