Skip to content

Adding a string with the key user to loging context throws an exception #644

@przemyslaw-przylucki

Description

@przemyslaw-przylucki

Environment

Sentry: 3.1.3
Laravel: 9.43.0

Steps to Reproduce

  1. Use sentry as the logger driver
        'stack' => [
            'driver' => 'stack',
            'channels' => ['daily', 'sentry'],
            'ignore_exceptions' => false,
        ],
  1. Send a log
logger()->info('user', ['userId' => 5, 'user' => 'abc'])

Expected Result

The log is added without any problems.

If this is expected behaviour, this should be explicitly documented somewhere

Actual Result

An exception is thrown, b/c user is apparently a reserved keyword, and passing it in the log creates an exception

image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions