Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions .chloggen/mark_noopTraceProvider_deprecated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: service

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: move service.noopTraceProvider feature gate to deprecated stage

# One or more tracking issues or pull requests related to the change
issues: [13492]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
The functionality of the feature gate is available via configuration with the following telemetry settings:
```
service:
telemetry:
traces:
level: none
```

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
2 changes: 1 addition & 1 deletion service/telemetry/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

var noopTracerProvider = featuregate.GlobalRegistry().MustRegister("service.noopTracerProvider",
featuregate.StageAlpha,
featuregate.StageDeprecated,
featuregate.WithRegisterFromVersion("v0.107.0"),
featuregate.WithRegisterToVersion("v0.109.0"),
featuregate.WithRegisterDescription("Sets a Noop OpenTelemetry TracerProvider to reduce memory allocations. This featuregate is incompatible with the zPages extension."))
Expand Down
13 changes: 0 additions & 13 deletions service/telemetry/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"

"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/featuregate"
)

func TestNewTracerProvider(t *testing.T) {
Expand All @@ -30,25 +29,13 @@ func TestNewTracerProvider(t *testing.T) {
},
wantTracerProvider: &noopNoContextTracerProvider{},
},
{
name: "noop tracer feature gate",
cfg: Config{},
noopTracerGate: true,
wantTracerProvider: &noopNoContextTracerProvider{},
},
{
name: "tracer provider",
wantTracerProvider: &sdktrace.TracerProvider{},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
previousValue := noopTracerProvider.IsEnabled()
// expect error due to deprecated flag
require.NoError(t, featuregate.GlobalRegistry().Set(noopTracerProvider.ID(), tt.noopTracerGate))
defer func() {
require.NoError(t, featuregate.GlobalRegistry().Set(noopTracerProvider.ID(), previousValue))
}()
sdk, err := config.NewSDK(config.WithOpenTelemetryConfiguration(config.OpenTelemetryConfiguration{TracerProvider: &config.TracerProvider{
Processors: tt.cfg.Traces.Processors,
}}))
Expand Down
Loading