Skip to content

Commit 94b2cca

Browse files
committed
meta: CHANGELOG for 9.4.0-alpha.0
1 parent a8673b7 commit 94b2cca

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,36 @@
1010

1111
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1212

13+
## 9.4.0-alpha.0
14+
15+
This is an alpha release that includes experimental functionality for the new logs API in Sentry. Support for these methods are only avaliable in the browser and core SDKs.
16+
17+
- feat(logs): Add experimental user-callable logging methods (#15442)
18+
19+
Logging is gated by an experimental option, `_experiments.enableLogs`.
20+
21+
```js
22+
Sentry.init({
23+
_experiments: {
24+
enableLogs: true,
25+
},
26+
});
27+
```
28+
29+
These API are exposed in the `Sentry._experiment_log` namespace.
30+
31+
On the high level, there are functions for each of the logging severity levels `critical`, `fatal`, `error`, `warn`, `info`, `debug`, `trace`. These functions are tagged template functions, so they use a special string template syntax that we use to parameterize functions accordingly.
32+
33+
```js
34+
Sentry._experiment_log.info`user ${username} just bought ${item}!`;
35+
```
36+
37+
If you want more custom usage, we also expose a `captureLog` method that allows you to pass custom attributes, but it's less easy to use than the tagged template functions.
38+
39+
```js
40+
Sentry._experiment_log.captureLog('error', 'Hello world!', { 'user.id': 123 });
41+
```
42+
1343
## 9.3.0
1444

1545
### Important Changes

0 commit comments

Comments
 (0)