Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Community Plus header

New Relic Micrometer registry

A Micrometer metrics registry for sending dimensional metrics to New Relic using the New Relic Java Telemetry SDK.

This registry should be able to be used both within a Spring Boot application, or any application that uses micrometer for recording metrics.

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 are a better fit for micrometer metrics than custom events.

Javadoc for this project can be found here: Javadocs

Usage

  1. via gradle:

    implementation 'com.newrelic.telemetry:micrometer-registry-new-relic:0.8.0'

    Note: you might need to also include a dependency on micrometer-core itself, for example:

    implementation 'io.micrometer:micrometer-core:1.6.4'

  2. via maven:

    <dependency>
        <groupId>com.newrelic.telemetry</groupId>
        <artifactId>micrometer-registry-new-relic</artifactId>
        <version>0.8.0</version>
    </dependency>
  1. The registry class is com.newrelic.telemetry.micrometer.NewRelicRegistry. It will need to be built via a com.newrelic.telemetry.micrometer.NewRelicRegistryConfig implementation. An example of how you might do that is in the wiki: Spring-Config-Example

In order to send metrics to New Relic, you will also need an Insert API Key. Please see New Relic Api Keys for more information.

And, that's it!

Find and use your data

For an in-depth breakdown of how Micrometer metrics are converted to New Relic dimensional metrics please read the Micrometer exporter specification.

Once telemetry data is received from the Micrometer registry, New Relic automatically detects the telemetry data as Micrometer metrics and creates a default summary page using those metrics. The service summary includes charts for response time, throughput, and error rate, as well as charts showing JVM metrics. You can also group and filter the charts by the dimensions available on the metrics.

Micrometer summary page Micrometer summary page

Additionally, if you wish to create your own charts based on other Micrometer metrics then you can use the Metrics explorer and Query builder to build your own dashboard.

Metrics explorer

Query builder

Additional documentation

Building

The project uses gradle 5 for building, and the gradle wrapper is provided.

To compile, run the tests and build the jar:

$ ./gradlew build

Support

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/tags/javaagent

Contributing

We encourage your contributions to improve the New Relic Micrometer registry! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.

If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at opensource@newrelic.com.

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

If you would like to contribute to this project, review these guidelines.

Licensing

The New Relic Micrometer registry is licensed under the Apache 2.0 License.