Skip to content

Commit

Permalink
feat: Report all @Level:error log events as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Sep 9, 2022
1 parent d307874 commit ec4835b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func (s *TelemetryLogStream) WriteMessage(msg string) error {
continue
}

if k == "@level" && v == "error" {
span.SetStatus(codes.Error, toString(props["@message"]))
continue
}

switch v := v.(type) {
case string:
properties = append(properties, attribute.String(k, v))
Expand Down

0 comments on commit ec4835b

Please sign in to comment.