Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion develop-docs/sdk/telemetry/sessions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ not report any more session updates or start a new session.

SDKs are encouraged to distinguish between different ways of ending a session:

- `exited`: this means the session ended cleanly. It's is the same as the
- `exited`: this means the session ended cleanly. It's is the same as the
session staying in `ok` from the point of success reports. However only
sessions ending in `exited` will be considered for session durations.
A session is allowed to go to `exited` even if errors occurred.
Expand Down Expand Up @@ -314,6 +314,29 @@ count of greater than zero is considered an errored session. All crashed and
abnormal sessions are also at all times considered errored but subtracted from
the final errored session count.

Only events that stem from `captureException`, `captureError`, or `captureEvent`
must increment the `errors` counter when their level is `error` or higher. As SDKs
set the default level to `error` for these methods, a level lower than `error`
means the users changed it manually. This gives the users the ability to capture
error events not marking sessions as errored. `captureEvent` is included because
users might manually create exception events with it. Events stemming from
`captureMessage` must not affect the session's error count, regardless of their
log level. For all methods, it doesn't matter if the event has a stack trace or not.
The following table summarizes the behavior of the methods:

| method | level | increments `errors` counter |
| --- | --- | --- |
| captureException / captureError | `fatal` | `yes` |
| captureException / captureError | `error` | `yes` |
| captureException / captureError | `warning` | `no` |
| captureEvent | `fatal` | `yes` |
| captureEvent | `error` | `yes` |
| captureEvent | `warning` | `no` |
| captureMessage | `fatal` | `no` |
| captureMessage | `error` | `no` |
| captureMessage | `warning` | `no` |


### Exited

A session can transition to `exited` which is exactly the same state as `ok`
Expand Down
Loading