Skip to content

Commit

Permalink
fixed constants
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-tim-sumo committed Jun 13, 2024
1 parent a48f8ff commit b915664
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ import (
"regexp"

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.uber.org/zap"

"github.com/SumoLogic/sumologic-otel-collector/pkg/processor/cascadingfilterprocessor/config"
)

const (
StatusCodeError = "Error"
StatusCodeOk = "Ok"
StatusCodeUnset = "Unset"
)

type dropTraceEvaluator struct {
numericAttr *numericAttributeFilter
stringAttr *stringAttributeFilter
Expand All @@ -45,7 +40,11 @@ func validateStatusCode(statusCode *string) error {
return nil
}

validStatusCodes := []string{StatusCodeError, StatusCodeOk, StatusCodeUnset}
validStatusCodes := []string{
ptrace.StatusCodeError.String(),
ptrace.StatusCodeOk.String(),
ptrace.StatusCodeUnset.String(),
}

for _, valid := range validStatusCodes {
if *statusCode == valid {
Expand Down

0 comments on commit b915664

Please sign in to comment.