Skip to content

Commit 11a88b0

Browse files
committed
Publish package @appsignal/[email protected]
Update version number and CHANGELOG.md.
1 parent 914d7bb commit 11a88b0

File tree

3 files changed

+31
-27
lines changed

3 files changed

+31
-27
lines changed

packages/react/.changesets/add-span-override-prop.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/react/CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# AppSignal for react changelog
22

3+
## 1.0.26
4+
5+
_Published on 2024-07-03._
6+
7+
### Added
8+
9+
- Add a span override prop to the `ErrorBoundary` and `LegacyBoundary` components.
10+
11+
Pass an override function to the error boundary component in order to set properties, such as tags, params or breadcrumbs, in the error span that will be sent to AppSignal.
12+
13+
The override function is only called when an error is about to be sent. This allows you to only perform expensive computation to add information to the error when an error will actually be reported.
14+
15+
When defined within a component, the function should be memoized with `useCallback` to prevent unnecessary re-renders:
16+
17+
```jsx
18+
export default const SomeComponent = ({ someProp }) => {
19+
const override = useCallback((span) => {
20+
span.setTags({ someProp })
21+
}, [someProp]);
22+
23+
return (
24+
<ErrorBoundary override={override}>
25+
{ /* Your component here */ }
26+
</ErrorBoundary>
27+
)
28+
}
29+
```
30+
31+
(patch [2ae20c2](https://github.com/appsignal/appsignal-javascript/commit/2ae20c279bf8ef416019f523a56ecd35edbd23bc))
32+
333
## 1.0.25
434

535
_Published on 2024-04-23._

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@appsignal/react",
3-
"version": "1.0.25",
3+
"version": "1.0.26",
44
"main": "dist/cjs/index.js",
55
"module": "dist/esm/index.js",
66
"repository": {

0 commit comments

Comments
 (0)