Skip to content

telemetry: log records emitted without SeverityText #132

@jmalloc

Description

@jmalloc

The Recorder.Info and Recorder.Error methods in telemetry/log.go call r.log(ctx, log.SeverityInfo, ...) and r.log(ctx, log.SeverityError, ...), which sets SeverityNumber on the record but leaves SeverityText empty.

The OTel log data model has both fields for a reason — SeverityNumber is the normalized enum used for querying and filtering, while SeverityText is the human-readable label displayed by backends. Display tooling (e.g. BetterStack) renders the text field as the level badge and ignores the number for display purposes.

Since we choose the severity directly, both fields should always be set together:

rec.SetSeverity(severity)
rec.SetSeverityText(severity.String())

The fix belongs in the r.log helper in telemetry/log.go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions