Skip to content

[IMPORTANT] Extending attribute value types is no longer a breaking change#4614

Merged
lmolkova merged 8 commits intoopen-telemetry:mainfrom
pellared:allow-extending-attribute-types
Aug 19, 2025
Merged

[IMPORTANT] Extending attribute value types is no longer a breaking change#4614
lmolkova merged 8 commits intoopen-telemetry:mainfrom
pellared:allow-extending-attribute-types

Conversation

@pellared
Copy link
Copy Markdown
Member

@pellared pellared commented Aug 5, 2025

Towards #4602

Per OTEP: https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/4485-extending-attributes-to-support-complex-values.md#why-doesnt-this-require-a-major-version-bump

This basically reverts:

Before we did not have a consensus to extend the attribute value types. However, this has changed with:

Related proto PR:

As a follow-up I plan to create issues in all language repositories so that they can prepare their APIs and SDKs to extend the attribute value types.

@pellared pellared self-assigned this Aug 5, 2025
@pellared pellared added this to Logs SIG Aug 5, 2025
@pellared pellared moved this to In progress in Logs SIG Aug 5, 2025
@pellared pellared changed the title Extending attribute value types is no longer a beaking change Extending attribute value types is no longer a breaking change Aug 5, 2025
@pellared pellared marked this pull request as ready for review August 5, 2025 19:07
@pellared pellared requested review from a team August 5, 2025 19:07
@pellared pellared moved this from Todo to In Progress in Go: Logs (GA) Aug 12, 2025
Comment thread CHANGELOG.md Outdated
@pellared pellared changed the title Extending attribute value types is no longer a breaking change [IMPORTANT] Extending attribute value types is no longer a breaking change Aug 12, 2025
@lmolkova lmolkova added this pull request to the merge queue Aug 19, 2025
Merged via the queue into open-telemetry:main with commit b71106a Aug 19, 2025
5 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Logs SIG Aug 19, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Go: Logs (GA) Aug 19, 2025
@pellared pellared deleted the allow-extending-attribute-types branch August 25, 2025 12:53
@carlosalberto carlosalberto mentioned this pull request Sep 9, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Sep 16, 2025
### Entities

- Specify entity information via an environment variable.

([#4594](#4594))

### Common

- OTLP Exporters may allow devs to prepend a product identifier in
`User-Agent` header.

([#4560](#4560))
- ⚠️ **IMPORTANT**: Extending the set of standard attribute value types
is no longer a breaking change.

([#4614](#4614))

### OTEPs

- Clarify in Composite Samplers OTEP the unreliable threshold case.

([#4569](#4569))

---------

Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Oct 28, 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](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#type-mapstring-any)).
- 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:

-
#4651 (comment)
-
#4651 (comment)
-
#4651 (comment)

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants