Skip to content

Commit

Permalink
Add missing tracing file
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zk committed Oct 1, 2024
1 parent a176941 commit 759df96
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fhevm-engine/coprocessor/src/tracing.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pub fn setup_tracing() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
let otlp_exporter = opentelemetry_otlp::new_exporter()
.tonic();
let trace_provider = opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(otlp_exporter)
.install_batch(opentelemetry_sdk::runtime::Tokio)?;

opentelemetry::global::set_tracer_provider(trace_provider);

Ok(())
}

0 comments on commit 759df96

Please sign in to comment.