diff --git a/.chloggen/main.yaml b/.chloggen/main.yaml new file mode 100644 index 00000000000..506af46bb8c --- /dev/null +++ b/.chloggen/main.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: processorhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Remove deprecated `[Traces|Metrics|Logs]`Inserted funcs" + +# One or more tracking issues or pull requests related to the change +issues: [11151] + +# (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: [] diff --git a/component/componenttest/obsreporttest.go b/component/componenttest/obsreporttest.go index 9e780315017..3662c640671 100644 --- a/component/componenttest/obsreporttest.go +++ b/component/componenttest/obsreporttest.go @@ -82,20 +82,20 @@ func (tts *TestTelemetry) CheckExporterMetricGauge(metric string, val int64, ext // CheckProcessorTraces checks that for the current exported values for trace exporter metrics match given values. // Note: SetupTelemetry must be called before this function. -func (tts *TestTelemetry) CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans, insertedSpans int64) error { - return tts.prometheusChecker.checkProcessorTraces(tts.id, acceptedSpans, refusedSpans, droppedSpans, insertedSpans) +func (tts *TestTelemetry) CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans int64) error { + return tts.prometheusChecker.checkProcessorTraces(tts.id, acceptedSpans, refusedSpans, droppedSpans) } // CheckProcessorMetrics checks that for the current exported values for metrics exporter metrics match given values. // Note: SetupTelemetry must be called before this function. -func (tts *TestTelemetry) CheckProcessorMetrics(acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints, insertedMetricPoints int64) error { - return tts.prometheusChecker.checkProcessorMetrics(tts.id, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints, insertedMetricPoints) +func (tts *TestTelemetry) CheckProcessorMetrics(acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints int64) error { + return tts.prometheusChecker.checkProcessorMetrics(tts.id, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints) } // CheckProcessorLogs checks that for the current exported values for logs exporter metrics match given values. // Note: SetupTelemetry must be called before this function. -func (tts *TestTelemetry) CheckProcessorLogs(acceptedLogRecords, refusedLogRecords, droppedLogRecords, insertedLogRecords int64) error { - return tts.prometheusChecker.checkProcessorLogs(tts.id, acceptedLogRecords, refusedLogRecords, droppedLogRecords, insertedLogRecords) +func (tts *TestTelemetry) CheckProcessorLogs(acceptedLogRecords, refusedLogRecords, droppedLogRecords int64) error { + return tts.prometheusChecker.checkProcessorLogs(tts.id, acceptedLogRecords, refusedLogRecords, droppedLogRecords) } // CheckReceiverTraces checks that for the current exported values for trace receiver metrics match given values. diff --git a/component/componenttest/otelprometheuschecker.go b/component/componenttest/otelprometheuschecker.go index 6a63617c206..14b357b9704 100644 --- a/component/componenttest/otelprometheuschecker.go +++ b/component/componenttest/otelprometheuschecker.go @@ -48,25 +48,24 @@ func (pc *prometheusChecker) checkReceiver(receiver component.ID, datatype, prot pc.checkCounter(fmt.Sprintf("receiver_refused_%s", datatype), droppedMetricPoints, receiverAttrs)) } -func (pc *prometheusChecker) checkProcessorTraces(processor component.ID, accepted, refused, dropped, inserted int64) error { - return pc.checkProcessor(processor, "spans", accepted, refused, dropped, inserted) +func (pc *prometheusChecker) checkProcessorTraces(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "spans", accepted, refused, dropped) } -func (pc *prometheusChecker) checkProcessorMetrics(processor component.ID, accepted, refused, dropped, inserted int64) error { - return pc.checkProcessor(processor, "metric_points", accepted, refused, dropped, inserted) +func (pc *prometheusChecker) checkProcessorMetrics(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "metric_points", accepted, refused, dropped) } -func (pc *prometheusChecker) checkProcessorLogs(processor component.ID, accepted, refused, dropped, inserted int64) error { - return pc.checkProcessor(processor, "log_records", accepted, refused, dropped, inserted) +func (pc *prometheusChecker) checkProcessorLogs(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "log_records", accepted, refused, dropped) } -func (pc *prometheusChecker) checkProcessor(processor component.ID, datatype string, accepted, refused, dropped, inserted int64) error { +func (pc *prometheusChecker) checkProcessor(processor component.ID, datatype string, accepted, refused, dropped int64) error { processorAttrs := attributesForProcessorMetrics(processor) return multierr.Combine( pc.checkCounter(fmt.Sprintf("processor_accepted_%s", datatype), accepted, processorAttrs), pc.checkCounter(fmt.Sprintf("processor_refused_%s", datatype), refused, processorAttrs), pc.checkCounter(fmt.Sprintf("processor_dropped_%s", datatype), dropped, processorAttrs), - pc.checkCounter(fmt.Sprintf("processor_inserted_%s", datatype), inserted, processorAttrs), ) } diff --git a/component/componenttest/otelprometheuschecker_test.go b/component/componenttest/otelprometheuschecker_test.go index a2efb109355..d7176134f54 100644 --- a/component/componenttest/otelprometheuschecker_test.go +++ b/component/componenttest/otelprometheuschecker_test.go @@ -88,17 +88,17 @@ func TestPromChecker(t *testing.T) { ) assert.NoError(t, - pc.checkProcessorTraces(processor, 42, 13, 7, 5), + pc.checkProcessorTraces(processor, 42, 13, 7), "metrics from Receiver Traces should be valid", ) assert.NoError(t, - pc.checkProcessorMetrics(processor, 7, 41, 13, 4), + pc.checkProcessorMetrics(processor, 7, 41, 13), "metrics from Receiver Metrics should be valid", ) assert.NoError(t, - pc.checkProcessorLogs(processor, 102, 35, 14, 3), + pc.checkProcessorLogs(processor, 102, 35, 14), "metrics from Receiver Logs should be valid", ) diff --git a/processor/processorhelper/documentation.md b/processor/processorhelper/documentation.md index e14bbbd779c..0b82255410f 100644 --- a/processor/processorhelper/documentation.md +++ b/processor/processorhelper/documentation.md @@ -78,30 +78,6 @@ Number of spans passed to the processor. | ---- | ----------- | ---------- | --------- | | {spans} | Sum | Int | true | -### otelcol_processor_inserted_log_records - -Number of log records that were inserted. - -| Unit | Metric Type | Value Type | Monotonic | -| ---- | ----------- | ---------- | --------- | -| {records} | Sum | Int | true | - -### otelcol_processor_inserted_metric_points - -Number of metric points that were inserted. - -| Unit | Metric Type | Value Type | Monotonic | -| ---- | ----------- | ---------- | --------- | -| {datapoints} | Sum | Int | true | - -### otelcol_processor_inserted_spans - -Number of spans that were inserted. - -| Unit | Metric Type | Value Type | Monotonic | -| ---- | ----------- | ---------- | --------- | -| {spans} | Sum | Int | true | - ### otelcol_processor_outgoing_log_records Number of log records emitted from the processor. diff --git a/processor/processorhelper/internal/metadata/generated_telemetry.go b/processor/processorhelper/internal/metadata/generated_telemetry.go index 31b15261a2f..11a7a86ee4b 100644 --- a/processor/processorhelper/internal/metadata/generated_telemetry.go +++ b/processor/processorhelper/internal/metadata/generated_telemetry.go @@ -38,9 +38,6 @@ type TelemetryBuilder struct { ProcessorIncomingLogRecords metric.Int64Counter ProcessorIncomingMetricPoints metric.Int64Counter ProcessorIncomingSpans metric.Int64Counter - ProcessorInsertedLogRecords metric.Int64Counter - ProcessorInsertedMetricPoints metric.Int64Counter - ProcessorInsertedSpans metric.Int64Counter ProcessorOutgoingLogRecords metric.Int64Counter ProcessorOutgoingMetricPoints metric.Int64Counter ProcessorOutgoingSpans metric.Int64Counter @@ -116,24 +113,6 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme metric.WithUnit("{spans}"), ) errs = errors.Join(errs, err) - builder.ProcessorInsertedLogRecords, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( - "otelcol_processor_inserted_log_records", - metric.WithDescription("Number of log records that were inserted."), - metric.WithUnit("{records}"), - ) - errs = errors.Join(errs, err) - builder.ProcessorInsertedMetricPoints, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( - "otelcol_processor_inserted_metric_points", - metric.WithDescription("Number of metric points that were inserted."), - metric.WithUnit("{datapoints}"), - ) - errs = errors.Join(errs, err) - builder.ProcessorInsertedSpans, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( - "otelcol_processor_inserted_spans", - metric.WithDescription("Number of spans that were inserted."), - metric.WithUnit("{spans}"), - ) - errs = errors.Join(errs, err) builder.ProcessorOutgoingLogRecords, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( "otelcol_processor_outgoing_log_records", metric.WithDescription("Number of log records emitted from the processor."), diff --git a/processor/processorhelper/metadata.yaml b/processor/processorhelper/metadata.yaml index 9f6d1731f85..b9ead8f95f4 100644 --- a/processor/processorhelper/metadata.yaml +++ b/processor/processorhelper/metadata.yaml @@ -82,14 +82,6 @@ telemetry: value_type: int monotonic: true - processor_inserted_spans: - enabled: true - description: Number of spans that were inserted. - unit: "{spans}" - sum: - value_type: int - monotonic: true - processor_accepted_metric_points: enabled: true description: Number of metric points successfully pushed into the next component in the pipeline. @@ -114,14 +106,6 @@ telemetry: value_type: int monotonic: true - processor_inserted_metric_points: - enabled: true - description: Number of metric points that were inserted. - unit: "{datapoints}" - sum: - value_type: int - monotonic: true - processor_accepted_log_records: enabled: true description: Number of log records successfully pushed into the next component in the pipeline. @@ -145,11 +129,3 @@ telemetry: sum: value_type: int monotonic: true - - processor_inserted_log_records: - enabled: true - description: Number of log records that were inserted. - unit: "{records}" - sum: - value_type: int - monotonic: true diff --git a/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index 158b590cfc4..d8fffafaf94 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -78,94 +78,69 @@ func (or *ObsReport) recordInOut(ctx context.Context, dataType component.DataTyp outgoingCount.Add(ctx, int64(outgoing), metric.WithAttributes(or.otelAttrs...)) } -func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType, accepted, refused, dropped, inserted int64) { - var acceptedCount, refusedCount, droppedCount, insertedCount metric.Int64Counter +func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { + var acceptedCount, refusedCount, droppedCount metric.Int64Counter switch dataType { case component.DataTypeTraces: acceptedCount = or.telemetryBuilder.ProcessorAcceptedSpans refusedCount = or.telemetryBuilder.ProcessorRefusedSpans droppedCount = or.telemetryBuilder.ProcessorDroppedSpans - insertedCount = or.telemetryBuilder.ProcessorInsertedSpans case component.DataTypeMetrics: acceptedCount = or.telemetryBuilder.ProcessorAcceptedMetricPoints refusedCount = or.telemetryBuilder.ProcessorRefusedMetricPoints droppedCount = or.telemetryBuilder.ProcessorDroppedMetricPoints - insertedCount = or.telemetryBuilder.ProcessorInsertedMetricPoints case component.DataTypeLogs: acceptedCount = or.telemetryBuilder.ProcessorAcceptedLogRecords refusedCount = or.telemetryBuilder.ProcessorRefusedLogRecords droppedCount = or.telemetryBuilder.ProcessorDroppedLogRecords - insertedCount = or.telemetryBuilder.ProcessorInsertedLogRecords } acceptedCount.Add(ctx, accepted, metric.WithAttributes(or.otelAttrs...)) refusedCount.Add(ctx, refused, metric.WithAttributes(or.otelAttrs...)) droppedCount.Add(ctx, dropped, metric.WithAttributes(or.otelAttrs...)) - insertedCount.Add(ctx, inserted, metric.WithAttributes(or.otelAttrs...)) } // TracesAccepted reports that the trace data was accepted. func (or *ObsReport) TracesAccepted(ctx context.Context, numSpans int) { - or.recordData(ctx, component.DataTypeTraces, int64(numSpans), int64(0), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeTraces, int64(numSpans), int64(0), int64(0)) } // TracesRefused reports that the trace data was refused. func (or *ObsReport) TracesRefused(ctx context.Context, numSpans int) { - or.recordData(ctx, component.DataTypeTraces, int64(0), int64(numSpans), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeTraces, int64(0), int64(numSpans), int64(0)) } // TracesDropped reports that the trace data was dropped. func (or *ObsReport) TracesDropped(ctx context.Context, numSpans int) { - or.recordData(ctx, component.DataTypeTraces, int64(0), int64(0), int64(numSpans), int64(0)) -} - -// TracesInserted reports that the trace data was inserted. -// -// Deprecated: [v0.109.0] This method was not used in core/contrib and it's unclear when it should have been used. -func (or *ObsReport) TracesInserted(ctx context.Context, numSpans int) { - or.recordData(ctx, component.DataTypeTraces, int64(0), int64(0), int64(0), int64(numSpans)) + or.recordData(ctx, component.DataTypeTraces, int64(0), int64(0), int64(numSpans)) } // MetricsAccepted reports that the metrics were accepted. func (or *ObsReport) MetricsAccepted(ctx context.Context, numPoints int) { - or.recordData(ctx, component.DataTypeMetrics, int64(numPoints), int64(0), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeMetrics, int64(numPoints), int64(0), int64(0)) } // MetricsRefused reports that the metrics were refused. func (or *ObsReport) MetricsRefused(ctx context.Context, numPoints int) { - or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(numPoints), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(numPoints), int64(0)) } // MetricsDropped reports that the metrics were dropped. func (or *ObsReport) MetricsDropped(ctx context.Context, numPoints int) { - or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(0), int64(numPoints), int64(0)) -} - -// MetricsInserted reports that the metrics were inserted. -// -// Deprecated: [v0.109.0] This method was not used in core/contrib and it's unclear when it should have been used. -func (or *ObsReport) MetricsInserted(ctx context.Context, numPoints int) { - or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(0), int64(0), int64(numPoints)) + or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(0), int64(numPoints)) } // LogsAccepted reports that the logs were accepted. func (or *ObsReport) LogsAccepted(ctx context.Context, numRecords int) { - or.recordData(ctx, component.DataTypeLogs, int64(numRecords), int64(0), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeLogs, int64(numRecords), int64(0), int64(0)) } // LogsRefused reports that the logs were refused. func (or *ObsReport) LogsRefused(ctx context.Context, numRecords int) { - or.recordData(ctx, component.DataTypeLogs, int64(0), int64(numRecords), int64(0), int64(0)) + or.recordData(ctx, component.DataTypeLogs, int64(0), int64(numRecords), int64(0)) } // LogsDropped reports that the logs were dropped. func (or *ObsReport) LogsDropped(ctx context.Context, numRecords int) { - or.recordData(ctx, component.DataTypeLogs, int64(0), int64(0), int64(numRecords), int64(0)) -} - -// LogsInserted reports that the logs were inserted. -// -// Deprecated: [v0.109.0] This method was not used in core/contrib and it's unclear when it should have been used. -func (or *ObsReport) LogsInserted(ctx context.Context, numRecords int) { - or.recordData(ctx, component.DataTypeLogs, int64(0), int64(0), int64(0), int64(numRecords)) + or.recordData(ctx, component.DataTypeLogs, int64(0), int64(0), int64(numRecords)) } diff --git a/processor/processorhelper/obsreport_test.go b/processor/processorhelper/obsreport_test.go index f48b6739ef0..6b8aa846e8c 100644 --- a/processor/processorhelper/obsreport_test.go +++ b/processor/processorhelper/obsreport_test.go @@ -27,7 +27,6 @@ func TestProcessorTraceData(t *testing.T) { const acceptedSpans = 27 const refusedSpans = 19 const droppedSpans = 13 - const insertedSpans = 5 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, @@ -37,9 +36,8 @@ func TestProcessorTraceData(t *testing.T) { obsrep.TracesAccepted(context.Background(), acceptedSpans) obsrep.TracesRefused(context.Background(), refusedSpans) obsrep.TracesDropped(context.Background(), droppedSpans) - obsrep.TracesInserted(context.Background(), insertedSpans) - require.NoError(t, tt.CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans, insertedSpans)) + require.NoError(t, tt.CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans)) }) } @@ -48,7 +46,6 @@ func TestProcessorMetricsData(t *testing.T) { const acceptedPoints = 29 const refusedPoints = 11 const droppedPoints = 17 - const insertedPoints = 4 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, @@ -58,9 +55,8 @@ func TestProcessorMetricsData(t *testing.T) { obsrep.MetricsAccepted(context.Background(), acceptedPoints) obsrep.MetricsRefused(context.Background(), refusedPoints) obsrep.MetricsDropped(context.Background(), droppedPoints) - obsrep.MetricsInserted(context.Background(), insertedPoints) - require.NoError(t, tt.CheckProcessorMetrics(acceptedPoints, refusedPoints, droppedPoints, insertedPoints)) + require.NoError(t, tt.CheckProcessorMetrics(acceptedPoints, refusedPoints, droppedPoints)) }) } @@ -91,7 +87,6 @@ func TestProcessorLogRecords(t *testing.T) { const acceptedRecords = 29 const refusedRecords = 11 const droppedRecords = 17 - const insertedRecords = 3 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, @@ -101,9 +96,8 @@ func TestProcessorLogRecords(t *testing.T) { obsrep.LogsAccepted(context.Background(), acceptedRecords) obsrep.LogsRefused(context.Background(), refusedRecords) obsrep.LogsDropped(context.Background(), droppedRecords) - obsrep.LogsInserted(context.Background(), insertedRecords) - require.NoError(t, tt.CheckProcessorLogs(acceptedRecords, refusedRecords, droppedRecords, insertedRecords)) + require.NoError(t, tt.CheckProcessorLogs(acceptedRecords, refusedRecords, droppedRecords)) }) } @@ -121,24 +115,19 @@ func TestCheckProcessorTracesViews(t *testing.T) { por.TracesAccepted(context.Background(), 7) por.TracesRefused(context.Background(), 8) por.TracesDropped(context.Background(), 9) - por.TracesInserted(context.Background(), 10) - - assert.NoError(t, tt.CheckProcessorTraces(7, 8, 9, 10)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorTraces(7, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorTraces(7, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 9, 10)) + + assert.NoError(t, tt.CheckProcessorTraces(7, 8, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(0, 8, 0)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 8, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 0, 9)) + assert.Error(t, tt.CheckProcessorTraces(7, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(0, 8, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 8, 0)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 9)) } func TestCheckProcessorMetricsViews(t *testing.T) { @@ -155,24 +144,19 @@ func TestCheckProcessorMetricsViews(t *testing.T) { por.MetricsAccepted(context.Background(), 7) por.MetricsRefused(context.Background(), 8) por.MetricsDropped(context.Background(), 9) - por.MetricsInserted(context.Background(), 10) - - assert.NoError(t, tt.CheckProcessorMetrics(7, 8, 9, 10)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorMetrics(7, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorMetrics(7, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 9, 10)) + + assert.NoError(t, tt.CheckProcessorMetrics(7, 8, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 8, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 0, 9)) + assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(0, 8, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9)) } func TestCheckProcessorLogViews(t *testing.T) { @@ -189,24 +173,19 @@ func TestCheckProcessorLogViews(t *testing.T) { por.LogsAccepted(context.Background(), 7) por.LogsRefused(context.Background(), 8) por.LogsDropped(context.Background(), 9) - por.LogsInserted(context.Background(), 10) - - assert.NoError(t, tt.CheckProcessorLogs(7, 8, 9, 10)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorLogs(7, 8, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 9, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 0, 10)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorLogs(7, 8, 9, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 8, 0, 10)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 9, 10)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 9, 10)) + + assert.NoError(t, tt.CheckProcessorLogs(7, 8, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(0, 8, 0)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 8, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 0, 9)) + assert.Error(t, tt.CheckProcessorLogs(7, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(0, 8, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 8, 0)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 9)) } func TestNoMetrics(t *testing.T) { @@ -215,7 +194,6 @@ func TestNoMetrics(t *testing.T) { const accepted = 29 const refused = 11 const dropped = 17 - const inserted = 5 set := tt.TelemetrySettings() set.LeveledMeterProvider = func(_ configtelemetry.Level) metric.MeterProvider { @@ -231,15 +209,13 @@ func TestNoMetrics(t *testing.T) { por.TracesAccepted(context.Background(), accepted) por.TracesRefused(context.Background(), refused) por.TracesDropped(context.Background(), dropped) - por.TracesInserted(context.Background(), inserted) - require.Error(t, tt.CheckProcessorTraces(accepted, refused, dropped, inserted)) + require.Error(t, tt.CheckProcessorTraces(accepted, refused, dropped)) }) testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { const accepted = 29 const refused = 11 const dropped = 17 - const inserted = 4 set := tt.TelemetrySettings() set.LeveledMeterProvider = func(_ configtelemetry.Level) metric.MeterProvider { @@ -255,15 +231,13 @@ func TestNoMetrics(t *testing.T) { por.MetricsAccepted(context.Background(), accepted) por.MetricsRefused(context.Background(), refused) por.MetricsDropped(context.Background(), dropped) - por.MetricsInserted(context.Background(), inserted) - require.Error(t, tt.CheckProcessorMetrics(accepted, refused, dropped, inserted)) + require.Error(t, tt.CheckProcessorMetrics(accepted, refused, dropped)) }) testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { const accepted = 29 const refused = 11 const dropped = 17 - const inserted = 3 set := tt.TelemetrySettings() set.LeveledMeterProvider = func(_ configtelemetry.Level) metric.MeterProvider { @@ -279,9 +253,8 @@ func TestNoMetrics(t *testing.T) { por.LogsAccepted(context.Background(), accepted) por.LogsRefused(context.Background(), refused) por.LogsDropped(context.Background(), dropped) - por.LogsInserted(context.Background(), inserted) - require.Error(t, tt.CheckProcessorLogs(accepted, refused, dropped, inserted)) + require.Error(t, tt.CheckProcessorLogs(accepted, refused, dropped)) }) }