Skip to content

Conversation

@drdreo
Copy link

@drdreo drdreo commented Dec 17, 2025

Which problem is this PR solving?

Users should be able to capture console logs and export them to OpenTelemetry. This PR adds a browser console method instrumentation which sends them as opentelemetry logs

Fixes #15

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit tests for console logs being sent to the in memory processor as well as the config options were verified in unit tests with edge case testing for the custom serializer failing.

  • Unit tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

OPEN QUESTIONS

what semantic attributes?

  • browser.console for event and browser.console.method for type

severity numberfor log vs info?

  • INFO = 9?

is the traceparent of the current active span enough?

  • from my testing that can get disconnected when the frontend was served by the backend and we could use the traceparent from meta tags

@drdreo drdreo requested a review from a team as a code owner December 17, 2025 21:41
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Co-authored-by: Jared Freeze <overbalance@users.noreply.github.com>
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.

Instrumentation to capture console logs as OTel logs

2 participants