Skip to content

Commit

Permalink
Updates to otel 0.27.1 (#205)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Davies <[email protected]>
  • Loading branch information
simongdavies authored Jan 29, 2025
1 parent 6b8de9c commit 2154923
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
13 changes: 6 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/hyperlight_host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ tracing-forest = { version = "0.1.6", features = ["uuid", "chrono", "smallvec",
tracing = "0.1.41"
tracing-subscriber = {version = "0.3.19", features = ["std", "env-filter"]}
tracing-opentelemetry = "0.28.0"
opentelemetry = "0.27.0"
opentelemetry = "0.27.1"
opentelemetry-otlp = { version = "0.27.0", features = ["default"] }
opentelemetry-semantic-conventions = "0.27.0"
opentelemetry_sdk = { version = "0.27.0", features = ["rt-tokio"] }
opentelemetry_sdk = { version = "0.27.1", features = ["rt-tokio"] }
tokio = { version = "1.43.0", features = ["full"] }
criterion = "0.5.1"
tracing-chrome = "0.7.2"
Expand Down
14 changes: 4 additions & 10 deletions src/hyperlight_host/examples/otlp_tracing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ use opentelemetry_otlp::{SpanExporter, WithExportConfig};
use opentelemetry_sdk::runtime::Tokio;
use opentelemetry_sdk::{trace, Resource};
use opentelemetry_semantic_conventions::attribute::{SERVICE_NAME, SERVICE_VERSION};
use opentelemetry_semantic_conventions::SCHEMA_URL;
use tracing_subscriber::EnvFilter;
use uuid::Uuid;

Expand All @@ -64,15 +63,10 @@ fn init_tracing_subscriber(addr: &str) -> Result<(), Box<dyn Error + Send + Sync
.build()?;

let provider = trace::TracerProvider::builder()
.with_config(
trace::Config::default().with_resource(Resource::from_schema_url(
vec![
KeyValue::new(SERVICE_NAME, "hyperlight_otel_example"),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
],
SCHEMA_URL,
)),
)
.with_resource(Resource::new(vec![
KeyValue::new(SERVICE_NAME, "hyperlight_otel_example"),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
]))
.with_batch_exporter(exporter, Tokio)
.build();

Expand Down

0 comments on commit 2154923

Please sign in to comment.