diff --git a/.chloggen/codeboten_rm-deprecated-obsreport1.yaml b/.chloggen/codeboten_rm-deprecated-obsreport1.yaml new file mode 100755 index 00000000000..3f05c46fa0b --- /dev/null +++ b/.chloggen/codeboten_rm-deprecated-obsreport1.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: obsreport + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: remove methods/structs deprecated in previous release. + +# One or more tracking issues or pull requests related to the change +issues: [8492] + +# (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] \ No newline at end of file diff --git a/obsreport/obsreport_exporter.go b/obsreport/obsreport_exporter.go deleted file mode 100644 index 00b06a353fd..00000000000 --- a/obsreport/obsreport_exporter.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/exporter/exporterhelper" - -// Exporter is a helper to add observability to an exporter. -// -// Deprecated: [0.86.0] Use exporterhelper.ObsReport instead. -type Exporter = exporterhelper.ObsReport - -// ExporterSettings are settings for creating an Exporter. -// -// Deprecated: [0.86.0] Use exporterhelper.ObsReportSettings instead. -type ExporterSettings = exporterhelper.ObsReportSettings - -// NewExporter creates a new Exporter. -// -// Deprecated: [0.86.0] Use exporterhelper.New instead. -func NewExporter(cfg ExporterSettings) (*exporterhelper.ObsReport, error) { - return exporterhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_processor.go b/obsreport/obsreport_processor.go deleted file mode 100644 index 8a039c60f6b..00000000000 --- a/obsreport/obsreport_processor.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import ( - "go.opentelemetry.io/collector/processor/processorhelper" -) - -// BuildProcessorCustomMetricName is used to be build a metric name following -// the standards used in the Collector. The configType should be the same -// value used to identify the type on the config. -// -// Deprecated: [0.86.0] Use processorhelper.BuildCustomMetricName instead. -func BuildProcessorCustomMetricName(configType, metric string) string { - return processorhelper.BuildCustomMetricName(configType, metric) -} - -// Processor is a helper to add observability to a processor. -// -// Deprecated: [0.86.0] Use processorhelper.ObsReport instead. -type Processor = processorhelper.ObsReport - -// ProcessorSettings is a helper to add observability to a processor. -// -// Deprecated: [0.86.0] Use processorhelper.ObsReportSettings instead. -type ProcessorSettings = processorhelper.ObsReportSettings - -// NewProcessor creates a new Processor. -// -// Deprecated: [0.86.0] Use processorhelper.NewObsReport instead. -func NewProcessor(cfg ProcessorSettings) (*Processor, error) { - return processorhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_receiver.go b/obsreport/obsreport_receiver.go deleted file mode 100644 index 7d4beacba3c..00000000000 --- a/obsreport/obsreport_receiver.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/receiver/receiverhelper" - -// Receiver is a helper to add observability to a receiver. -// -// Deprecated: [0.86.0] Use receiverhelper.ObsReport instead. -type Receiver = receiverhelper.ObsReport - -// ReceiverSettings are settings for creating an Receiver. -// -// Deprecated: [0.86.0] Use receiverhelper.ObsReportSettings instead. -type ReceiverSettings = receiverhelper.ObsReportSettings - -// NewReceiver creates a new Receiver. -// -// Deprecated: [0.86.0] Use receiverhelper.NewObsReport instead. -func NewReceiver(cfg ReceiverSettings) (*Receiver, error) { - return receiverhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_scraper.go b/obsreport/obsreport_scraper.go deleted file mode 100644 index 58917506c8a..00000000000 --- a/obsreport/obsreport_scraper.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/receiver/scraperhelper" - -// Scraper is a helper to add observability to a scraper. -// -// Deprecated: [0.86.0] Use scraperhelper.ObsReport instead. -type Scraper = scraperhelper.ObsReport - -// ScraperSettings are settings for creating a Scraper. -// -// Deprecated: [0.86.0] Use scraperhelper.ObsReportSettings instead. -type ScraperSettings = scraperhelper.ObsReportSettings - -// NewScraper creates a new Scraper. -// -// Deprecated: [0.86.0] Use scraperhelper.NewObsReport instead. -func NewScraper(cfg ScraperSettings) (*Scraper, error) { - return scraperhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreporttest/obsreporttest.go b/obsreport/obsreporttest/obsreporttest.go index 234018c4d88..7252fb1246a 100644 --- a/obsreport/obsreporttest/obsreporttest.go +++ b/obsreport/obsreporttest/obsreporttest.go @@ -19,10 +19,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/internal/obsreportconfig" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/receiver" ) const ( @@ -50,39 +47,6 @@ type TestTelemetry struct { ocExporter *ocprom.Exporter } -// ToExporterCreateSettings returns an exporter.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.86.0] Use exporter.CreateSettings struct instead. -func (tts *TestTelemetry) ToExporterCreateSettings() exporter.CreateSettings { - return exporter.CreateSettings{ - ID: tts.id, - TelemetrySettings: tts.TelemetrySettings, - BuildInfo: component.NewDefaultBuildInfo(), - } -} - -// ToProcessorCreateSettings returns a processor.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.86.0] Use processor.CreateSettings struct instead. -func (tts *TestTelemetry) ToProcessorCreateSettings() processor.CreateSettings { - return processor.CreateSettings{ - ID: tts.id, - TelemetrySettings: tts.TelemetrySettings, - BuildInfo: component.NewDefaultBuildInfo(), - } -} - -// ToReceiverCreateSettings returns a receiver.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.86.0] Use receiver.CreateSettings struct instead. -func (tts *TestTelemetry) ToReceiverCreateSettings() receiver.CreateSettings { - return receiver.CreateSettings{ - ID: tts.id, - TelemetrySettings: tts.TelemetrySettings, - BuildInfo: component.NewDefaultBuildInfo(), - } -} - // CheckExporterTraces checks that for the current exported values for trace exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckExporterTraces(sentSpans, sendFailedSpans int64) error {