Skip to content

Rule proposal: Attribute keys are limited to printable Basic Latin characters in the range U+0021–U+007E. #41

@antonjim-te

Description

@antonjim-te

Proposal

Rule ID: ATTR-001

Description: Attribute keys are limited to printable Basic Latin characters in the range U+0021–U+007E.

Rationale: Limiting attribute keys to printable Basic Latin (U+0021U+007E) ensures cross‑language and cross‑protocol interoperability, avoids control characters, whitespace, and Unicode normalization/confusable risks, and yields predictable parsing, filtering, and indexing across collectors, gateways, query engines, and storage. This reduces ingestion and serialization failures and keeps dashboards, alerts, and routing rules portable and reliable.

Target: Attribute (applies to Resource | Span | Metric | Log)

Criteria: The rule is violated if any attribute key contains a Unicode code point outside U+0021..U+007E. Equivalently, a key must match the regex: ^[!-~]+$.

Impact: Important

Type: Recommendation.

Ref: https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions