#metrics-exporter #basic #report #api #new-relic

metrics-exporter-newrelic

Basic metrics exporter for use with NewRelic

2 unstable releases

0.2.0 Oct 26, 2022
0.1.0 Feb 16, 2022

#41 in #metrics-exporter

40 downloads per month
Used in 2 crates (via opinionated_metrics)

Apache-2.0 OR MIT

21KB
358 lines

metrics-exporter-newrelic

A basic metrics-compatible exporter for NewRelic, using the NewRelic Report Metrics API. This is available as an out-of-the-box option with opinionated_metrics.

[API documentation]

Who should consider using this

Overall, I have not been impressed by NewRelic's "custom metrics" support. NewRelic's documentation for custom metrics is insufficient, and many things fail in silent and impossible-to-diagnose ways.

You should only consider using this plugin if:

  • You already use NewRelic for a bunch of other things.
  • You want to include some basic metrics from Rust.

If you're setting up a greenfield deployment, I strongly recommend looking at metrics-exporter-prometheus and Grafana. They look like they have much richer support for converting custom metrics into high-quality dashboards.

Current status

Here's where things stand:

  • Nice features
    • Global labels.
  • Export types
    • Manual exporting on demand.
    • Periodic exporting. (But you can write an async task that loops.)
  • Metric types
    • count
    • gauge
    • histogram (This is mysterious. We collect the data and upload it to NewRelic as per the docs. But it never shows up on any of their dashboards, and no errors get reported in NrIntegrationError. Also, NewRelic doesn't allow reporting real histograms via the Metrics API, only "summary" data like min/max/total/count. I am done trying to debug this for now.)

Development note

I would happily contribute this exporter to the main metrics project, if they want to take it!

Dependencies

~9–21MB
~298K SLoC