Skip to content

Commit

Permalink
chore: minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-k-singh committed Sep 19, 2024
1 parent 1a3a4ef commit 4a089c3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions processor/signozlogspipelineprocessor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestSignozLogPipelineWithRouterOp(t *testing.T) {
validateProcessorBehavior(t, confYaml, input, expectedOutput)
}

// logstransform in otel-collector-contrib
// logstransform in otel-collector-contrib doesn't support using severity text and number in route expressions
func TestSeverityBasedRouteExpressions(t *testing.T) {
for _, routeExpr := range []string{
`severity_number == 9`,
Expand Down Expand Up @@ -341,8 +341,14 @@ func TestSeverityBasedRouteExpressions(t *testing.T) {
validateProcessorBehavior(t, confYaml, input, expectedOutput)

// should ignore non-matching log
input = []plog.Logs{makePlog("test log", map[string]any{})}
expectedOutput = []plog.Logs{makePlog("test log", map[string]any{})}
input = []plog.Logs{makePlogWithTopLevelFields(
t, "test log", map[string]any{},
map[string]any{"severity_text": "ERROR", "severity_number": 17},
)}
expectedOutput = []plog.Logs{makePlogWithTopLevelFields(
t, "test log", map[string]any{},
map[string]any{"severity_text": "ERROR", "severity_number": 17},
)}
validateProcessorBehavior(t, confYaml, input, expectedOutput)
}
}
Expand Down

0 comments on commit 4a089c3

Please sign in to comment.