Skip to content

[RUM-11993] Add trace context and graphql fields to error event schema#370

Open
saraSr5 wants to merge 5 commits intomasterfrom
sara.susano/error-event-trace-graphql-fields
Open

[RUM-11993] Add trace context and graphql fields to error event schema#370
saraSr5 wants to merge 5 commits intomasterfrom
sara.susano/error-event-trace-graphql-fields

Conversation

@saraSr5
Copy link

@saraSr5 saraSr5 commented Mar 23, 2026

Motivation

When a network resource fails (timeout, no connectivity), the SDK emits a 'RUMErrorEvent'
Currently the error event schema has no trace context fields ('trace_id', 'span_id', 'parent_span_id', 'rule_psr')
and no 'graphql' struct on 'error.resource', unlike the success path ('RUMResourceEvent') which already has both.

This means cross-platform SDKs (React Native, Flutter) silently lose trace and GraphQL attributes on the error path.

Changes

  • Added trace context fields ('trace_id', 'span_id', 'parent_span_id', 'rule_psr') to '_dd' in the error event schema, mirroring 'RUMResourceEvent._dd'
  • Added 'graphql' struct to 'error.resource', mirroring 'RUMResourceEvent.resource.graphql'
  • Added 'error-schema.json' to the casing exceptions in 'scripts/validate.mjs' (same as 'resource-schema.json', since GraphQL field names follow camelCase convention)

@saraSr5 saraSr5 marked this pull request as ready for review March 23, 2026 13:05
@saraSr5 saraSr5 requested review from a team as code owners March 23, 2026 13:05
@saraSr5 saraSr5 requested a review from mormubis March 23, 2026 15:34
Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@saraSr5 saraSr5 force-pushed the sara.susano/error-event-trace-graphql-fields branch from c9ed97a to 4385e2f Compare March 24, 2026 11:14
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.

3 participants