Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions crates/utils/src/tracing/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@ pub fn grpc_trace_fn<T>(request: &http::Request<T>) -> tracing::Span {

// Create a span with a generic, static name. Fields to be recorded after needs to be
// initialized as empty since otherwise the assignment will have no effect.
let span = match method {
"SyncState" | "SyncNullifiers" => tracing::debug_span!(
"rpc",
otel.name = field::Empty,
rpc.service = service,
rpc.method = method
),
_ => tracing::info_span!(
"rpc",
otel.name = field::Empty,
rpc.service = service,
rpc.method = method
),
};
let span = tracing::info_span!(
"rpc",
otel.name = field::Empty,
rpc.service = service,
rpc.method = method
);

// Set the span name via otel.name
let otel_name = format!("{service}/{method}");
Expand Down
Loading