diff --git a/.chloggen/delete_deprecated_types.yaml b/.chloggen/delete_deprecated_types.yaml new file mode 100755 index 00000000000..f2aaddea42b --- /dev/null +++ b/.chloggen/delete_deprecated_types.yaml @@ -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] diff --git a/service/telemetry/config.go b/service/telemetry/config.go index 19d9f58f18f..3336fcac578 100644 --- a/service/telemetry/config.go +++ b/service/telemetry/config.go @@ -7,6 +7,7 @@ import ( "fmt" "time" + "go.opentelemetry.io/contrib/config" "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/config/configtelemetry" @@ -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. @@ -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 diff --git a/service/telemetry/config_test.go b/service/telemetry/config_test.go index f08a8c9226d..5417347c772 100644 --- a/service/telemetry/config_test.go +++ b/service/telemetry/config_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/collector/config/configtelemetry" ) @@ -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{}}, }, }, }, diff --git a/service/telemetry/generated_config.go b/service/telemetry/generated_config.go deleted file mode 100644 index fc1b20885a2..00000000000 --- a/service/telemetry/generated_config.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by github.com/atombender/go-jsonschema, DO NOT EDIT. - -package telemetry - -import ( - "go.opentelemetry.io/contrib/config" -) - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Attributes instead. -type Attributes = config.Attributes - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".BatchLogRecordProcessor instead. -type BatchLogRecordProcessor = config.BatchLogRecordProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".BatchSpanProcessor instead. -type BatchSpanProcessor = config.BatchSpanProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Common instead. -type CommonJson = config.Common - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Console instead. -type Console = config.Console - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Headers instead. -type Headers = config.Headers - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".LogRecordExporter instead. -type LogRecordExporter = config.LogRecordExporter - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".LogRecordLimits instead. -type LogRecordLimits = config.LogRecordLimits - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".LogRecordProcessor instead. -type LogRecordProcessor = config.LogRecordProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".LoggerProvider instead. -type LoggerProviderJson = config.LoggerProvider - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".MeterProvider instead. -type MeterProviderJson = config.MeterProvider - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".MetricExporter instead. -type MetricExporter = config.MetricExporter - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".MetricReader instead. -type MetricReader = config.MetricReader - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".OTLP instead. -type Otlp = config.OTLP - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".OTLPMetric instead. -type OtlpMetric = config.OTLPMetric - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".PeriodicMetricReader instead. -type PeriodicMetricReader = config.PeriodicMetricReader - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Prometheus instead. -type Prometheus = config.Prometheus - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".PullMetricReader instead. -type PullMetricReader = config.PullMetricReader - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Resource instead. -type ResourceJson = config.Resource - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".Sampler instead. -type Sampler = config.Sampler - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SamplerAlwaysOff instead. -type SamplerAlwaysOff = config.SamplerAlwaysOff - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SamplerAlwaysOn instead. -type SamplerAlwaysOn = config.SamplerAlwaysOn - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".ViewStreamAggregationExplicitBucketHistogram instead. -type ViewStreamAggregationExplicitBucketHistogram = config.ViewStreamAggregationExplicitBucketHistogram - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".ViewStreamAggregationBase2ExponentialBucketHistogram instead. -type ViewStreamAggregationExponentialBucketHistogram = config.ViewStreamAggregationBase2ExponentialBucketHistogram - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".ViewStreamAggregation instead. -type ViewStreamAggregation = config.ViewStreamAggregation - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".ViewStream instead. -type ViewStream = config.ViewStream - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".View instead. -type View = config.View - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SpanExporter instead. -type SpanExporter = config.SpanExporter - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".ViewSelector instead. -type ViewSelector = config.ViewSelector - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SimpleLogRecordProcessor instead. -type SimpleLogRecordProcessor = config.SimpleLogRecordProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SamplerJaegerRemote instead. -type SamplerJaegerRemote = config.SamplerJaegerRemote - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SamplerParentBased instead. -type SamplerParentBased = config.SamplerParentBased - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SamplerTraceIDRatioBased instead. -type SamplerTraceIdRatioBased = config.SamplerTraceIDRatioBased - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SimpleSpanProcessor instead. -type SimpleSpanProcessor = config.SimpleSpanProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SpanLimits instead. -type SpanLimits = config.SpanLimits - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".SpanProcessor instead. -type SpanProcessor = config.SpanProcessor - -// Deprecated: [v0.90.0] Use "go.opentelemetry.io/contrib/config".TracerProvider instead. -type TracerProviderJson = config.TracerProvider