Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# CHANGELOG

## 4.15.0

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.0.

### Features

- Add Monolog Sentry Logs handler [(#1867)](https://github.com/getsentry/sentry-php/pull/1867)

This new handler allows you to capture Monolog logs as Sentry logs. To use it, configure your Monolog logger:

```php
use Monolog\Logger;
use Sentry\Monolog\LogsHandler;
use Sentry\Logs\LogLevel;

// Initialize Sentry SDK first (make sure 'enable_logs' is set to true)
\Sentry\init([
'dsn' => '__YOUR_DSN__',
'enable_logs' => true,
]);

// Create a Monolog logger
$logger = new Logger('my-app');

// Add the Sentry logs handler
// Optional: specify minimum log level (defaults to LogLevel::debug())
$handler = new LogsHandler(LogLevel::info());
$logger->pushHandler($handler);

// Now your logs will be sent to Sentry
$logger->info('User logged in', ['user_id' => 123]);
$logger->error('Payment failed', ['order_id' => 456]);
```

Note: The handler will not collect logs for exceptions (they should be handled separately via `captureException`).

### Bug Fixes

- Fix non string indexed attributes passed as log attributes [(#1882)](https://github.com/getsentry/sentry-php/pull/1882)
- Use correct `sample_rate` key when deriving sampleRand [(#1874)](https://github.com/getsentry/sentry-php/pull/1874)
- Do not call `Reflection*::setAccessible()` in PHP >= 8.1 [(#1872)](https://github.com/getsentry/sentry-php/pull/1872)

## 4.14.2

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.14.2.
Expand Down
Loading