Home > @firebase/performance > PerformanceTrace > putMetric
PerformanceTrace.putMetric() method
Sets the value of the specified custom metric to the given number regardless of whether a metric with that name already exists on the trace instance or not. The value will be floored down to an integer.
Signature:
putMetric(metricName: string, num: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
metricName | string | Name of the custom metric. |
num | number | Value to of the custom metric. |
Returns:
void