-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e9d448
commit 42e36a6
Showing
9 changed files
with
937 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
id: metric | ||
title: Monitoring Metric | ||
--- | ||
|
||
## Metric Object | ||
|
||
A monitoring metric object contains information about a particular metric collected during application execution. Metrics are stored and processed internally by monitoring adapters and can be accessed through a monitoring object's [`getMetrics`](monitoring.md#getmetrics) method: | ||
|
||
```js | ||
const metrics = monitoring.getMetrics('default') | ||
``` | ||
|
||
A metric object has the following structure: | ||
|
||
```js | ||
{ | ||
metricName, // The name of a metric. | ||
dimensions, // An array of monitoring dimensions. | ||
timestamp, // The time at which the metric was last updated. | ||
values, // An array of the metric's values. | ||
counts, // An array of the metric's counts. | ||
unit, // The name of the measurment unit. | ||
} | ||
``` | ||
|
||
## Custom Metric Object | ||
|
||
A custom metric object is used to pass metric data to the `metrics.custom()` method. This object has the following structure: | ||
|
||
```js | ||
{ | ||
metricName, // The name of a metric. | ||
dimensions, // An array of monitoring dimensions. | ||
value, // The metric's values. | ||
count, // The metric's count. | ||
unit, // The name of the measurment unit. | ||
} | ||
``` |
Oops, something went wrong.