Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Events created from exception shouldnt have top-level message attribute #1831

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Jan 10, 2019

If the event object has a message attribute, that’s used as the fingerprint, unless user overrides it.
This means, that code like throw new Error("user " + user_id + " had an error") will create a separate group for every user, despite being the very same error (with same stacktrace etc.).

In the @sentry/browser we have it set up correctly, and there's no message for Error based events:

return {
  exception: {
    values: [exception],
  },
};

however, in the node, we do have it different:

return {
  exception: {
    values: [exception],
  },
  message: `${name}: ${error.message || '<no message>'}`,
};

In short, the same code (throw new Error("user " + user_id + " had an error"), say) will result in logical grouping in sentry-js but no grouping in sentry-node.

Removing message will as Daniel pointed out create a new group, but everything else will work, as for exceptions, the message is rendered in the Sentry using type + value values from the exception object.

@getsentry-bot
Copy link
Contributor

getsentry-bot commented Jan 10, 2019

Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖 ✅ TSLint passed
📖 @sentry/browser gzip'ed minified size: 22.1855 kB

Generated by 🚫 dangerJS

Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will create new groups, not sure how to proceed here.
Major bump just for this is hard, maybe making users aware that this will create new groups?

@mitsuhiko
Copy link
Member

I’m conflicted. It sounds like a major bump would be the right thing.

@HazAT
Copy link
Member

HazAT commented Jan 31, 2019

@kamilogorek Can you add a 5.0.0 section to the changelog and merge this.
I've created a new branch called major/5 which should have all changes for the next major release.

If you added the changelog, feel free to merge it into this branch, I will create a PR to master afterward to track the major release.

@kamilogorek kamilogorek merged commit a3b2033 into major/5 Jan 31, 2019
@kamilogorek kamilogorek deleted the remove-message branch January 31, 2019 11:24
HazAT added a commit that referenced this pull request Feb 18, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)

* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)

* ref: Move PromiseBuffer and Error to utils package

* ref: Remove all async api

* ref: Remove invokeClientAsync function

* feat: Finish Node SDK

* feat: SyncPromise implementation

* fix: Browser SDK

* fix: beforeSend callback

* fix: Core tests

* fix: linting and tests

* fix: browser npm package + add error for manual tests

* meta: Remove deprecations

* fix: Typedocs and public exposed functions

* meta: Changelog

* Apply suggestions from code review

Co-Authored-By: HazAT <[email protected]>

* fix: CodeReview

* feat: #1871

* ref: Move public interfaces to types package

Move addBreadcrumb from the client to the hub

* fix: Tests

* fix: Small type issues

* ref: Remove scope listeners

* fix: Add flush to interface

* ref: Remove interfaces from core
kamilogorek pushed a commit that referenced this pull request Feb 19, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)

* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)

* ref: Move PromiseBuffer and Error to utils package

* ref: Remove all async api

* ref: Remove invokeClientAsync function

* feat: Finish Node SDK

* feat: SyncPromise implementation

* fix: Browser SDK

* fix: beforeSend callback

* fix: Core tests

* fix: linting and tests

* fix: browser npm package + add error for manual tests

* meta: Remove deprecations

* fix: Typedocs and public exposed functions

* meta: Changelog

* Apply suggestions from code review

Co-Authored-By: HazAT <[email protected]>

* fix: CodeReview

* feat: #1871

* ref: Move public interfaces to types package

Move addBreadcrumb from the client to the hub

* fix: Tests

* fix: Small type issues

* ref: Remove scope listeners

* fix: Add flush to interface

* ref: Remove interfaces from core
HazAT added a commit that referenced this pull request Feb 21, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)

* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)

* ref: Move PromiseBuffer and Error to utils package

* ref: Remove all async api

* ref: Remove invokeClientAsync function

* feat: Finish Node SDK

* feat: SyncPromise implementation

* fix: Browser SDK

* fix: beforeSend callback

* fix: Core tests

* fix: linting and tests

* fix: browser npm package + add error for manual tests

* meta: Remove deprecations

* fix: Typedocs and public exposed functions

* meta: Changelog

* Apply suggestions from code review

Co-Authored-By: HazAT <[email protected]>

* fix: CodeReview

* feat: #1871

* ref: Move public interfaces to types package

Move addBreadcrumb from the client to the hub

* fix: Tests

* fix: Small type issues

* ref: Remove scope listeners

* fix: Add flush to interface

* ref: Remove interfaces from core
kamilogorek pushed a commit that referenced this pull request Feb 26, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)
* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)
* ref: Move PromiseBuffer and Error to utils package
* ref: Remove all async api
* ref: Remove invokeClientAsync function
* feat: Finish Node SDK
* feat: SyncPromise implementation
* fix: Browser SDK
* fix: beforeSend callback
* fix: Core tests
* fix: linting and tests
* fix: browser npm package + add error for manual tests
* meta: Remove deprecations
* fix: Typedocs and public exposed functions
* meta: Changelog
* Apply suggestions from code review
* ref: Move public interfaces to types package
* fix: Tests
* fix: Small type issues
* ref: Remove scope listeners
* fix: Add flush to interface
* ref: Remove interfaces from core
HazAT added a commit that referenced this pull request Mar 19, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)
* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)
* ref: Move PromiseBuffer and Error to utils package
* ref: Remove all async api
* ref: Remove invokeClientAsync function
* feat: Finish Node SDK
* feat: SyncPromise implementation
* fix: Browser SDK
* fix: beforeSend callback
* fix: Core tests
* fix: linting and tests
* fix: browser npm package + add error for manual tests
* meta: Remove deprecations
* fix: Typedocs and public exposed functions
* meta: Changelog
* Apply suggestions from code review
* ref: Move public interfaces to types package
* fix: Tests
* fix: Small type issues
* ref: Remove scope listeners
* fix: Add flush to interface
* ref: Remove interfaces from core
HazAT added a commit that referenced this pull request Mar 20, 2019
* fix: Events created from exception shouldnt have top-level message attribute (#1831)
* Use SyncPromise internally & Remove deprecated API & Trim Public API (#1858)
* ref: Move PromiseBuffer and Error to utils package
* ref: Remove all async api
* ref: Remove invokeClientAsync function
* feat: Finish Node SDK
* feat: SyncPromise implementation
* fix: Browser SDK
* fix: beforeSend callback
* fix: Core tests
* fix: linting and tests
* fix: browser npm package + add error for manual tests
* meta: Remove deprecations
* fix: Typedocs and public exposed functions
* meta: Changelog
* Apply suggestions from code review
* ref: Move public interfaces to types package
* fix: Tests
* fix: Small type issues
* ref: Remove scope listeners
* fix: Add flush to interface
* ref: Remove interfaces from core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants