File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/hyperlight_host/examples/otlp_tracing Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ use opentelemetry_otlp::{SpanExporter, WithExportConfig};
3838use opentelemetry_sdk:: runtime:: Tokio ;
3939use opentelemetry_sdk:: { trace, Resource } ;
4040use opentelemetry_semantic_conventions:: attribute:: { SERVICE_NAME , SERVICE_VERSION } ;
41- use opentelemetry_semantic_conventions:: SCHEMA_URL ;
4241use tracing_subscriber:: EnvFilter ;
4342use uuid:: Uuid ;
4443
@@ -64,15 +63,10 @@ fn init_tracing_subscriber(addr: &str) -> Result<(), Box<dyn Error + Send + Sync
6463 . build ( ) ?;
6564
6665 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- )
66+ . with_resource ( Resource :: new ( vec ! [
67+ KeyValue :: new( SERVICE_NAME , "hyperlight_otel_example" ) ,
68+ KeyValue :: new( SERVICE_VERSION , env!( "CARGO_PKG_VERSION" ) ) ,
69+ ] ) )
7670 . with_batch_exporter ( exporter, Tokio )
7771 . build ( ) ;
7872
You can’t perform that action at this time.
0 commit comments