From 887d33a226f2974e3c68d2cc5f537af6153d3d05 Mon Sep 17 00:00:00 2001 From: Tim Chan Date: Thu, 13 Jun 2024 07:59:18 -0700 Subject: [PATCH] replaced constant --- pkg/processor/cascadingfilterprocessor/config_test.go | 3 ++- .../cascadingfilterprocessor/sampling/drop_trace_factory.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/processor/cascadingfilterprocessor/config_test.go b/pkg/processor/cascadingfilterprocessor/config_test.go index 00ca794c7a..10b3eeeb9e 100644 --- a/pkg/processor/cascadingfilterprocessor/config_test.go +++ b/pkg/processor/cascadingfilterprocessor/config_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/otelcol/otelcoltest" + "go.opentelemetry.io/collector/pdata/ptrace" cfconfig "github.com/SumoLogic/sumologic-otel-collector/pkg/processor/cascadingfilterprocessor/config" ) @@ -45,7 +46,7 @@ func TestLoadConfig(t *testing.T) { probFilteringRate := int32(100) namePatternValue := "foo.*" healthCheckNamePatternValue := "health.*" - statusCode := "Error" + statusCode := ptrace.StatusCodeError.String() id1 := component.NewIDWithName(Type, "1") assert.Equal(t, cfg.Processors[id1], diff --git a/pkg/processor/cascadingfilterprocessor/sampling/drop_trace_factory.go b/pkg/processor/cascadingfilterprocessor/sampling/drop_trace_factory.go index 9ae35a698d..6b695a07cc 100644 --- a/pkg/processor/cascadingfilterprocessor/sampling/drop_trace_factory.go +++ b/pkg/processor/cascadingfilterprocessor/sampling/drop_trace_factory.go @@ -52,7 +52,7 @@ func validateStatusCode(statusCode *string) error { } } - return errors.New("Invalid status code: must be one of 'Error', 'Ok', or 'Unset' ") + return errors.New("invalid status code: must be one of 'Error', 'Ok', or 'Unset' ") } var _ DropTraceEvaluator = (*dropTraceEvaluator)(nil)