File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright The OpenTelemetry Authors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ package x // import "go.opentelemetry.io/otel/sdk/internal/x"
5
+
6
+ import "go.opentelemetry.io/otel/trace"
7
+
8
+ // OnEndingSpanProcessor represents span processors that allow mutating spans
9
+ // just before they are ended and made immutable.
10
+ type OnEndingSpanProcessor interface {
11
+ // OnEnding is called while the span is finished, and while spans are still
12
+ // mutable. It is called synchronously and cannot block.
13
+ OnEnding (trace.Span )
14
+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
"go.opentelemetry.io/otel/codes"
20
20
"go.opentelemetry.io/otel/internal/global"
21
21
"go.opentelemetry.io/otel/sdk/instrumentation"
22
+ "go.opentelemetry.io/otel/sdk/internal/x"
22
23
"go.opentelemetry.io/otel/sdk/resource"
23
24
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
24
25
"go.opentelemetry.io/otel/trace"
@@ -427,7 +428,7 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) {
427
428
428
429
sps := s .tracer .provider .getSpanProcessors ()
429
430
for _ , sp := range sps {
430
- if oesp , ok := sp .sp .(OnEndingSpanProcessor ); ok {
431
+ if oesp , ok := sp .sp .(x. OnEndingSpanProcessor ); ok {
431
432
oesp .OnEnding (s )
432
433
}
433
434
}
Original file line number Diff line number Diff line change @@ -49,17 +49,6 @@ type SpanProcessor interface {
49
49
// must never be done outside of a new major release.
50
50
}
51
51
52
- // OnEndingSpanProcessor represents span processors that allow mutating spans
53
- // just before they are ended and made immutable.
54
- //
55
- // NOT STABLE: This interface still has a status of "development", and may have
56
- // breaking changes.
57
- type OnEndingSpanProcessor interface {
58
- // OnEnding is called while the span is finished, and while spans are still
59
- // mutable. It is called synchronously and cannot block.
60
- OnEnding (ReadWriteSpan )
61
- }
62
-
63
52
type spanProcessorState struct {
64
53
sp SpanProcessor
65
54
state sync.Once
You can’t perform that action at this time.
0 commit comments