Skip to content

Consola logging add object as extra data/context #18593

Description

@luuktap

Problem Statement

When logging with Consola, it'd be nice to be able to pass an object and have Sentry treat it as (searchable) context/data, instead of serializing it into the main log message.

Solution Brainstorm

This should be very easy to implement since Consola exposes an args array on a logObj which contains all the parameters passed into a log call. Looping through the elements in the array, taking out all objects and passing them as context.

https://github.com/getsentry/sentry-javascript/blob/develop/packages/core/src/integrations/consola.ts#L215

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions