Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function extractSpanContextFromEventData(eventData: EventData): SpanContext | undefined {
if (!eventData.properties || !eventData.properties[TRACEPARENT_PROPERTY]) {
return;
}
const diagnosticId = eventData.properties[TRACEPARENT_PROPERTY];
return extractSpanContextFromTraceParentHeader(diagnosticId);
}