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.

  • end_time (string) – The end time in RFC3339 UTC “Zulu” format.
  • start_time (string or None) – An optional start time in RFC3339 UTC “Zulu” format.
  • value (object) – The metric value. This can be a scalar or a distribution.
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 the time_series() factory method of the Client class.

  • metric (Metric) – A metric object.
  • resource (Resource) – A resource object.
  • metric_kind (string) – The kind of measurement: MetricKind.GAUGE, MetricKind.DELTA, or MetricKind.CUMULATIVE. See MetricKind.
  • value_type (string) – The value type of the metric: ValueType.BOOL, ValueType.INT64, ValueType.DOUBLE, ValueType.STRING, or ValueType.DISTRIBUTION. See ValueType.
  • points (list of Point) – A list of point objects.

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.

A single dictionary with values for all the labels.

This combines resource.labels and metric.labels and also adds "resource_type".