#metrics #metrics-exporter #basic #api #report #documentation #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

#27 in #metrics-exporter

Download history 10/week @ 2024-03-11 7/week @ 2024-03-25 54/week @ 2024-04-01 14/week @ 2024-04-22 32/week @ 2024-04-29 17/week @ 2024-05-13 7/week @ 2024-05-20 36/week @ 2024-05-27 13/week @ 2024-06-03 16/week @ 2024-06-10 10/week @ 2024-06-17 15/week @ 2024-06-24

54 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

~7–19MB
~289K SLoC