Add bool to show when execution tracker gets created.
This commit is contained in:
parent
6c20799b92
commit
d5850d59de
|
@ -12,10 +12,13 @@ export function init() {
|
||||||
const perRequestLimit = env.JS_PER_REQUEST_TIME_LIMIT_MS
|
const perRequestLimit = env.JS_PER_REQUEST_TIME_LIMIT_MS
|
||||||
let track: TrackerFn = f => f()
|
let track: TrackerFn = f => f()
|
||||||
if (perRequestLimit) {
|
if (perRequestLimit) {
|
||||||
tracer.trace("runJS.setupTracker", {}, span => {
|
tracer.trace<any>("runJS.setupTracker", {}, span => {
|
||||||
const bbCtx = context.getCurrentContext()
|
const bbCtx = context.getCurrentContext()
|
||||||
if (bbCtx) {
|
if (bbCtx) {
|
||||||
if (!bbCtx.jsExecutionTracker) {
|
if (!bbCtx.jsExecutionTracker) {
|
||||||
|
span?.addTags({
|
||||||
|
createdExecutionTracker: true,
|
||||||
|
})
|
||||||
bbCtx.jsExecutionTracker =
|
bbCtx.jsExecutionTracker =
|
||||||
timers.ExecutionTimeTracker.withLimit(perRequestLimit)
|
timers.ExecutionTimeTracker.withLimit(perRequestLimit)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue