diff --git a/examples/opentelemetry-otlp.rs b/examples/opentelemetry-otlp.rs index a8aa2d6..b3f52f0 100644 --- a/examples/opentelemetry-otlp.rs +++ b/examples/opentelemetry-otlp.rs @@ -5,7 +5,7 @@ use opentelemetry_sdk::{ Resource, }; use opentelemetry_semantic_conventions::{ - attribute::{DEPLOYMENT_ENVIRONMENT_NAME, SERVICE_NAME, SERVICE_VERSION}, + attribute::{DEPLOYMENT_ENVIRONMENT_NAME, SERVICE_VERSION}, SCHEMA_URL, }; use tracing_core::Level; @@ -15,9 +15,9 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; // Create a Resource that captures information about the entity for which telemetry is recorded. fn resource() -> Resource { Resource::builder() + .with_service_name(env!("CARGO_PKG_NAME")) .with_schema_url( [ - KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")), KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")), KeyValue::new(DEPLOYMENT_ENVIRONMENT_NAME, "develop"), ],