cf4ba8d705
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
18 lines
426 B
TypeScript
18 lines
426 B
TypeScript
// eslint typescript has a bug with TS enums
|
|
/* eslint-disable no-shadow */
|
|
export enum TARGET {
|
|
CONSOLE = 'CONSOLE',
|
|
ZIPKIN = 'ZIPKIN',
|
|
TELEMETRY = 'TELEMETRY',
|
|
}
|
|
|
|
export type SpanId = string
|
|
|
|
export const traceGlobals: Map<any, any> = new Map()
|
|
export const setGlobal = (key: any, val: any) => {
|
|
traceGlobals.set(key, val)
|
|
}
|
|
|
|
export const debugLog = !!process.env.TRACE_DEBUG
|
|
? console.info
|
|
: function noop() {}
|