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

Add fill_extra_context option to the symfony documentation #9824

Merged
merged 3 commits into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/platforms/php/guides/symfony/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ monolog:
type: sentry
level: !php/const Monolog\Logger::ERROR
hub_id: Sentry\State\HubInterface
fill_extra_context: true # Enables sending monolog context to Sentry
```

Additionally, you can register the `PsrLogMessageProcessor` to resolve PSR-3 placeholders in reported messages:
Expand Down Expand Up @@ -84,7 +85,7 @@ class SentryTestController extends AbstractController
public function testLog()
{
// the following code will test if monolog integration logs to sentry
$this->logger->error('My custom logged error.');
$this->logger->error('My custom logged error.', ['some' => 'Context Data']);

// the following code will test if an uncaught exception logs to sentry
throw new \RuntimeException('Example exception.');
Expand Down