Skip to content

Commit

Permalink
[service/telemetry] delete deprecated config types (#9546)
Browse files Browse the repository at this point in the history
**Description:**
Delete deprecated config types which have moved to
opentelemetry-go-contrib.

See #8620
for the first changes.
  • Loading branch information
atoulme committed Feb 16, 2024
1 parent 59b45a5 commit 76b017d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 122 deletions.
25 changes: 25 additions & 0 deletions .chloggen/delete_deprecated_types.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Delete generated_config types, use go.opentelemetry.io/contrib/config types instead

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

# (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:

# 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: [api]
5 changes: 3 additions & 2 deletions service/telemetry/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"time"

"go.opentelemetry.io/contrib/config"
"go.uber.org/zap/zapcore"

"go.opentelemetry.io/collector/config/configtelemetry"
Expand Down Expand Up @@ -123,7 +124,7 @@ type MetricsConfig struct {

// Readers allow configuration of metric readers to emit metrics to
// any number of supported backends.
Readers []MetricReader `mapstructure:"readers"`
Readers []config.MetricReader `mapstructure:"readers"`
}

// TracesConfig exposes the common Telemetry configuration for collector's internal spans.
Expand All @@ -135,7 +136,7 @@ type TracesConfig struct {
Propagators []string `mapstructure:"propagators"`
// Processors allow configuration of span processors to emit spans to
// any number of suported backends.
Processors []SpanProcessor `mapstructure:"processors"`
Processors []config.SpanProcessor `mapstructure:"processors"`
}

// Validate checks whether the current configuration is valid
Expand Down
5 changes: 3 additions & 2 deletions service/telemetry/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"go.opentelemetry.io/contrib/config"

"go.opentelemetry.io/collector/config/configtelemetry"
)
Expand Down Expand Up @@ -42,8 +43,8 @@ func TestLoadConfig(t *testing.T) {
cfg: &Config{
Metrics: MetricsConfig{
Level: configtelemetry.LevelBasic,
Readers: []MetricReader{
{Pull: &PullMetricReader{}},
Readers: []config.MetricReader{
{Pull: &config.PullMetricReader{}},
},
},
},
Expand Down
118 changes: 0 additions & 118 deletions service/telemetry/generated_config.go

This file was deleted.

0 comments on commit 76b017d

Please sign in to comment.