packages/node-core/src/integrations/context.ts
This adds a lot of context values to events which we need to port to attributes on spans (processSegmentSpan). What makes this challenging is that the event processor is async . In an earlier attempt, I "solved" this by running the async part in the integration's setup hook and setting all context values on the scope. Then in applyScopeToSegmentSpan, we'd read the values and convert them to attributes. We can probably get this fairly stable.
Alternatively, we do this with a processSegmentSpan hook on the integration. fine with both.
packages/node-core/src/integrations/context.tsThis adds a lot of context values to events which we need to port to attributes on spans (processSegmentSpan). What makes this challenging is that the event processor is async . In an earlier attempt, I "solved" this by running the async part in the integration's
setuphook and setting all context values on the scope. Then inapplyScopeToSegmentSpan, we'd read the values and convert them to attributes. We can probably get this fairly stable.Alternatively, we do this with a
processSegmentSpanhook on the integration. fine with both.