mirror of
https://github.com/oven-sh/setup-bun.git
synced 2026-05-20 15:20:14 +02:00
feat: update dependencies, node
This commit is contained in:
+7
@@ -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