Skip to content

sentry: make sentry events more useful #76571

@yuzefovich

Description

@yuzefovich

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

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-server-and-securityDB Server & Security

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions