feat: update dependencies, node

This commit is contained in:
xHyroM 2022-10-29 10:03:51 +02:00
parent 0ec953ee6d
commit 29cb413d63
507 changed files with 84113 additions and 61309 deletions

View file

@ -15,6 +15,7 @@
*/
import { createContextKey } from '../context/context';
import { NonRecordingSpan } from './NonRecordingSpan';
import { ContextAPI } from '../api/context';
/**
* span key
*/
@ -27,6 +28,12 @@ var SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');
export function getSpan(context) {
return context.getValue(SPAN_KEY) || undefined;
}
/**
* Gets the span from the current context, if one exists.
*/
export function getActiveSpan() {
return getSpan(ContextAPI.getInstance().active());
}
/**
* Set the span on a context
*