From 7670cfb9b88239fab3f7a4c31c9cf424ed9ab123 Mon Sep 17 00:00:00 2001 From: Gary Sassano <10464497+garysassano@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:05:41 +0100 Subject: [PATCH] fix deprecated calls --- opentelemetry-datadog/src/exporter/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry-datadog/src/exporter/mod.rs b/opentelemetry-datadog/src/exporter/mod.rs index 7e490c7a..f6efb4bf 100644 --- a/opentelemetry-datadog/src/exporter/mod.rs +++ b/opentelemetry-datadog/src/exporter/mod.rs @@ -287,7 +287,7 @@ impl DatadogPipelineBuilder { let (config, service_name) = self.build_config_and_service_name(); let exporter = self.build_exporter_with_service_name(service_name)?; let mut provider_builder = TracerProvider::builder().with_simple_exporter(exporter); - provider_builder = provider_builder.with_config(config); + provider_builder = provider_builder.with_resource(config.resource.into_owned()); let provider = provider_builder.build(); let scope = InstrumentationScope::builder("opentelemetry-datadog") .with_version(env!("CARGO_PKG_VERSION")) @@ -305,7 +305,7 @@ impl DatadogPipelineBuilder { let (config, service_name) = self.build_config_and_service_name(); let exporter = self.build_exporter_with_service_name(service_name)?; let mut provider_builder = TracerProvider::builder().with_batch_exporter(exporter, runtime); - provider_builder = provider_builder.with_config(config); + provider_builder = provider_builder.with_resource(config.resource.into_owned()); let provider = provider_builder.build(); let scope = InstrumentationScope::builder("opentelemetry-datadog") .with_version(env!("CARGO_PKG_VERSION"))