Skip to content
Micrometer registry implementation that sends data to New Relic as dimensional metrics.
Java Kotlin Shell
Branch: master
Clone or download
Latest commit 12e3faa Oct 30, 2019

README.md

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.

How to use:

  1. via gradle:

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

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

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

  2. via maven:

    <dependency>
        <groupId>com.newrelic.telemetry</groupId>
        <artifactId>micrometer-registry-new-relic</artifactId>
        <version>0.2.3</version>
    </dependency>
  1. The registry class is io.micrometer.newrelic.NewRelicRegistry. It will need to be built via a io.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 Insights Insert API Key. Please see New Relic Api Keys for more information.

And, that's it! For details on what your metrics will look like once they are reported, please see the Micrometer exporter spec.

Building

CI builds are run on Azure Pipelines: Build Status

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

To compile, run the tests and build the jar:

$ ./gradlew build

You can’t perform that action at this time.