From b4f5a8c03e1935c32e3a4193f0ef6808e7de9dd4 Mon Sep 17 00:00:00 2001 From: Lalit Date: Wed, 23 Oct 2024 21:42:49 -0700 Subject: [PATCH 1/2] manual reader internal log --- opentelemetry-sdk/src/metrics/manual_reader.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opentelemetry-sdk/src/metrics/manual_reader.rs b/opentelemetry-sdk/src/metrics/manual_reader.rs index e1cb571ec3..e6905e0fb1 100644 --- a/opentelemetry-sdk/src/metrics/manual_reader.rs +++ b/opentelemetry-sdk/src/metrics/manual_reader.rs @@ -4,7 +4,7 @@ use std::{ }; use opentelemetry::{ - global, + otel_debug, metrics::{MetricsError, Result}, }; @@ -77,9 +77,9 @@ impl MetricReader for ManualReader { if inner.sdk_producer.is_none() { inner.sdk_producer = Some(pipeline); } else { - global::handle_error(MetricsError::Config( - "duplicate reader registration, did not register manual reader".into(), - )) + otel_debug!( + name: "ManualReader.RegisterPipeline.DuplicateRegistration", + message = "The pipeline is already registered to the Reader. Registering pipeline multiple times is not allowed."); } }); } From d251b101e3526040f697196b0e8e63abd9a45ba7 Mon Sep 17 00:00:00 2001 From: Lalit Date: Wed, 23 Oct 2024 21:43:51 -0700 Subject: [PATCH 2/2] change event name --- opentelemetry-sdk/src/metrics/manual_reader.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry-sdk/src/metrics/manual_reader.rs b/opentelemetry-sdk/src/metrics/manual_reader.rs index e6905e0fb1..b79b1d7ae7 100644 --- a/opentelemetry-sdk/src/metrics/manual_reader.rs +++ b/opentelemetry-sdk/src/metrics/manual_reader.rs @@ -4,8 +4,8 @@ use std::{ }; use opentelemetry::{ - otel_debug, metrics::{MetricsError, Result}, + otel_debug, }; use super::{ @@ -78,7 +78,7 @@ impl MetricReader for ManualReader { inner.sdk_producer = Some(pipeline); } else { otel_debug!( - name: "ManualReader.RegisterPipeline.DuplicateRegistration", + name: "ManualReader.DuplicateRegistration", message = "The pipeline is already registered to the Reader. Registering pipeline multiple times is not allowed."); } });