ref(browser): send INP as span v2 envelope#21220
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3842126. Configure here.
|
|
||
| if (typeof value === 'number') { | ||
| return { type: Number.isInteger(value) ? 'integer' : 'double', value }; | ||
| } |
There was a problem hiding this comment.
Duplicated serialization diverges from core NaN handling
Low Severity
The new serializeSpanAttributeValue reimplements the core's getTypedAttributeValue (in attributes.ts) but omits the !Number.isNaN(value) guard. The core explicitly drops NaN numbers, while this code would produce { type: 'double', value: NaN }, which JSON-serializes to null. The broader streamedSpanJsonToSerializedSpan and serializeSpanAttributes functions also duplicate existing core utilities (spanUtils.ts and attributes.ts) with further divergences: the unit property from attribute objects is dropped, and links aren't serialized. Maintaining two parallel serialization paths risks inconsistencies when the core version is updated.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 3842126. Configure here.
size-limit report 📦
|
366b21d to
886135a
Compare
Co-Authored-By: Codex <codex@openai.com>
886135a to
f7159a9
Compare


Sends INP spans as v2 spans exclusively without a fallback path, this allows us to completely drop standalone v1 span implementation.
This is meant as a breaking change.