Skip to content

fix: document null as an accepted metric attribute value - #2185

Open
JulienChavee wants to merge 1 commit into
getsentry:masterfrom
JulienChavee:master
Open

fix: document null as an accepted metric attribute value#2185
JulienChavee wants to merge 1 commit into
getsentry:masterfrom
JulienChavee:master

Conversation

@JulienChavee

Copy link
Copy Markdown
Contributor

Description

Attribute::tryFromValue() already accepts null and converts it to the string "null", but the public metric attribute type declarations (array<string, int|float|string|bool>) excluded null. This meant static analysis rejected null attribute values even though they work correctly at runtime, forcing callers (and wrapper implementations) to suppress type errors.

Issues

resolves: #2182

@JulienChavee JulienChavee changed the title fix: document null as an accepted metric attribute value (#2) fix: document null as an accepted metric attribute value Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics - Document null as an accepted attribute value (Attribute::tryFromValue() already supports it)

1 participant