Time Series#
Time series for the Google Stackdriver Monitoring API (V3).
- Features intentionally omitted from this first version of the client library:
- Writing time series.
- Natural representation of distribution values.
-
class
google.cloud.monitoring.timeseries.
Point
[source]# Bases:
google.cloud.monitoring.timeseries.Point
A single point in a time series.
Parameters:
-
class
google.cloud.monitoring.timeseries.
TimeSeries
[source]# Bases:
google.cloud.monitoring.timeseries.TimeSeries
A single time series of metric values.
The preferred way to construct a
TimeSeries
object is using thetime_series()
factory method of theClient
class.Parameters: - metric (
Metric
) – A metric object. - resource (
Resource
) – A resource object. - metric_kind (string) – The kind of measurement:
MetricKind.GAUGE
,MetricKind.DELTA
, orMetricKind.CUMULATIVE
. SeeMetricKind
. - value_type (string) – The value type of the metric:
ValueType.BOOL
,ValueType.INT64
,ValueType.DOUBLE
,ValueType.STRING
, orValueType.DISTRIBUTION
. SeeValueType
. - points (list of
Point
) – A list of point objects.
-
header
(points=None)[source]# Copy everything but the point data.
Parameters: points (list of Point
, or None) – An optional point list.Return type: TimeSeries
Returns: The new time series object.
-
labels
# A single dictionary with values for all the labels.
This combines
resource.labels
andmetric.labels
and also adds"resource_type"
.
- metric (