You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR makes a few fixes and additions to the ANR feature.
- Stops passing the `sdk` property with the event since
`enhanceEventWithSdkInfo` results in duplicate integrations/packages
being sent!
- Allows the passings of `staticTags` to attach to ANR events
- Required by Electron SDK to tag the source
`process/origin/environment`
- Could also be useful for other users
- Optionally enable normalising of stack frame paths to the app root
- Required for Electron
- Soon required for Node with #9072
The path normalisation code (and tests) are from the Electron SDK and is
well tested on all platforms. However, it will only be called when
`appRootPath` is supplied. If/when we add path normalisation to Node, it
will have a default which can be overridden.
The Electron SDK will then wrap the Node Anr integration something like
this:
```ts
class Anr extends NodeAnr {
public constructor(options: Partial<Options> = {}) {
super({
...options,
staticTags: {
'event.environment': 'javascript',
'event.origin': 'electron',
'event.process': 'browser',
...options.tags,
},
appRootPath: app.getAppPath(),
});
}
}
```
0 commit comments