feat: update dependencies, node
This commit is contained in:
7
node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
generated
vendored
7
node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
generated
vendored
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user