MCPcopy Create free account
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/effect/src/Metric.ts:1738–1747  ·  view source on GitHub ↗
(id: string, options?: {
    readonly description?: string | undefined
    readonly attributes?: Metric.Attributes | undefined
    readonly bigint?: boolean | undefined
    readonly incremental?: boolean | undefined
  })

Source from the content-addressed store, hash-verified

1736 readonly #incremental: boolean
1737
1738 constructor(id: string, options?: {
1739 readonly description?: string | undefined
1740 readonly attributes?: Metric.Attributes | undefined
1741 readonly bigint?: boolean | undefined
1742 readonly incremental?: boolean | undefined
1743 }) {
1744 super(id, options?.description, attributesToRecord(options?.attributes))
1745 this.#bigint = options?.bigint ?? false
1746 this.#incremental = options?.incremental ?? false
1747 }
1748
1749 createHooks(): Metric.Hooks<Input, CounterState<Input>> {
1750 let count = (this.#bigint ? bigint0 : 0) as any

Callers

nothing calls this directly

Calls 1

attributesToRecordFunction · 0.85

Tested by

no test coverage detected