Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow implementations to export log records with duplicate keys in a map as opt-in #3987

Merged
merged 25 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from 21 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ release.

### Logs

- Allow SDK to export duplicate keys in a map as an opt-in option.
pellared marked this conversation as resolved.
Show resolved Hide resolved
([#3938](https://github.com/open-telemetry/opentelemetry-specification/pull/3938))

### Events

### Resource
Expand Down
13 changes: 11 additions & 2 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,21 @@ Value of type `any` can be one of the following:
#### Type `map<string, any>`

Value of type `map<string, any>` is a map of string keys to `any` values. The
keys in the map are unique (duplicate keys are not allowed). The representation
of the map is language-dependent.
keys in the map are unique (duplicate keys are not allowed).

Arbitrary deep nesting of values for arrays and maps is allowed (essentially
allows to represent an equivalent of a JSON object).

The representation of the map is language-dependent.

The SDK MUST by default ensure that the exported maps contain only unique keys.
pellared marked this conversation as resolved.
Show resolved Hide resolved
pellared marked this conversation as resolved.
Show resolved Hide resolved

The SDK MAY have an option to allow exporting maps with duplicate keys
pellared marked this conversation as resolved.
Show resolved Hide resolved
(e.g. for better performance).
If such option is provided, it MUST be documented that for many receivers,
pellared marked this conversation as resolved.
Show resolved Hide resolved
handling of maps with duplicate keys is unpredictable and it is the users'
responsibility to ensure keys are not duplicate.
pellared marked this conversation as resolved.
Show resolved Hide resolved
tigrannajaryan marked this conversation as resolved.
Show resolved Hide resolved

### Field Kinds

This Data Model defines a logical model for a log record (irrespective of the
Expand Down
Loading