Skip to content

Attributes not added to logs sent via consoleLoggingIntegrationΒ #17744

@rodolfoBee

Description

@rodolfoBee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

10.13.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
  dsn:"...", /
  integrations: [
    Sentry.consoleLoggingIntegration({ levels: ["debug"] }),
  ],
});

//consts
        const topic = "logs"
        const status = "ok"
        const supabaseError = "supabaseError"

//write log        
console.debug('Console debug log', {
        time: new Date().toISOString(),
        topic: topic,
        status: status,
        error: supabaseError,
        });

//send log to Sentry
        Sentry.logger.error('Sentry logger log', {
        time: new Date().toISOString(),
        topic: topic,
        status: status,
        error: supabaseError,

Steps to Reproduce

  1. run a script like the above
  2. go to Explore -> Logs

Expected Result

The attributes set in the console.debug are individually added and can be used to filter logs, like the attributes added to the Sentry.logger call:

Image

Actual Result

Logs are reported under "parameter.0" and grouped together, making it not possible to search by them individually.

Image

Additional Context

Tip: React with πŸ‘ to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions