Skip to content

Commit 30ebc3d

Browse files
committed
meta: CHANGELOG for 9.2.0-alpha.0
1 parent 3e936c9 commit 30ebc3d

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
@@ -12,6 +12,36 @@
1212

1313
Work in this release was contributed by @6farer. Thank you for your contribution!
1414

15+
## 9.2.0-alpha.0
16+
17+
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.
18+
19+
- feat(logs): Add experimental user-callable logging methods (#15442)
20+
21+
Logging is gated by an experimental option, `_experiments.enableLogs`.
22+
23+
```js
24+
Sentry.init({
25+
_experiments: {
26+
enableLogs: true,
27+
},
28+
})
29+
```
30+
31+
These API are exposed in the `Sentry._experiment_log` namespace.
32+
33+
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.
34+
35+
```js
36+
Sentry._experiment_log.info`user ${username} just bought ${item}!`;
37+
```
38+
39+
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.
40+
41+
```js
42+
Sentry._experiment_log.captureLog('error', 'Hello world!', { 'user.id': 123 });
43+
```
44+
1545
## 9.1.0
1646

1747
- feat(browser): Add `graphqlClientIntegration` ([#13783](https://github.com/getsentry/sentry-javascript/pull/13783))

0 commit comments

Comments
 (0)