(
context: Context.Context<never>,
attributes: Metric.Attributes | undefined
)
| 1703 | } |
| 1704 | |
| 1705 | getOrCreate( |
| 1706 | context: Context.Context<never>, |
| 1707 | attributes: Metric.Attributes | undefined |
| 1708 | ): Metric.Metadata<Input, State> { |
| 1709 | const key = makeKey(this, attributes) |
| 1710 | const registry = Context.get(context, MetricRegistry) |
| 1711 | if (registry.has(key)) { |
| 1712 | return registry.get(key)! |
| 1713 | } |
| 1714 | const hooks = this.createHooks() |
| 1715 | const meta: Metric.Metadata<Input, State> = { |
| 1716 | id: this.id, |
| 1717 | type: this.type, |
| 1718 | description: this.description, |
| 1719 | attributes: attributesToRecord(attributes), |
| 1720 | hooks |
| 1721 | } |
| 1722 | registry.set(key, meta) |
| 1723 | return meta |
| 1724 | } |
| 1725 | |
| 1726 | pipe() { |
| 1727 | return pipeArguments(this, arguments) |
nothing calls this directly
no test coverage detected