MetricUpdate

Describes the state of a metric.

JSON representation
{
  "name": {
    object (MetricStructuredName)
  },
  "kind": string,
  "cumulative": boolean,
  "scalar": value,
  "meanSum": value,
  "meanCount": value,
  "set": value,
  "distribution": value,
  "gauge": value,
  "internal": value,
  "updateTime": string
}
Fields
name

object (MetricStructuredName)

Name of the metric.

kind

string

Metric aggregation kind. The possible metric aggregation kinds are "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". The specified aggregation kind is case-insensitive.

If omitted, this is not an aggregated value but instead a single metric sample value.

cumulative

boolean

True if this metric is reported as the total cumulative aggregate value accumulated since the worker started working on this WorkItem. By default this is false, indicating that this metric is reported as a delta that is not associated with any WorkItem.

scalar

value (Value format)

Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", "And", and "Or". The possible value types are Long, Double, and Boolean.

meanSum

value (Value format)

Worker-computed aggregate value for the "Mean" aggregation kind. This holds the sum of the aggregated values and is used in combination with meanCount below to obtain the actual mean aggregate value. The only possible value types are Long and Double.

meanCount

value (Value format)

Worker-computed aggregate value for the "Mean" aggregation kind. This holds the count of the aggregated values and is used in combination with meanSum above to obtain the actual mean aggregate value. The only possible value type is Long.

set

value (Value format)

Worker-computed aggregate value for the "Set" aggregation kind. The only possible value type is a list of Values whose type can be Long, Double, or String, according to the metric's type. All Values in the list must be of the same type.

distribution

value (Value format)

A struct value describing properties of a distribution of numeric values.

gauge

value (Value format)

A struct value describing properties of a Gauge. Metrics of gauge type show the value of a metric across time, and is aggregated based on the newest value.

internal

value (Value format)

Worker-computed aggregate value for internal use by the Dataflow service.

updateTime

string (Timestamp format)

Timestamp associated with the metric value. Optional when workers are reporting work progress; it will be filled in responses from the metrics API.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

MetricStructuredName

Identifies a metric, by describing the source which generated the metric.

JSON representation
{
  "origin": string,
  "name": string,
  "context": {
    string: string,
    ...
  }
}
Fields
origin

string

Origin (namespace) of metric name. May be blank for user-define metrics; will be "dataflow" for metrics defined by the Dataflow service or SDK.

name

string

Worker-defined metric name.

context

map (key: string, value: string)

Zero or more labeled fields which identify the part of the job this metric is associated with, such as the name of a step or collection.

For example, built-in counters associated with steps will have context['step'] = . Counters associated with PCollections in the SDK will have context['pcollection'] = .