easy_init_newrelic_opentelemetry

Crates.ioeasy_init_newrelic_opentelemetry
lib.rseasy_init_newrelic_opentelemetry
version0.2.0
sourcesrc
created_at2024-01-31 17:56:28.541803
updated_at2024-10-23 11:58:43.295846
descriptionA simple example of how to initialize a newrelic opentelemetry exporter
homepagehttps://github.com/Romira915/easy_init_newrelic_opentelemetry
repositoryhttps://github.com/Romira915/easy_init_newrelic_opentelemetry
max_upload_size
id1122015
size18,939
Romira (Romira915)

documentation

README

Easy Init NewRelic OpenTelemetry

This crate provides a subscriber for OpenTelemetry that sends spans and metrics to New Relic.

Example

use easy_init_newrelic_opentelemetry::NewRelicSubscriberInitializer;
use time::macros::offset;

fn main() {
    NewRelicSubscriberInitializer::default()
        .newrelic_otlp_endpoint("http://localhost:4317")
        .newrelic_license_key("1234567890abcdef1234567890abcdef12345678")
        .newrelic_service_name("test-service")
        .host_name("test-host")
        .timestamps_offset(offset!(+00:00:00));
}
Commit count: 16

cargo fmt