Skip to content

Commit 36262ad

Browse files
committed
Replace use of deprecated method opentelemetry_sdk::trace::Builder::with_config
Signed-off-by: Simon Davies <[email protected]>
1 parent e37eb6e commit 36262ad

File tree

1 file changed

+7
-9
lines changed
  • src/hyperlight_host/examples/otlp_tracing

1 file changed

+7
-9
lines changed

src/hyperlight_host/examples/otlp_tracing/main.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ fn init_tracing_subscriber(addr: &str) -> Result<(), Box<dyn Error + Send + Sync
6464
.build()?;
6565

6666
let provider = trace::TracerProvider::builder()
67-
.with_config(
68-
trace::Config::default().with_resource(Resource::from_schema_url(
69-
vec![
70-
KeyValue::new(SERVICE_NAME, "hyperlight_otel_example"),
71-
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
72-
],
73-
SCHEMA_URL,
74-
)),
75-
)
67+
.with_resource(Resource::from_schema_url(
68+
vec![
69+
KeyValue::new(SERVICE_NAME, "hyperlight_otel_example"),
70+
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
71+
],
72+
SCHEMA_URL,
73+
))
7674
.with_batch_exporter(exporter, Tokio)
7775
.build();
7876

0 commit comments

Comments
 (0)