Class: MetricsContext
Constructors
constructor
• new MetricsContext()
Methods
addMetrics
▸ addMetrics(namespace
, definitions
): void
Parameters
Name | Type |
---|---|
namespace | string |
definitions | MetricsDefinition |
Returns
void
createReportProducer
▸ createReportProducer(onReport
, interval
, abortSignal
, formatNumber?
): void
Parameters
Name | Type |
---|---|
onReport | (report : MetricsReport ) => void |
interval | number |
abortSignal | AbortSignal |
formatNumber? | (value : number ) => string |
Returns
void
getMetric
▸ getMetric(id
): undefined
| Metric
Parameters
Name | Type |
---|---|
id | string |
Returns
undefined
| Metric