Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkg/stanza] SeverityText is not properly preserved #13263

Closed
BinaryFissionGames opened this issue Aug 12, 2022 · 0 comments · Fixed by #13265
Closed

[pkg/stanza] SeverityText is not properly preserved #13263

BinaryFissionGames opened this issue Aug 12, 2022 · 0 comments · Fixed by #13265
Assignees
Labels

Comments

@BinaryFissionGames
Copy link
Contributor

BinaryFissionGames commented Aug 12, 2022

Describe the bug
SeverityText is held on the stanza entry, but during conversion, is dropped for a SeverityText derived from the SeverityNumber.

Steps to reproduce
Using the following config:

Config
receivers:
  filelog:
    include:
      - local/test.log
    start_at: beginning
    operators:
      - type: regex_parser
        regex: '^(?P<severity>\w+) .*$'
        severity:
          parse_from: attributes.severity
          mapping:
            info: "INFO_SEVERITY"

exporters:
  logging:
    loglevel: debug

service:
  pipelines:
    logs:
      receivers: [filelog]
      exporters: [logging]
  telemetry:
    metrics:
      level: none
Sample Log
INFO_SEVERITY this is some info

What did you expect to see?
I expect SeverityText on the emitted log record to be "INFO_SEVERITY"

What did you see instead?
The SeverityText is "Info"

What version did you use?
Version: 73b3ae5

Additional context
The severity text is preserved on the stanza entry, but is not mapped to the OTel entry:

dest.SetSeverityText(sevTextMap[ent.Severity])

@BinaryFissionGames BinaryFissionGames added the bug Something isn't working label Aug 12, 2022
@BinaryFissionGames BinaryFissionGames changed the title [pkg/stanza] SeverityText is not properly perserved [pkg/stanza] SeverityText is not properly preserved Aug 12, 2022
@djaglowski djaglowski self-assigned this Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants