Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## vNext

- TODO: Placeholder for Span processor related things
- *Fix* SpanProcessor::on_start is no longer called on non recording spans

## 0.30.0

Released 2025-May-23
Expand Down
10 changes: 6 additions & 4 deletions opentelemetry-sdk/src/trace/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::trace::{
IdGenerator, ShouldSample, SpanEvents, SpanLimits, SpanLinks,
};
use opentelemetry::{
trace::{SamplingDecision, SpanBuilder, SpanContext, SpanKind, TraceContextExt, TraceFlags},
trace::{SamplingDecision, Span as _, SpanBuilder, SpanContext, SpanKind, TraceContextExt, TraceFlags},
Context, InstrumentationScope, KeyValue,
};
use std::fmt;
Expand Down Expand Up @@ -281,9 +281,11 @@ impl opentelemetry::trace::Tracer for SdkTracer {
}
};

// Call `on_start` for all processors
for processor in provider.span_processors() {
processor.on_start(&mut span, parent_cx)
if span.is_recording() {
// Call `on_start` for all processors
for processor in provider.span_processors() {
processor.on_start(&mut span, parent_cx)
}
}

span
Expand Down
Loading