Skip to content

Event API should document whether it supports complex attribute types #4199

@lmolkova

Description

@lmolkova

We restrict attribute types to primitives and array or primitives and make an exception for LogRecord.

The standard attribute definition SHOULD be used to represent attributes in data
modeling unless there is a strong justification to diverge. For example, the Log
Data Model has an extended [attributes](../logs/data-model.md#field-attributes)
definition allowing values of [type `Any`](../logs/data-model.md#type-any). This
reflects that LogRecord attributes are expected to model data produced from

See #3858 for the context.

Semconv event definition however limits events attributes and does not allow them to have complex types.

It MAY have standard
attributes that provide additional context about the event.

https://github.com/open-telemetry/semantic-conventions/blob/11f5d37d1624c2392ea97f40e76c1b3c7cd30124/docs/general/events.md?plain=1#L61

We should explicitly call out supported attribute types for events in the spec so that the restriction applies to all events and not just those defined in semantic conventions (or decide that events support complex types).

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig-issueA specific SIG should look into this before discussing at the specspec:logsRelated to the specification/logs directory

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions