telemetry: log records emitted without SeverityText

Open Beginner friendly
#132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go

Research direction

The severity is handled by the r.log helper in telemetry/log.go; start there and inspect how Recorder.Info and Recorder.Error reach it. Ensure emitted records contain matching numeric and text severity fields, then verify the record exposes both values.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Go
Stars
0
Forks
0
Avg merge
7m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dogmatiq/enginekit

All issues in dogmatiq/enginekit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.