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

@imjoehaines imjoehaines requested a review from tomlongridge May 22, 2024 12:44
@imjoehaines imjoehaines force-pushed the laravel-11-context branch from 554ddb6 to 707df40 Compare May 22, 2024 13:09
config/bugsnag.php Outdated Show resolved Hide resolved
src/BugsnagServiceProvider.php Show resolved Hide resolved
@imjoehaines imjoehaines force-pushed the laravel-11-context branch from 707df40 to 28e190b Compare May 23, 2024 08:34
@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