Skip to content

Commit 9070e3e

Browse files
committed
add ContextLines description, apply feedback
1 parent 8a0a33c commit 9070e3e

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

CHANGELOG.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,39 @@
66

77
## 7.62.0
88

9-
- feat(integrations): Add `ContextLines` integration for html-embedded JS stack frames (#8699)
9+
### Important Changes
10+
11+
- **feat(integrations): Add `ContextLines` integration for html-embedded JS stack frames (#8699)**
12+
13+
This release adds the `ContextLines` integration as an optional integration for the Browser SDKs to `@sentry/integrations`.
14+
15+
This integration adds source code from inline JavaScript of the current page's HTML (e.g. JS in `<script>` tags) to stack traces of captured errors.
16+
It _can't_ collect source code from assets referenced by your HTML (e.g. `<script src="..." />`).
17+
18+
The `ContextLines` integration is useful when you have inline JS code in HTML pages that can't be accessed by Sentry's backend, for example, due to a login-protected page.
19+
20+
```js
21+
import { ContextLines } from "@sentry/integrations";
22+
23+
Sentry.init({
24+
// ...
25+
integrations: [
26+
new ContextLines({
27+
// The number of lines to collect before and after each stack frame's line number
28+
// Defaults to 7
29+
frameContextLines: 7,
30+
}),
31+
],
32+
});
33+
```
34+
35+
### Other Changes
36+
1037
- fix(nextjs): Make all wrappers isomorphic and available in all runtimes (#8743)
1138
- fix(replay): Cancel debounce when replay is too short/long (#8742)
1239
- fix(utils): `dirname` and `basename` should handle Windows paths (#8737)
1340
- ref: Hoist `flush`, `close`, and `lastEventId` into `@sentry/core` (#8731)
14-
- ref(ember): Update ember type/eslint/tsconfig usage (#8718)
1541
- ref(node): Don't call `JSON.stringify` on prisma client when logging (#8745)
16-
- ref(replay): Ensure we only clear for buffer mode (#8744)
17-
- ref(replay): Log warning if trying to flush initial segment without checkout (#8748)
1842

1943
## 7.61.1
2044

0 commit comments

Comments
 (0)