Skip to content

Commit

Permalink
Update opentelemetry Rust crates to v0.27.1 (#5764)
Browse files Browse the repository at this point in the history
Co-authored-by: hash-worker[bot] <180894564+hash-worker[bot]@users.noreply.github.com>
Co-authored-by: Tim Diekmann <[email protected]>
  • Loading branch information
hash-worker[bot] and TimDiekmann authored Dec 2, 2024
1 parent 8bf7df6 commit d7d5699
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
34 changes: 16 additions & 18 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ mimalloc = { version = "=0.1.43", default-features = false }
mime = { version = "=0.3.17", default-features = false }
num-traits = { version = "=0.2.19", default-features = false }
once_cell = { version = "=1.20.2", default-features = false }
opentelemetry = { version = "=0.27.0", default-features = false }
opentelemetry = { version = "=0.27.1", default-features = false }
opentelemetry-otlp = { version = "=0.27.0", default-features = false }
opentelemetry_sdk = { version = "=0.27.0", default-features = false }
opentelemetry_sdk = { version = "=0.27.1", default-features = false }
orx-concurrent-vec = { version = "=3.0.2", default-features = false }
owo-colors = { version = "=4.1.0", default-features = false }
paste = { version = "=1.0.15", default-features = false }
Expand Down
9 changes: 3 additions & 6 deletions libs/@local/tracing/src/opentelemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,13 @@ where
// - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT
// - OTEL_SPAN_EVENT_COUNT_LIMIT
// - OTEL_SPAN_LINK_COUNT_LIMIT
let trace_config = trace::Config::default()
let tracer = trace::TracerProvider::builder()
.with_batch_exporter(exporter, runtime::Tokio)
.with_sampler(Sampler::ParentBased(Box::new(Sampler::TraceIdRatioBased(
0.1,
))))
.with_id_generator(RandomIdGenerator::default())
.with_resource(Resource::new(vec![KeyValue::new("service.name", "graph")]));

let tracer = trace::TracerProvider::builder()
.with_batch_exporter(exporter, runtime::Tokio)
.with_config(trace_config)
.with_resource(Resource::new(vec![KeyValue::new("service.name", "graph")]))
.build()
.tracer("graph");

Expand Down

0 comments on commit d7d5699

Please sign in to comment.