Skip to content

Commit 535873f

Browse files
authored
Add long_field_max_length configuration option (#493)
1 parent fb25fd1 commit 535873f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

specs/agents/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ You can find details about each of these in the [APM Data Model](https://www.ela
6161
- [Agent Configuration](configuration.md)
6262
- [Agent logging](logging.md)
6363
- [Data sanitization](sanitization.md)
64+
- [Field limits](field-limits.md)
6465

6566
# Processes
6667

specs/agents/field-limits.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Field limits
2+
3+
The maximum length of metadata, transaction, span, et al fields are determined
4+
by the [APM Server Events Intake API schema](https://www.elastic.co/guide/en/apm/server/current/events-api.html).
5+
Fields that are names or identifiers of some resource of typically limited to
6+
1024 unicode characters.
7+
8+
### `long_field_max_length` configuration
9+
10+
Some APM event fields are not limited in the APM server intake API schema.
11+
Agents SHOULD limit the maximum length of the following fields by truncating.
12+
13+
- `transaction.context.request.body`, `error.context.request.body`
14+
- `transaction.context.message.body`, `span.context.message.body`, `error.context.message.body`
15+
- `span.context.db.statement`
16+
- `error.exception.message`
17+
- `error.log.message`
18+
19+
Agents MAY support the `long_field_max_length` configuration option to allow
20+
the user to configure this maximum length. This option defines a maximum number
21+
of unicode characters for each field.
22+
23+
| | |
24+
|----------------|-----------|
25+
| Type | `Integer` |
26+
| Default | `10000` |
27+
| Dynamic | `false` |
28+
| Central config | `false` |
29+
30+
Ultimately the maximum length of any field is limited by the [`max_event_size`](https://www.elastic.co/guide/en/apm/server/current/configuration-process.html#max_event_size)
31+
configured for the receiving APM server.

0 commit comments

Comments
 (0)