Skip to content

Commit

Permalink
fix: Add gatsby sdk identifier (#2709)
Browse files Browse the repository at this point in the history
* fix: Add gatsby identifier

* ref: Changelog

* Update CHANGELOG.md

Co-authored-by: Rodolfo Carvalho <rodolfo.carvalho@sentry.io>

Co-authored-by: Rodolfo Carvalho <rodolfo.carvalho@sentry.io>
  • Loading branch information
HazAT and rhcarvalho committed Jun 30, 2020
1 parent a551313 commit 3349cb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,7 @@
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
- [tracing] fix: Add manual Location typing (#2700)
- [react] feat: Expose eventId on ErrorBoundary component
- [gatsby] fix: fix: Add gatsby sdk identifier (#2709)

- [tracing] feat: Pick up sentry-trace in JS <meta/> tag (#2703)
- [tracing] fix: Respect sample decision when continuing trace from header in node (#2703)
Expand Down
15 changes: 15 additions & 0 deletions packages/gatsby/src/gatsby-browser.js
Expand Up @@ -15,6 +15,21 @@ exports.onClientEntry = function(_, pluginParams) {
tracesSampleRate,
integrations,
});
Sentry.addGlobalEventProcessor(event => {
event.sdk = {
...event.sdk,
name: 'sentry.javascript.gatsby',
packages: [
...((event.sdk && event.sdk.packages) || []),
{
name: 'npm:@sentry/gatsby',
version: Sentry.SDK_VERSION,
},
],
version: Sentry.SDK_VERSION,
};
return event;
});
window.Sentry = Sentry;
});
};

0 comments on commit 3349cb8

Please sign in to comment.