Clarify handling empty (null) values in Logs Data Model #3835
Labels
[label deprecated] triaged-accepted
[label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR
spec:logs
Related to the specification/logs directory
The Logs Data Model tells nothing about handling empty (null) values (e.g. for attributes).
See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#type-any
I think that the specification should include some clarification similarly to: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute.
I think that in "maps" an empty (null) value SHOULD be an acceptable value (only the key MUST be not null or empty). It is pretty common to have empty field values in complex structures and users would most likely preserved empty data e.g. in log attributes.
Take into consideration that it some languages it is not possible to define an API that would not accept a "null value" (e.g. zero value in Go). The implementation would have to take care of the empty value passed by the caller. Moreover, from https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute:
CC @open-telemetry/specs-logs-approvers
Related PR: pellared/opentelemetry-go#7
The text was updated successfully, but these errors were encountered: