feat(core-shared): symbols + barrel for instrumentation subpath
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
"./payload": "./src/payload/index.ts",
|
||||
"./trpc/init": "./src/trpc/init.ts",
|
||||
"./trpc/context": "./src/trpc/context.ts",
|
||||
"./trpc/define-error-middleware": "./src/trpc/define-error-middleware.ts"
|
||||
"./trpc/define-error-middleware": "./src/trpc/define-error-middleware.ts",
|
||||
"./instrumentation": "./src/instrumentation/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit",
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export { requireEnv } from "./lib/env";
|
||||
export { toIsoString } from "./lib/date";
|
||||
export * from "./instrumentation/index";
|
||||
|
||||
15
packages/core-shared/src/instrumentation/index.ts
Normal file
15
packages/core-shared/src/instrumentation/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export type {
|
||||
ITracer,
|
||||
ISpan,
|
||||
SpanOpts,
|
||||
AttributeValue,
|
||||
} from "./tracer.interface";
|
||||
export type {
|
||||
ILogger,
|
||||
Breadcrumb,
|
||||
CaptureContext,
|
||||
} from "./logger.interface";
|
||||
export { NoopTracer } from "./noop-tracer";
|
||||
export { NoopLogger } from "./noop-logger";
|
||||
export { withSpan } from "./with-span";
|
||||
export { INSTRUMENTATION_SYMBOLS } from "./symbols";
|
||||
4
packages/core-shared/src/instrumentation/symbols.ts
Normal file
4
packages/core-shared/src/instrumentation/symbols.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const INSTRUMENTATION_SYMBOLS = {
|
||||
TRACER: Symbol.for("core-shared.TRACER"),
|
||||
LOGGER: Symbol.for("core-shared.LOGGER"),
|
||||
} as const;
|
||||
Reference in New Issue
Block a user