Description
Problem Statement
Hey,
we are playing around with Sentry Logs. Right now, we log everything via console, and then push the container output to our logging service. The latter part (pushing via eg vector) is already worked in - this issue is about the first part: Properly sending the console logs to Sentry.
We have a little wrapper around console.log to have a unified log structure. All logs are printed as console.log("my message", { …context })
where the context could also contain eg a requestId
, traceId
or any other important data. I want them to properly show up in Sentry.
Solution Brainstorm
I looked through the implementation and it seems like sentry is simply concatenating all args before sending them as the message
. It would be great if the integration would accept a format
argument that would allow us to overwrite that and return attributes properly. Something along the lines of:
format (args: any[]): { message: string, attributes: Record<string, string> }
Metadata
Metadata
Assignees
Type
Projects
Status