Skip to content

Event processor migration: RequestData integration #20380

Description

@Lms24

This integration populates event.request, including headers, IP, cookies, etc. We need to set all this data as attributes on the segment span. Two strategies:

  • add the logic to applyScopeToSegmentSpan in captureSpan. This is preferrable from bundle-size perspective because captureSpan can be tree-shaken out for non-streaming users. But means request attribute creation isn't co-located with the integration. Might be a fine tradeoff though 🙂
    • I started a version of this for contexts in my experimental PoC branch:
      functionapplyScopeToSegmentSpan(segmentSpanJSON: SpanV2JSON,scopeData: ScopeData): void{
      // TODO: Apply all scope and request data from auto instrumentation (contexts, request) to segment span
      const{ contexts }=scopeData;
      safeSetSpanJSONAttributes(segmentSpanJSON,contextsToAttributes(contexts));
      }
    • This also applies to other contexts kept on the scope.
  • Alternatively add a processSegmentSpan implementation to the integration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions