rsnext/packages/next/trace/shared.ts
Tim Neutkens c1e5f5b260
Make traces in development reliable (#28990)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2021-09-13 15:49:29 +02:00

15 lines
356 B
TypeScript

// eslint typescript has a bug with TS enums
/* eslint-disable no-shadow */
export enum TARGET {
CONSOLE = 'CONSOLE',
ZIPKIN = 'ZIPKIN',
JAEGER = 'JAEGER',
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)
}