/opt/canhelp/node_modules/@opentelemetry/api/build/esnext/baggage
NameSizeModeActions
internal/-0755rm
context-helpers.d.ts10320644editdlrm
context-helpers.js13090644editdlrm
context-helpers.js.map22800644editdlrm
types.d.ts20830644editdlrm
types.js1290644editdlrm
types.js.map23720644editdlrm
utils.d.ts6250644editdlrm
utils.js10780644editdlrm
utils.js.map19620644editdlrm
Edit: /opt/canhelp/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.js (1309B)
/* * Copyright The OpenTelemetry Authors * SPDX-License-Identifier: Apache-2.0 */ import { ContextAPI } from '../api/context'; import { createContextKey } from '../context/context'; /** * Baggage key */ const BAGGAGE_KEY = createContextKey('OpenTelemetry Baggage Key'); /** * Retrieve the current baggage from the given context * * @param {Context} Context that manage all context values * @returns {Baggage} Extracted baggage from the context */ export function getBaggage(context) { return context.getValue(BAGGAGE_KEY) || undefined; } /** * Retrieve the current baggage from the active/current context * * @returns {Baggage} Extracted baggage from the context */ export function getActiveBaggage() { return getBaggage(ContextAPI.getInstance().active()); } /** * Store a baggage in the given context * * @param {Context} Context that manage all context values * @param {Baggage} baggage that will be set in the actual context */ export function setBaggage(context, baggage) { return context.setValue(BAGGAGE_KEY, baggage); } /** * Delete the baggage stored in the given context * * @param {Context} Context that manage all context values */ export function deleteBaggage(context) { return context.deleteValue(BAGGAGE_KEY); } //# sourceMappingURL=context-helpers.js.map