Time Series#
Time series for the Google Monitoring API (V3).
- Features intentionally omitted from this first version of the client library:
- Writing time series.
- Natural representation of distribution values.
-
class
gcloud.monitoring.timeseries.Point[source]# Bases:
gcloud.monitoring.timeseries.PointA single point in a time series.
Parameters: Create new instance of Point(end_time, start_time, value)
-
class
gcloud.monitoring.timeseries.TimeSeries[source]# Bases:
gcloud.monitoring.timeseries.TimeSeriesA single time series of metric values.
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.
Create new instance of TimeSeries(metric, resource, metric_kind, value_type, points)
-
header(points=None)[source]# Copy everything but the point data.
Parameters: points (list of Point, or None) – An optional point list.Return type: TimeSeriesReturns: The new time series object.
-
labels# A single dictionary with values for all the labels.
This combines
resource.labelsandmetric.labelsand also adds"resource_type".
- metric (