Add suggested string representation of complex attributes for non-OTLP protocols by trask · Pull Request #4848 · open-telemetry/opentelemetry-specification (original) (raw)

@trask

@trask mentioned this pull request

Jan 20, 2026

@trask trask changed the titleSuggested string representation of complex attributes for non-OTLP protocols Add suggested string representation of complex attributes for non-OTLP protocols

Jan 20, 2026

@trask trask marked this pull request as ready for review

January 20, 2026 20:07

jack-berg

lmolkova

jack-berg

lmolkova

@trask

carlosalberto

tigrannajaryan

@trask

trask

@trask trask mentioned this pull request

Jan 27, 2026

pellared

@trask

pellared

Merged via the queue into open-telemetry:main with commit adbab30

Feb 2, 2026

7 of 8 checks passed

github-merge-queue Bot pushed a commit that referenced this pull request

Feb 13, 2026

@carlosalberto

Context

(#4827)

(#4851)

Metrics

(#4868)

Logs

(#4824)

(#4885)

Resource

(#4856)

Common

(#4848)

Compatibility

(#4862)

(#4871)

SDK Configuration

(#4823)

(#4806)

(#4817)

pull Bot pushed a commit to weiyilai/opentelemetry-collector that referenced this pull request

Apr 21, 2026

@Vanshul97

…open-telemetry#15138)

Summary

Update float64AsString to return "NaN", "Infinity", and "-Infinity" instead of "json: unsupported value: ..." for special float values.

Fixes open-telemetry#14487

Problem

The current Value.AsString() for double values containing NaN, +Inf, or -Inf returns strings like:

json: unsupported value: +Inf
json: unsupported value: NaN

The OpenTelemetry specification's suggested string representation for non-OTLP protocols specifies these should be "NaN", "Infinity", and "-Infinity".

Fix

Updated float64AsString in pdata/pcommon/value.go to return spec-compliant strings:

Test Plan

This was referenced

Apr 27, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})