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 NewRelicsummarymetric. 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§
- NewRelic
Builder - Builder for creating and installing a
NewRelicRecoderand exporter. - NewRelic
Handle - A handle to a
NewRelicRecorder. You can use this to access certain features of the recorder after installing it. - NewRelic
Recorder - A metrics recorder that reports to NewRelic.
Enums§
- Build
Error - An error occurred building or installing our metrics recorder.