getsentry / getsentry/sentry

Replay: Errors count on replay detail include `captureMessage` with any level

Open
#43,831 3 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### Problem Statement

Customer feedback:

> Not really a question, but with the understanding we represent Messages as Issues, still feels a bit strange to have `captureMessage` reflected as an Error in the Replay timeline (and traces). Wish we had different iconography for these.

An SDK call to `Sentry.captureMessage` results in a event with `type: default`. That's because no `type` is sent from the SDK, and Sentry changes sets the `type: error` if it finds a stack trace. Which isn't included in a `captureMessage` unless the [SDK option `attackStacktrace: true`](https://docs.sentry.io/platforms/javascript/configuration/options/#attach-stacktrace).

Additionally a [user can override the `level`](https://docs.sentry.io/platforms/javascript/usage/set-level/):

```
Sentry.captureMessage("this was a serious problem", "fatal");
```

Today, the message above wouldn't be counted as an error in the Replay UI ^

### Solution Brainstorm

Make sure the SDK considers `event.level` in addition to having a stack trace in order to tag events with `replay_id`. In the Replay detail UI, consider `event.type: default` in addition to `event.type: error` for as long as `level > error`. This would leave `warning` and lower out of it but we can agree those are not `error`s.

Related to: https://github.com/getsentry/replay-backend/issues/247

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.