Skip to content

Commit

Permalink
update calls in deprecated func
Browse files Browse the repository at this point in the history
  • Loading branch information
codeboten committed Jul 5, 2022
1 parent 2e94233 commit 3e39909
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
12 changes: 3 additions & 9 deletions component/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ type exporterFactory struct {
// WithTracesExporter overrides the default "error not supported" implementation for CreateTracesExporter.
// Deprecated: [v0.55.0] Use WithTracesExporterAndStabilityLevel instead.
func WithTracesExporter(createTracesExporter CreateTracesExporterFunc) ExporterFactoryOption {
return exporterFactoryOptionFunc(func(o *exporterFactory) {
o.CreateTracesExporterFunc = createTracesExporter
})
return WithTracesExporterAndStabilityLevel(createTracesExporter, StabilityLevelUndefined)
}

// WithTracesExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesExporter and the default "undefined" stability level.
Expand All @@ -167,9 +165,7 @@ func WithTracesExporterAndStabilityLevel(createTracesExporter CreateTracesExport
// WithMetricsExporter overrides the default "error not supported" implementation for CreateMetricsExporter.
// Deprecated: [v0.55.0] Use WithMetricsExporterAndStabilityLevel instead.
func WithMetricsExporter(createMetricsExporter CreateMetricsExporterFunc) ExporterFactoryOption {
return exporterFactoryOptionFunc(func(o *exporterFactory) {
o.CreateMetricsExporterFunc = createMetricsExporter
})
return WithMetricsExporterAndStabilityLevel(createMetricsExporter, StabilityLevelUndefined)
}

// WithMetricsExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsExporter and the default "undefined" stability level.
Expand All @@ -183,9 +179,7 @@ func WithMetricsExporterAndStabilityLevel(createMetricsExporter CreateMetricsExp
// WithLogsExporter overrides the default "error not supported" implementation for CreateLogsExporter.
// Deprecated: [v0.55.0] Use WithLogsExporterAndStabilityLevel instead.
func WithLogsExporter(createLogsExporter CreateLogsExporterFunc) ExporterFactoryOption {
return exporterFactoryOptionFunc(func(o *exporterFactory) {
o.CreateLogsExporterFunc = createLogsExporter
})
return WithLogsExporterAndStabilityLevel(createLogsExporter, StabilityLevelUndefined)
}

// WithLogsExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsExporter and the default "undefined" stability level.
Expand Down
12 changes: 3 additions & 9 deletions component/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ type processorFactory struct {
// WithTracesProcessor overrides the default "error not supported" implementation for CreateTracesProcessor.
// Deprecated: [v0.55.0] Use WithTracesProcessorAndStabilityLevel instead.
func WithTracesProcessor(createTracesProcessor CreateTracesProcessorFunc) ProcessorFactoryOption {
return processorFactoryOptionFunc(func(o *processorFactory) {
o.CreateTracesProcessorFunc = createTracesProcessor
})
return WithTracesProcessorAndStabilityLevel(createTracesProcessor, StabilityLevelUndefined)
}

// WithTracesProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesProcessor and the default "undefined" stability level.
Expand All @@ -197,9 +195,7 @@ func WithTracesProcessorAndStabilityLevel(createTracesProcessor CreateTracesProc
// WithMetricsProcessor overrides the default "error not supported" implementation for CreateMetricsProcessor.
// Deprecated: [v0.55.0] Use WithMetricsProcessorAndStabilityLevel instead.
func WithMetricsProcessor(createMetricsProcessor CreateMetricsProcessorFunc) ProcessorFactoryOption {
return processorFactoryOptionFunc(func(o *processorFactory) {
o.CreateMetricsProcessorFunc = createMetricsProcessor
})
return WithMetricsProcessorAndStabilityLevel(createMetricsProcessor, StabilityLevelUndefined)
}

// WithMetricsProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsProcessor and the default "undefined" stability level.
Expand All @@ -213,9 +209,7 @@ func WithMetricsProcessorAndStabilityLevel(createMetricsProcessor CreateMetricsP
// WithLogsProcessor overrides the default "error not supported" implementation for CreateLogsProcessor.
// Deprecated: [v0.55.0] Use WithLogsProcessorAndStabilityLevel instead.
func WithLogsProcessor(createLogsProcessor CreateLogsProcessorFunc) ProcessorFactoryOption {
return processorFactoryOptionFunc(func(o *processorFactory) {
o.CreateLogsProcessorFunc = createLogsProcessor
})
return WithLogsProcessorAndStabilityLevel(createLogsProcessor, StabilityLevelUndefined)
}

// WithLogsProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsProcessor and the default "undefined" stability level.
Expand Down
12 changes: 3 additions & 9 deletions component/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ type receiverFactory struct {
// WithTracesReceiver overrides the default "error not supported" implementation for CreateTracesReceiver.
// Deprecated: [v0.55.0] Use WithTracesReceiverAndStabilityLevel instead.
func WithTracesReceiver(createTracesReceiver CreateTracesReceiverFunc) ReceiverFactoryOption {
return receiverFactoryOptionFunc(func(o *receiverFactory) {
o.CreateTracesReceiverFunc = createTracesReceiver
})
return WithTracesReceiverAndStabilityLevel(createTracesReceiver, StabilityLevelUndefined)
}

// WithTracesReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesReceiver and the default "undefined" stability level.
Expand All @@ -229,9 +227,7 @@ func WithTracesReceiverAndStabilityLevel(createTracesReceiver CreateTracesReceiv
// WithMetricsReceiver overrides the default "error not supported" implementation for CreateMetricsReceiver.
// Deprecated: [v0.55.0] Use WithMetricsReceiverAndStabilityLevel instead.
func WithMetricsReceiver(createMetricsReceiver CreateMetricsReceiverFunc) ReceiverFactoryOption {
return receiverFactoryOptionFunc(func(o *receiverFactory) {
o.CreateMetricsReceiverFunc = createMetricsReceiver
})
return WithMetricsReceiverAndStabilityLevel(createMetricsReceiver, StabilityLevelUndefined)
}

// WithMetricsReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsReceiver and the default "undefined" stability level.
Expand All @@ -245,9 +241,7 @@ func WithMetricsReceiverAndStabilityLevel(createMetricsReceiver CreateMetricsRec
// WithLogsReceiver overrides the default "error not supported" implementation for CreateLogsReceiver.
// Deprecated: [v0.55.0] Use WithLogsReceiverAndStabilityLevel instead.
func WithLogsReceiver(createLogsReceiver CreateLogsReceiverFunc) ReceiverFactoryOption {
return receiverFactoryOptionFunc(func(o *receiverFactory) {
o.CreateLogsReceiverFunc = createLogsReceiver
})
return WithLogsReceiverAndStabilityLevel(createLogsReceiver, StabilityLevelUndefined)
}

// WithLogsReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsReceiver and the default "undefined" stability level.
Expand Down

0 comments on commit 3e39909

Please sign in to comment.