( metric: Metric<Input, State>, attributes: Metric.Attributes | undefined )
| 3474 | // Utilities |
| 3475 | |
| 3476 | function makeKey<Input, State>( |
| 3477 | metric: Metric<Input, State>, |
| 3478 | attributes: Metric.Attributes | undefined |
| 3479 | ) { |
| 3480 | let key = `${metric.type}:${metric.id}` |
| 3481 | if (Predicate.isNotUndefined(metric.description)) { |
| 3482 | key += `:${metric.description}` |
| 3483 | } |
| 3484 | if (Predicate.isNotUndefined(attributes)) { |
| 3485 | key += `:${serializeAttributes(attributes)}` |
| 3486 | } |
| 3487 | return key |
| 3488 | } |
| 3489 | |
| 3490 | function makeHooks<Input, State>( |
| 3491 | get: (context: Context.Context<never>) => State, |
no test coverage detected