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

Function metric

packages/effect/src/unstable/devtools/DevToolsSchema.ts:264–271  ·  view source on GitHub ↗
(type: Type, state: State)

Source from the content-addressed store, hash-verified

262export type MetricLabel = Schema.Schema.Type<typeof MetricLabel>
263
264const metric = <Type extends string, State extends Schema.Constraint>(type: Type, state: State) =>
265 Schema.Struct({
266 id: Schema.String,
267 type: Schema.tag(type),
268 description: Schema.UndefinedOr(Schema.String),
269 attributes: Schema.UndefinedOr(Schema.Record(Schema.String, Schema.String)),
270 state
271 })
272
273/**
274 * Schema for a counter metric snapshot, including the count and whether updates

Callers 1

DevToolsSchema.tsFile · 0.85

Calls 1

tagMethod · 0.65

Tested by

no test coverage detected