Skip to content

fix(ext/telemetry): add log.iostream attribute to console logs#32723

Merged
bartlomieju merged 1 commit intodenoland:mainfrom
bartlomieju:fix/otel-log-iostream
Mar 15, 2026
Merged

fix(ext/telemetry): add log.iostream attribute to console logs#32723
bartlomieju merged 1 commit intodenoland:mainfrom
bartlomieju:fix/otel-log-iostream

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Summary

  • Add log.iostream semantic convention attribute to OTel log records from console methods
  • console.warn / console.errorlog.iostream: "stderr"
  • console.log / console.info / console.debug / console.tracelog.iostream: "stdout"
  • Applied to both op_otel_log and op_otel_log_foreign code paths

Per the OTel semantic conventions.

Closes #27910

Test plan

  • Updated all existing .out test expectations for the new attribute
  • All previously passing otel_basic tests still pass

🤖 Generated with Claude Code

Add the `log.iostream` semantic convention attribute to OpenTelemetry
log records emitted from console methods. `console.warn` and
`console.error` get `log.iostream: "stderr"`, all others get `"stdout"`.

https://opentelemetry.io/docs/specs/semconv/attributes-registry/log/#log-iostream

Closes denoland#27910

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@kajukitli kajukitli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes with full repo context. No issues found.

@bartlomieju bartlomieju merged commit 2989e30 into denoland:main Mar 15, 2026
112 checks passed
@bartlomieju bartlomieju deleted the fix/otel-log-iostream branch March 15, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[otel] add log.iostream attribute to console.log logs

3 participants