rsnext/packages/next/telemetry/trace/shared.ts
Tim Neutkens cf4ba8d705
Upgrade eslint to the latest version (#24377)
## 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
2021-04-25 18:34:36 +00:00

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() {}