Skip to main content

IdGenerator

@forge/monorepo


@forge/monorepo / backend/src / IdGenerator

Type Alias: IdGenerator

IdGenerator = object

Defined in: backend/src/telemetry/trace-context.ts:80

Fresh ids.

randomHex is injected rather than reaching for crypto here, so a test can pin ids and assert that a child span really carries its parent's trace id — which is the one property of propagation that matters and the one that is untestable against a random source.

Properties

spanId

readonly spanId: () => string

Defined in: backend/src/telemetry/trace-context.ts:82

Returns

string


traceId

readonly traceId: () => string

Defined in: backend/src/telemetry/trace-context.ts:81

Returns

string