Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/observability / / Sampler

Interface: Sampler

Defined in: packages/observability/src/tracer/sampling.ts:77

Stable

Methods

shouldIncludeChunkContent()

ts
shouldIncludeChunkContent(): boolean;

Defined in: packages/observability/src/tracer/sampling.ts:83

Returns whether chunk content should travel through the exporter.

Returns

boolean


shouldRecordEvent()

ts
shouldRecordEvent(name): boolean;

Defined in: packages/observability/src/tracer/sampling.ts:81

Decide whether a span event of the given name should be recorded.

Parameters

ParameterType
namestring

Returns

boolean


shouldSample()

ts
shouldSample(type, parentSampled?): boolean;

Defined in: packages/observability/src/tracer/sampling.ts:79

Decide whether a span of the given type should be recorded.

Parameters

ParameterType
typestring
parentSampled?boolean

Returns

boolean