spotlight
spotlight copied to clipboard
SDK logs visible on spotlight
Spotlight is a great tool, but one thing that would help me is being able to see the SDK logs on spotlight. With this feature, I'd be able to only focus on a single UI when looking for logs (plus if it has basic search filters)
@lucas-zimerman that is a great idea! I'll add it to the list. I see two ways to make this happen:
- Most of our SDK's have support for capturing console/terminal messages and we can use that in combination with
debugmode in the SDK - We do support custom events, so SDKs may start sending custom events to Spotlight when it is enabled.
Which one do you think is the better approach?
I think option 1 works the best, it will have the console messages that will help users to see their app log and also SDK logs that help debugging the SDKs. And since we have the UI control here, there could be checkboxes to hide/show console logs/SDK logs.
hmm @betegon implemented it but I don't see it in the top level menu
Not really! I thought SDK logs were solve in that PR as structured logs, but I was wrong. @BYK explanation on this https://github.com/getsentry/spotlight/pull/808#issuecomment-2922447067
Also, we haven't cut a release yet so even the other logs are not shown yet. Now it looks like this:
I'll talk to @BYK about structure logs!
Long story short: we support structured logs now but I don't exepect SDKs to send their own debug logging through that channel. If we can make that happen when Spotlight is turned on in the SDK, I think we can solve this.
Hey @BYK @betegon
Today if we set debug: true in Spotlight or in Sentry sdks we get console logging.
I guess we can refer to this to get those logs captured -https://docs.sentry.io/platforms/javascript/logs/#console-logging-integration
And then the sentry SDK will send the log envelopes.
@Shubhdeep12 I'm surprised that the SDK logging does not bypass any integration we have but this is great to know. I guess it would just be a matter of us enabling console logging integration when Spotlight is turned on?
Yes consolelogging integration turned on in sentry SDK and disableLogger : false in next config