Skip to content

Commit

Permalink
Add long_field_max_length configuration option (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm committed Oct 6, 2021
1 parent 6fde01b commit 917cfd7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions specs/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ You can find details about each of these in the [APM Data Model](https://www.ela
- [Agent Configuration](configuration.md)
- [Agent logging](logging.md)
- [Data sanitization](sanitization.md)
- [Field limits](field-limits.md)

# Processes

Expand Down
31 changes: 31 additions & 0 deletions specs/agents/field-limits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Field limits

The maximum length of metadata, transaction, span, et al fields are determined
by the [APM Server Events Intake API schema](https://www.elastic.co/guide/en/apm/server/current/events-api.html).
Fields that are names or identifiers of some resource of typically limited to
1024 unicode characters.

### `long_field_max_length` configuration

Some APM event fields are not limited in the APM server intake API schema.
Agents SHOULD limit the maximum length of the following fields by truncating.

- `transaction.context.request.body`, `error.context.request.body`
- `transaction.context.message.body`, `span.context.message.body`, `error.context.message.body`
- `span.context.db.statement`
- `error.exception.message`
- `error.log.message`

Agents MAY support the `long_field_max_length` configuration option to allow
the user to configure this maximum length. This option defines a maximum number
of unicode characters for each field.

| | |
|----------------|-----------|
| Type | `Integer` |
| Default | `10000` |
| Dynamic | `false` |
| Central config | `false` |

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)
configured for the receiving APM server.

0 comments on commit 917cfd7

Please sign in to comment.