Crate metrics_exporter_newrelic
source · [−]Expand description
A simple interface for reporting metrics
data to NewRelic.
We have a number of limitations:
- We do not provide any automatic way to submitted data on a scheduled interval.
- We may or may not support
histogram!
as a NewRelicsummary
metric. We do send the data. But it doesn’t show up and it doesn’t report errors inNrIntegrationError
. - We always report all metrics that we’ve ever seen. We could stop reporting
stale metrics if we figured out [
metrics_util::Recency
].
Example code
use metrics_exporter_newrelic::NewRelicBuilder;
// Create and install our metrics reporter.
let handle = NewRelicBuilder::new("my-api-key")
.add_global_label("host.name", "server1.example.com")
.build()?
.install()?;
// Report metrics to NewRelic whenever you want.
handle.report().await?;
Structs
Builder for creating and installing a
NewRelicRecoder
and exporter.A handle to a
NewRelicRecorder
. You can use this to access certain
features of the recorder after installing it.A metrics recorder that reports to NewRelic.
Enums
An error occurred building or installing our metrics recorder.