Use this API to send metrics to Anodot based on a schema you've defined (Protocol 2.0)
The “what=” property describes what is actually being measured, while the rest of the properties describe the various dimensions used to create the measure.
By adding the property name with equal sign (=) to each token, you can use the Anodot service to easily find, aggregate, manipulate and understand any metric.
The order of the property-value pairs in a 2.0 metric does not matter. All you need to do is simply be consistent with the property names, making sure that each metric has a unique name. Metrics are uniquely identified using their generated names; therefore, no two metrics should share all the same the property-value pairs.
Request Arguments
| Field | Description |
|---|---|
| properties | List of metric properties represented as key-value pairs. This array must always include a what property. See the notes below for best practices. |
| tags | (Optional) List of tags attached to the metric, represented as key-value pairs. Tags are metadata and do not affect metric uniqueness. |
| timestamp | Integer representing the data sample timestamp (Unix epoch time in seconds). Must not be more than one hour in the future. |
| value | Decimal double-precision number without thousands separators. |
Notes on the properties Array
-
Property keys and values must contain only ASCII/UTF-8 characters.
-
The following characters are not allowed in property keys or values: ., =, and spaces. Replace them with _ if needed.
-
The what property is mandatory and represents what the metric measures.
-
A metric can contain up to 20 properties.
-
Property keys must be non-empty strings with a maximum length of 50 characters.
-
Property values must be non-empty strings with a maximum length of 150 characters.
-
The combination of all property keys and values determines the uniqueness of a metric in Anodot.
-
The target_type property defines how samples of the same metric are aggregated in Anodot.
Support values:
-
gauge - average aggregation (default)
-
counter - sum aggregation
200