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

sentry: make sentry events more useful #76571

Closed
yuzefovich opened this issue Feb 15, 2022 · 1 comment · Fixed by #77525
Closed

sentry: make sentry events more useful #76571

yuzefovich opened this issue Feb 15, 2022 · 1 comment · Fixed by #77525
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-server-and-security DB Server & Security

Comments

@yuzefovich
Copy link
Member

yuzefovich commented Feb 15, 2022

We have recently fixed our automatic issue creating from sentry events (thanks Rail!); however, there are still some things to be desired.

Let's examine a very recent issue #76570 (sentry link). It gives us a nice stack trace, but the details about what error prompted the event are missing. All we can see is that an error was thrown by the vectorized engine here:

colexecerror.InternalError(err)

which is just a wrapper around panic

The error is augmented with "unexpected error from the vectorized engine" message here

retErr = errors.NewAssertionErrorWithWrappedErrf(err, "unexpected error from the vectorized engine")

(when the error is caught later in the stack).

The sentry event contains this

github.com/cockroachdb/errors/barriers/*barriers.barrierError (*::)
github.com/cockroachdb/errors/errutil/*errutil.withPrefix (*::)
github.com/cockroachdb/errors/withstack/*withstack.withStack (*::)
github.com/cockroachdb/errors/assert/*assert.withAssertionFailure (*::)
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/*colexecerror.notInternalError (*::)

but it is missing all other details about the original error. And that's what I'd like to find out how to add.

Anecdotally, I think this was working on 20.2 and prior and stopped working with 21.1 release. It's possible that we're misusing errors API in colexecerror/error.go, but I'm not sure. cc @knz if you have wisdom to share about it.

Jira issue: CRDB-13179

@yuzefovich yuzefovich added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Feb 15, 2022
@blathers-crl blathers-crl bot added the T-server-and-security DB Server & Security label Feb 15, 2022
@knz
Copy link
Contributor

knz commented Mar 4, 2022

I did some work in this direction, see cockroachdb/errors#94.

craig bot pushed a commit that referenced this issue Mar 11, 2022
77525: deps: update cockroachdb/errors r=yuzefovich a=knz

Fixes  #76571

This upgrades to v1.9.0 and enhances Sentry reports as requested by
the SQL queries team.

Release justification: low risk, high benefit changes to existing functionality

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-server-and-security DB Server & Security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants