tcex.tcex_metrics_v2 module¶
TcEx Metrics Module
-
class
tcex.tcex_metrics_v2.TcExMetricsV2(tcex, name, description, data_type, interval, keyed=False)[source]¶ Bases:
objectTcEx Metrics Class
-
add(value, date=None, return_value=False, key=None)[source]¶ Add metrics data to collection.
Parameters: - value (str) – The value of the metric.
- date (str, optional) – The optional date of the metric.
- (bool, default (return_value) – False): Tell the API to return the updates metric value.
- key (str, optional) – The key value for keyed metrics.
Returns: - If return_value is True a dict with the current value for the time period
is returned.
Return type: dict
-
add_keyed(value, key, date=None, return_value=False)[source]¶ Add keyed metrics data to collection.
Parameters: - value (str) – The value of the metric.
- key (str) – The key value for keyed metrics.
- date (str, optional) – The optional date of the metric.
- (bool, default (return_value) – False): Tell the API to return the updates metric value.
Returns: - If return_value is True a dict with the current value for the time period
is returned.
Return type: dict
-