Skip to content

PURISTA API


PURISTA API / @purista/core / validateMetricAttributes

Function: validateMetricAttributes()

validateMetricAttributes(attributes?): object

Defined in: core/metrics/attributePolicy.ts:64

Normalizes metric attributes by keeping only safe scalar attributes.

Parameters

attributes?

Record<string, unknown>

Returns

object

attributes

attributes: PuristaMetricAttributes

droppedAttributeKeys

droppedAttributeKeys: string[]

Example

ts
const { attributes } = validateMetricAttributes({ channel: 'web', trace_id: 'drop' })