Skip to content

Commit 846e864

Browse files
authored
Update performance-monitoring.md
1 parent 93fd56c commit 846e864

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

docs/performance-monitoring.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@
66
| Field | Type | Description |
77
|-------|------|-------------|
88
| id | string | Unique identifier of the transaction |
9-
| type | string | Type of transaction sampling ('default' or 'critical'). See [Sampling](#sampling) for details |
9+
| severity | string | Type of transaction sampling ('default' or 'critical'). See [Sampling](#sampling) for details |
1010
| name | string | Name of the transaction |
1111
| startTime | number | Timestamp when transaction started |
1212
| endTime | number | Timestamp when transaction ended |
1313
| duration | number | Total duration of transaction in milliseconds |
1414
| finishStatus | string | Status when transaction finished. 'success' (default) or 'failure'. See [Transaction Completion](#2-transaction-completion) |
1515
| spans | Span[] | Array of [spans](#span) associated with this transaction |
16-
| tags | object | Additional context data attached to transaction |
1716

1817
### AggregatedTransaction
1918
| Field | Type | Description |
2019
|-------|------|-------------|
21-
| id | string | Unique identifier of the transaction |
20+
| aggregationId | string | Identifier of the aggregation |
2221
| name | string | Name of the transaction |
2322
| avgStartTime | number | Average timestamp when transaction started |
2423
| minStartTime | number | Minimum timestamp when transaction started |
2524
| maxEndTime | number | Maximum timestamp when transaction ended |
2625
| p50duration | number | 50th percentile (median) duration of transaction in milliseconds |
2726
| p95duration | number | 95th percentile duration of transaction in milliseconds |
2827
| maxDuration | number | Maximum duration of transaction in milliseconds |
28+
| count | number | how many transactions aggregated |
29+
| aggregatedSpans | AggregatedSpan[] | List of spans in transactions |
30+
2931

3032
### Span
3133
| Field | Type | Description |
@@ -41,50 +43,57 @@ See [Transaction Aggregation](#transaction-aggregation) for details on how spans
4143

4244
| Field | Type | Description |
4345
|-------|------|-------------|
44-
| id | string | Unique identifier of the span |
46+
| aggregationId | string | Unique identifier of the span aggregation |
4547
| name | string | Name of the span |
46-
| avgStartTime | number | Average timestamp when span started |
4748
| minStartTime | number | Minimum timestamp when span started |
4849
| maxEndTime | number | Maximum timestamp when span ended |
4950
| p50duration | number | 50th percentile (median) duration of span in milliseconds |
5051
| p95duration | number | 95th percentile duration of span in milliseconds |
5152
| maxDuration | number | Maximum duration of span in milliseconds |
5253

53-
5454
## Transaction Lifecycle
5555

5656
### 1. Transaction Creation
57+
5758
When creating a transaction, you can specify its type:
59+
5860
- 'critical' - important transactions that are always sent to the server
5961
- 'default' - regular transactions that go through the [sampling process](#sampling)
6062

6163
### 2. Transaction Completion
64+
6265
When completing a transaction:
66+
6367
1. A finish status is specified (finishStatus):
6468
- 'success' (default) - successful completion
6569
- 'failure' - completion with error (such transactions are always sent to the server)
6670

6771
2. The transaction duration is checked:
68-
- If thresholdMs parameter is specified and the transaction duration is less than this value, the transaction is discarded
72+
- If `thresholdMs` parameter is specified and the transaction duration is less than this value, the transaction is discarded
73+
- Default `thresholdMs` is 20ms
74+
- `finishStatus` "failure" has a priority over `thresholdMs`
6975
- Otherwise, the transaction goes through the [sampling process](#sampling)
7076

71-
3. After successful sampling, the transaction is added to the list for sending
77+
3. After successful sampling, the transaction is added to the list for sending
7278

7379
### 3. Sending Transactions
80+
7481
- When the first transaction is added to the list, a timer starts
7582
- When the timer expires:
7683
1. All collected transactions are [aggregated](#transaction-aggregation)
7784
2. Aggregated data is sent to the server
7885
3. The transaction list is cleared
7986

8087
## Sampling
88+
8189
- The probability of sending transactions is configured through the `performance.sampleRate` parameter (value from 0 to 1)
8290
- Only transactions of type 'default' with finish status 'success' are subject to sampling
8391
- Sampling process:
8492
1. A random number between 0 and 1 is generated for each transaction
8593
2. If the number is less than or equal to sampleRate, the transaction is sent
8694

8795
## Transaction Aggregation
96+
8897
1. [Transactions](#transaction) are grouped by name (name field)
8998
2. For each group, statistical indicators are calculated:
9099
- minStartTime - earliest start time
@@ -94,8 +103,7 @@ When completing a transaction:
94103
- maxDuration - maximum duration
95104

96105
3. Based on this data, [AggregatedTransaction](#aggregatedtransaction) objects are created
97-
98106
4. For each aggregated transaction:
99107
- [Spans](#span) are grouped by name
100-
- The same statistical indicators are calculated for each span group
108+
- Their own statistical indicators (see [AggregatedSpan](#aggregatedspan)) are calculated for each span group
101109
- [AggregatedSpan](#aggregatedspan) objects are created

0 commit comments

Comments
 (0)