Skip to content

Commit 41c2119

Browse files
committed
meta: CHANGELOG for 9.6.0-alpha.0
1 parent d7e3479 commit 41c2119

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

CHANGELOG.md

+60
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,66 @@
1010

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

13+
## 9.6.0-alpha.0
14+
15+
This is an alpha release that includes experimental functionality for the new logs API in Sentry. All experimental features are subject to breaking changes.
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+
// Enable logs to be sent to Sentry.
25+
enableLogs: true,
26+
},
27+
});
28+
```
29+
30+
These API are exposed in the `Sentry._experiment_log` namespace. In the future the `_experiment_log` namespace will be removed and logging functions will be moved into a more stable namespace.
31+
32+
There are functions for each of the logging severity levels `fatal`, `error`, `warn`, `info`, `debug`, `trace`. There is also a `log` function that is an alias to `info`.
33+
34+
```js
35+
Sentry._experiment_log.info('Adding item to cart', { item: 'sneakers' });
36+
37+
Sentry._experiment_log.warn('User performed invalid operation', { userId: '23423874', operation: 'open-file' });
38+
```
39+
40+
If you want to do structured logging, you'll need to use the `fmt` helper exposed in the `Sentry._experiment_log` namespace.
41+
42+
```js
43+
const { fmt } = Sentry._experiment_log;
44+
45+
Sentry._experiment_log.info(fmt`user ${username} just bought ${item}!`);
46+
```
47+
48+
SDKs that support the Alpha Logging APIs:
49+
50+
- `@sentry/astro`
51+
- `@sentry/aws-serverless`
52+
- `@sentry/browser`
53+
- `@sentry/bun`
54+
- `@sentry/cloudflare`
55+
- `@sentry/core`
56+
- `@sentry/deno`
57+
- `@sentry/ember`
58+
- `@sentry/gatsby`
59+
- `@sentry/google-cloud-serverless`
60+
- `@sentry/nestjs`
61+
- `@sentry/nextjs`
62+
- `@sentry/node`
63+
- `@sentry/nuxt`
64+
- `@sentry/react`
65+
- `@sentry/remix`
66+
- `@sentry/solid`
67+
- `@sentry/solidstart`
68+
- `@sentry/svelte`
69+
- `@sentry/sveltekit`
70+
- `@sentry/vercel-edge`
71+
- `@sentry/vue`
72+
1373
## 9.5.0
1474

1575
### Important Changes

0 commit comments

Comments
 (0)