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

Function attributesToRecord

packages/effect/src/Metric.ts:3509–3517  ·  view source on GitHub ↗
(attributes?: Metric.Attributes)

Source from the content-addressed store, hash-verified

3507}
3508
3509function attributesToRecord(attributes?: Metric.Attributes): Metric.AttributeSet | undefined {
3510 if (Predicate.isNotUndefined(attributes) && Array.isArray(attributes)) {
3511 return attributes.reduce((acc, [key, value]) => {
3512 InternalRecord.assignProperty(acc, key, value)
3513 return acc
3514 }, {} as Metric.AttributeSet)
3515 }
3516 return attributes as Metric.AttributeSet | undefined
3517}
3518
3519function addAttributesToContext(
3520 context: Context.Context<never>,

Callers 7

getOrCreateFunction · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
mergeAttributesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected