Bump semver

This commit is contained in:
Henry Mercer 2023-07-11 20:48:06 +01:00
parent 863a05b28b
commit 4b7eb74ef5
579 changed files with 13988 additions and 29840 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
*