mirror of
https://github.com/oven-sh/setup-bun.git
synced 2026-06-15 14:40:45 +00:00
Next release of setup-bun
This commit is contained in:
+4
-3
@@ -17,7 +17,7 @@ import { ContextAPI } from '../api/context';
|
||||
import { getSpanContext, setSpan } from '../trace/context-utils';
|
||||
import { NonRecordingSpan } from './NonRecordingSpan';
|
||||
import { isSpanContextValid } from './spancontext-utils';
|
||||
var context = ContextAPI.getInstance();
|
||||
var contextApi = ContextAPI.getInstance();
|
||||
/**
|
||||
* No-op implementations of {@link Tracer}.
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ var NoopTracer = /** @class */ (function () {
|
||||
}
|
||||
// startSpan starts a noop span.
|
||||
NoopTracer.prototype.startSpan = function (name, options, context) {
|
||||
if (context === void 0) { context = contextApi.active(); }
|
||||
var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
|
||||
if (root) {
|
||||
return new NonRecordingSpan();
|
||||
@@ -58,10 +59,10 @@ var NoopTracer = /** @class */ (function () {
|
||||
ctx = arg3;
|
||||
fn = arg4;
|
||||
}
|
||||
var parentContext = ctx !== null && ctx !== void 0 ? ctx : context.active();
|
||||
var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
|
||||
var span = this.startSpan(name, opts, parentContext);
|
||||
var contextWithSpanSet = setSpan(parentContext, span);
|
||||
return context.with(contextWithSpanSet, fn, undefined, span);
|
||||
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
||||
};
|
||||
return NoopTracer;
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user