feat(core-shared): symbols + barrel for instrumentation subpath

This commit is contained in:
2026-05-06 23:42:26 +02:00
parent 0ffda8078f
commit e133b92fe6
4 changed files with 22 additions and 1 deletions

View File

@@ -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",

View File

@@ -1,2 +1,3 @@
export { requireEnv } from "./lib/env";
export { toIsoString } from "./lib/date";
export * from "./instrumentation/index";

View 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";

View File

@@ -0,0 +1,4 @@
export const INSTRUMENTATION_SYMBOLS = {
TRACER: Symbol.for("core-shared.TRACER"),
LOGGER: Symbol.for("core-shared.LOGGER"),
} as const;