Skip to content

FENCE-3215: Record cross-platform framework and version on traces - #611

Draft
Jordan-Nelson wants to merge 1 commit into
masterfrom
jordan/fence-3215-trace-xplatform
Draft

Jordan-Nelson wants to merge 1 commit into
masterfrom
jordan/fence-3215-trace-xplatform

Conversation

@Jordan-Nelson

@Jordan-Nelson Jordan-Nelson commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Trace resources carried radar.sdk.version, which is always the native SDK version, so traces from cross-platform wrapper apps (React Native, Flutter, etc.) couldn't be told apart from native ones.

  • RadarTraceManager.record stores the framework (Native, or the wrapper's type) and the wrapper's version with each span. The values match the X-Radar-X-Platform-SDK-* headers.
  • The upload sets radar.sdk.xplatform.type and radar.sdk.xplatform.version on the OTLP resource. Native apps send no version.
  • A batch only holds spans with the same SDK version, framework and wrapper version, since they share one resource. This keeps spans recorded before a wrapper upgrade labeled with the version that recorded them.
  • Spans already on disk from earlier SDK versions have no framework, so the resource leaves it out and the server fills it in from the upload's headers (radarlabs/server#9208).

iOS: radarlabs/radar-sdk-ios#811

Linear ticket (Radar internal)

FENCE-3215

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (alters existing public API behavior)
  • Documentation / internal only (no SDK behavior change)

Manual test steps

Covered by unit tests in RadarTraceManagerTest:

  1. A native app's spans report Native with no version.
  2. A wrapper upgrade between spans uploads two batches, each with the version that recorded it.
  3. A span stored without a framework uploads in its own batch without the attribute.

Checklist

  • Added or updated unit tests (./gradlew test)
  • ./gradlew :sdk:ktlintCheck and ./gradlew :sdk:lintDebug pass locally
  • For breaking changes: added a MIGRATION.md entry and bumped version in sdk/build.gradle
  • Updated README / public docs if the public API changed
  • No real API keys committed in the example app
  • Only fixed lint/ktlint violations on lines I changed; removed any now-stale baseline entries

🤖 Generated with Claude Code

Trace resources only carried the native SDK version, so traces from
cross-platform wrapper apps couldn't be told apart from native ones.

Each stored span now records the framework (Native, or the wrapper's
type) and the wrapper's version, matching the X-Radar-X-Platform-SDK-*
headers. Batches only hold spans with the same values, and the upload
sets radar.sdk.xplatform.type and radar.sdk.xplatform.version on the
resource. Recording per span keeps spans from before a wrapper upgrade
labeled with the version that recorded them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant