Record console.log/debug programmatically #14121
mike-shtil-loop
started this conversation in
Features / New SDKs (Integrations) / Ideas
Replies: 1 comment 3 replies
-
Would breadcrumbs work for you? https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/ They should show up in replays without being printed to the actual console. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem statement
I'd like verbose logs in replays, without having to spam each user's actual console.
More info
I'm logging various behind-the-scenes information (async processing initialized/finished, various state changes etc.) via
console.debug
while developing locally. This is recorded perfectly to Sentry and is available in the console tab.However for normal users I want to have the same effect, while avoiding actually logging to their console (to reduce spam).
Proposition
I'd like a way to send console events to the replay's console explicitly. Something like
Sentry.captureConsole(
file ${id} processing started, {level: 'debug'}); Looking at how
captureConsoleIntegrationworks, it seems this is done internally via
getCurrentScope().captureMessage()` but it would be great to have a userland feature for this.Appreciate any input or advice on how to achieve this
Beta Was this translation helpful? Give feedback.
All reactions