Skip to content

Conversation

pellared
Copy link
Member

@pellared pellared commented Sep 8, 2025

Changes

  • Introduce of AnyValue type supporting complex data structures (empty value, byte arrays, heterogeneous arrays and maps).
  • Consolidate of attribute definitions across signals to use the unified AnyValue type.
  • Update attribute limits to accommodate new value types.
  • Allow attribute collections to contain duplicate keys via an opt-in configuration (as this is allowed for log attributes).
  • Remove "standard attribute" terminology in favor of general "attribute".

Extend attribute types

Prior-art (this PR guides towards this): #4636

Prototype: open-telemetry/opentelemetry-go#6809

Follows #4614

Related to #4602

Related proto PR: open-telemetry/opentelemetry-proto#707

https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/4485-extending-attributes-to-support-complex-values.md#how describes how languages should add support for new attribute value types.

Closes #4460 (no longer needed - feature is removed)

OTEP changes

Notice that this PR has changed the strategy for https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/4485-extending-attributes-to-support-complex-values.md#api from:

OTel API MAY support setting complex attributes on metrics, resources, instrumentation scope, span events, and as identifying entity attribute

to simply:

OTel API MUST support setting complex attribute.

This is the agreement up to this point: #4651 (comment)

The other change in the OTEP is because of #4651 (comment).

Attribute limit updates

Towards #4487

This also proposes minimal and non-breaking additions for the attribute limits: https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/4485-extending-attributes-to-support-complex-values.md#attribute-limits.

The proposal for attribute count limit is proposed because of #4651 (comment).

  • Predictability: Users can more easily understand and predict when they'll hit the limit. Especially given the existing behavior of attribute count limit.
  • Practical usage: Maps are typically used as cohesive units of related data, so counting them as single attributes aligns with their semantic purpose. Without this rule, a single map attribute with many internal key-value pairs could quickly exhaust the attribute count limit, which would be surprising behavior for users.

The proposal for attribute value length limit seems the most logical to me.

Comments to be addressed as followups

I am going to create issues to be created after this is PR merged:

pellared and others added 30 commits July 17, 2025 23:34
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pellared pellared requested a review from tsloughter October 6, 2025 16:51
@pellared pellared requested a review from trask October 14, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:api Cross language API specification issue area:data-model For issues related to data model area:sdk Related to the SDK enhancement New feature or request entities spec:logs Related to the specification/logs directory spec:metrics Related to the specification/metrics directory spec:resource Related to the specification/resource directory spec:trace Related to the specification/trace directory

Projects

Status: In Progress
Status: In progress

Development

Successfully merging this pull request may close these issues.

Stabilize reuse of Standard Attributes in Logs API

8 participants