Crates.io | easy_init_newrelic_opentelemetry |
lib.rs | easy_init_newrelic_opentelemetry |
version | 0.2.0 |
source | src |
created_at | 2024-01-31 17:56:28.541803 |
updated_at | 2024-10-23 11:58:43.295846 |
description | A simple example of how to initialize a newrelic opentelemetry exporter |
homepage | https://github.com/Romira915/easy_init_newrelic_opentelemetry |
repository | https://github.com/Romira915/easy_init_newrelic_opentelemetry |
max_upload_size | |
id | 1122015 |
size | 18,939 |
This crate provides a subscriber for OpenTelemetry that sends spans and metrics to New Relic.
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));
}