Skip to content

Commit 2941497

Browse files
committed
Prepare 4.12.0
1 parent e8f9bca commit 2941497

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# CHANGELOG
22

3+
## 4.12.0
4+
5+
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.12.0.
6+
7+
### Features
8+
9+
- Add support for Sentry Structured Logs [(#1813)](https://github.com/getsentry/sentry-php/pull/1813)
10+
11+
You can now send logs directly to Sentry using the new logging API:
12+
13+
```php
14+
use function Sentry\logger;
15+
16+
// Log messages at different levels
17+
logger()->info('User logged in', ['user_id' => 123]);
18+
logger()->warn('Deprecated function used', ['function' => 'old_function']);
19+
logger()->error('Database connection failed', ['host' => 'db.example.com']);
20+
logger()->fatal('Critical system failure: %s', ['Out of memory'], ['component' => 'database']);
21+
22+
// Flush logs to Sentry
23+
logger()->flush();
24+
25+
// We recommend registering the flushing in a shutdown function
26+
register_shutdown_function(static fn () => logger()->flush());
27+
```
28+
29+
To learn more, head over to our [docs](https://docs.sentry.io/platforms/php/logs/).
30+
31+
### Bug Fixes
32+
33+
- Log correct source of sampling decision [(#1836)](https://github.com/getsentry/sentry-php/pull/1836)
34+
335
## 4.11.1
436

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

0 commit comments

Comments
 (0)