Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach Laravel's Context to events as metadata #537

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

imjoehaines
Copy link
Contributor

Goal

Laravel 11 added a new Context feature that allows adding arbitrary metadata to its logging system

This PR adds support for reading from the Context and attaching it to events as metadata

There is a new configuration option, attach_hidden_context (or environment variable BUGSNAG_ATTACH_HIDDEN_CONTEXT), that controls whether "hidden context" is added as metadata as well. This is disabled by default to avoid accidentally leaking data

See also #536 & https://laravel.com/docs/11.x/context

config/bugsnag.php Outdated Show resolved Hide resolved
src/BugsnagServiceProvider.php Show resolved Hide resolved
@imjoehaines imjoehaines merged commit cb73a69 into next May 23, 2024
121 checks passed
@imjoehaines imjoehaines deleted the laravel-11-context branch May 23, 2024 10:59
@imjoehaines imjoehaines mentioned this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants