"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTracing = exports.withTracing = void 0;
const tracing_1 = require("./tracing");
const TRACING_ID_KEY = "ctx-key-tracing-id";
const withTracing = (ctx, id) => {
    return Object.assign(Object.assign({}, ctx), { [TRACING_ID_KEY]: id });
};
exports.withTracing = withTracing;
const getTracing = (ctx) => {
    const l = ctx[TRACING_ID_KEY];
    if (l == undefined) {
        return (0, tracing_1.newTracing)();
    }
    return l;
};
exports.getTracing = getTracing;
//# sourceMappingURL=context.js.map