Skip to content

Additional severity range applicable to logs with missing severity level #4478

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

Open
Vincehood opened this issue Apr 10, 2025 · 5 comments · May be fixed by #4535
Open

Additional severity range applicable to logs with missing severity level #4478

Vincehood opened this issue Apr 10, 2025 · 5 comments · May be fixed by #4535
Assignees
Labels
spec:logs Related to the specification/logs directory triage:accepted:ready-with-sponsor Ready to be implemented and has a specification sponsor assigned

Comments

@Vincehood
Copy link

Vincehood commented Apr 10, 2025

What are you trying to achieve?

Make it possible to map logs that lack severityText and severityValue values (which is, of course, not the wanted position) to have a more usable initial default mapping until some proper log processing/re-formatting is in place.
The OpenTelemetry spec hints at the usage of INFO level in these situations (see https://opentelemetry.io/docs/specs/otel/logs/data-model/#mapping-of-severitynumber) . From a usability perspective, associating an INFO level to a log with a message indicating a critical error is not the best option and may lead to wrong conclusions.

What did you expect to see?

The OpenTelemetry spec should include an "UNKNOWN" range associated to severityValue 0. This could be used to apply a more usable raw default mapping for logs missing a severity level.

@Vincehood Vincehood added the spec:logs Related to the specification/logs directory label Apr 10, 2025
@mx-psi mx-psi added the triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted label Apr 14, 2025
@mx-psi mx-psi added this to Logs SIG Apr 14, 2025
@pellared
Copy link
Member

I support this proposal. This is what we do in OTel Go:

I wouldn't be surprised if this is something that all languages are already doing.

@github-actions github-actions bot added the triage:followup Needs follow up during triage label Apr 29, 2025
@mx-psi mx-psi added triage:accepted:ready-with-sponsor Ready to be implemented and has a specification sponsor assigned and removed triage:followup Needs follow up during triage triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted labels May 5, 2025
@mx-psi
Copy link
Member

mx-psi commented May 5, 2025

Marking as ready with sponsor with @pellared as the sponsor per offline conversation

@pellared
Copy link
Member

pellared commented May 5, 2025

@Vincehood, do you want to contribute to the specification yourself?

I think that we can add explicitly 0 (usnet) value to the the table.

However, I am unsure if we need/want to change the sentence below given it is not normative and it just represents an optional interpretation.

Backend and UI may represent log records with missing severity information distinctly or may interpret log records with missing SeverityNumber and SeverityText fields as if the SeverityNumber was set equal to INFO (numeric value of 9).

peffis added a commit to peffis/opentelemetry-specification that referenced this issue May 5, 2025
…0 in the

specification with the meaning "UNDEFINED"
@Vincehood
Copy link
Author

Hi! Sounds great. My team mate @peffis already created a PR.
Thanks

@pellared pellared moved this to Todo in Logs SIG May 6, 2025
@pellared pellared self-assigned this May 6, 2025
@jpkrohling jpkrohling moved this to Spec - Accepted in Specification + OTEPs May 12, 2025
@pellared
Copy link
Member

The OpenTelemetry spec should include an "UNKNOWN" range associated to severityValue 0. This could be used to apply a more usable raw default mapping for logs missing a severity level.

@Vincehood, This looks is against the original intend of the Logs spec authors.
The authors also say that the intend was that 1..24 should be the only allowed values (and unset) from the API perspective.

Please see the discussion under #4509

@pellared pellared linked a pull request Jun 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:logs Related to the specification/logs directory triage:accepted:ready-with-sponsor Ready to be implemented and has a specification sponsor assigned
Projects
Status: Todo
Status: Spec - Accepted
3 participants