Skip to content

Commit

Permalink
Remove deprecated funcs from processorhelper (#11404)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
  • Loading branch information
bogdandrutu and codeboten authored Oct 9, 2024
1 parent 5ac1607 commit 6169e51
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 75 deletions.
25 changes: 25 additions & 0 deletions .chloggen/rm-deprecated-prochelper.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: processorhelper

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated funcs/types from processorhelper & componenttest

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

# (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]
15 changes: 0 additions & 15 deletions component/componenttest/obsreporttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ func (tts *TestTelemetry) CheckExporterMetricGauge(metric string, val int64, ext
return checkIntGauge(tts.reader, metric, val, attrs)
}

// Deprecated: [v0.111.0] deleted metrics, no-op.
func (tts *TestTelemetry) CheckProcessorTraces(_, _, _ int64) error {
return nil
}

// Deprecated: [v0.111.0] deleted metrics, no-op.
func (tts *TestTelemetry) CheckProcessorMetrics(_, _, _ int64) error {
return nil
}

// Deprecated: [v0.111.0] deleted metrics, no-op.
func (tts *TestTelemetry) CheckProcessorLogs(_, _, _ int64) error {
return nil
}

// CheckReceiverTraces checks that for the current exported values for trace receiver metrics match given values.
// Note: SetupTelemetry must be called before this function.
func (tts *TestTelemetry) CheckReceiverTraces(protocol string, acceptedSpans, droppedSpans int64) error {
Expand Down
28 changes: 0 additions & 28 deletions processor/processorhelper/obsreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ package processorhelper // import "go.opentelemetry.io/collector/processor/proce

import (
"context"
"strings"

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/pipeline"
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/collector/processor/internal"
Expand All @@ -19,32 +17,6 @@ import (

const signalKey = "otel.signal"

// Deprecated: [v0.111.0] no longer needed. To be removed in future.
func BuildCustomMetricName(configType, metric string) string {
componentPrefix := internal.ProcessorMetricPrefix
if !strings.HasSuffix(componentPrefix, internal.MetricNameSep) {
componentPrefix += internal.MetricNameSep
}
if configType == "" {
return componentPrefix
}
return componentPrefix + configType + internal.MetricNameSep + metric
}

// Deprecated: [v0.111.0] not used.
type ObsReport struct{}

// Deprecated: [v0.111.0] not used.
type ObsReportSettings struct {
ProcessorID component.ID
ProcessorCreateSettings processor.Settings
}

// Deprecated: [v0.111.0] not used.
func NewObsReport(_ ObsReportSettings) (*ObsReport, error) {
return &ObsReport{}, nil
}

type obsReport struct {
otelAttrs metric.MeasurementOption
telemetryBuilder *metadata.TelemetryBuilder
Expand Down
32 changes: 0 additions & 32 deletions processor/processorhelper/obsreport_test.go

This file was deleted.

0 comments on commit 6169e51

Please sign in to comment.