feat(sdk): emit log severity as uppercase (INFO/WARN/ERROR/DEBUG)#302
Open
igoramf wants to merge 1 commit into
Open
feat(sdk): emit log severity as uppercase (INFO/WARN/ERROR/DEBUG)#302igoramf wants to merge 1 commit into
igoramf wants to merge 1 commit into
Conversation
Both the default console-JSON adapter (`level`) and the OTLP direct-POST adapter (`severityText`) were emitting lowercase level strings. Uppercase them so downstream log viewers show INFO/WARN/ERROR/DEBUG consistently. Also uppercases the 4 `warnDirect` boot/exporter breadcrumbs in otel.ts. `severityNumber` (OTLP) unchanged — still 5/9/13/17 per spec. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
nicacioliveira
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
levelfield now uppercase (INFO,WARN,ERROR,DEBUG).severityTextnow uppercase (was lowercase;severityNumberunchanged — still 5/9/13/17 per OTLP spec).otel.tswarnDirectboot/exporter breadcrumbs (observability booted,otlp {metrics,traces,error-log} exporter) now also emit uppercaselevel.Scope
Traces (
status.code) and metrics have no textual severity field — enum-numeric only — so nothing to change there.Test plan
logger.test.ts,otel.test.ts,otelHttpLog.test.tsupdated to assert uppercase.INFO/WARN/ERROR/DEBUG.🤖 Generated with Claude Code
Summary by cubic
Standardizes log severity strings to uppercase (INFO/WARN/ERROR/DEBUG) across the SDK so log viewers display consistent levels.
levelis now uppercase.severityTextis now uppercase;severityNumberunchanged (5/9/13/17).otel.tsboot/exporter breadcrumbs now emit uppercase levels.Written for commit 7ce2771. Summary will update on new commits.