Skip to content

Commit

Permalink
remove otel context
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Sep 28, 2024
1 parent 6f99bd2 commit bd8037a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions iris-mpc-common/src/helpers/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ pub fn trace_from_message_attributes(trace_id: &str, span_id: &str) -> eyre::Res
.span_builder("mpcv2-batch-item")
.start_with_context(&tracer, &parent_ctx);
span.add_event("Created batch span item", vec![]);
tracing::info!("Created batch span item");
Ok(span.span_context().clone())
}
9 changes: 2 additions & 7 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ use iris_mpc_gpu::{
use iris_mpc_store::{Store, StoredIrisRef};
use opentelemetry::{
global::tracer,
trace::{Link, TraceContextExt, Tracer},
Context as OtelContext,
trace::{Link, Tracer},
};
use std::{
collections::HashMap,
Expand All @@ -55,7 +54,6 @@ use tokio::{
time::timeout,
};
use tracing::Instrument;
use tracing_opentelemetry::OpenTelemetrySpanExt;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

const REGION: &str = "eu-north-1";
Expand Down Expand Up @@ -922,14 +920,11 @@ async fn server_main(config: Config) -> eyre::Result<()> {
links.len()
);

let batch_span = tracer
tracer
.span_builder("batch_processing")
.with_links(links)
.start(&tracer);

let otel_context = OtelContext::current_with_span(batch_span);
tracing::Span::current().set_parent(otel_context);

process_identity_deletions(
&batch,
&store,
Expand Down

0 comments on commit bd8037a

Please sign in to comment.