stackdriver Config

Index

Params

FieldTypeDescription
endpointstringEndpoint URL to send stackdriver data - leave empty to use the StackDriver SDK's default value (monitoring.googleapis.com).
projectIdstringGCP Project to attach metrics to.
pushIntervalDurationThis adapter batches the data it sends to Stackdriver; we will push to stackdriver every pushInterval. If no value is provided we default to once per minute.
metricInforepeated map<string, MetricInfo>A map of Istio metric name to Stackdriver metric info.
logInforepeated map<string, LogInfo>A map of Istio LogEntry name to Stackdriver log info.
appCredentialsbool (oneof )

Use Google's Application Default Credentials to authorize calls made by the StackDriver SDK.

See Google's documentation.

apiKeystring (oneof )The API Key to be used for auth.
serviceAccountPathstring (oneof )The path to a Google service account credential file, relative to the Mixer. E.g. /etc/opt/mixer/gcp-serviceaccount-creds.json or ./testdata/my-test-account-creds.json.

LogInfo

Describes how to represent an Istio Log in Stackdriver.

FieldTypeDescription
labelNames[]repeated stringThe logging template provides a set of variables; these list the subset of variables that should be used to form Stackdriver labels for the log entry.
payloadTemplatestringA golang text/template template that will be executed to construct the payload for this log entry. It will be given the full set of variables for the log to use to construct its result.
httpMappingHttpRequestMappingIf an HttpRequestMapping is provided, a HttpRequest object will be filled out for this log entry using the variables named in the mapping to populate the fields of the request struct from the instance's variables.

HttpRequestMapping

Maps from template variable names to the various fields of Stackdriver’s HTTP request struct. See https://godoc.org/cloud.google.com/go/logging#HTTPRequest

FieldTypeDescription
statusstringtemplate variable name to map into HTTPRequest.Status
requestSizestringtemplate variable name to map into HTTPRequest.RequestSize
responseSizestringtemplate variable name to map into HTTPRequest.ResponseSize
latencystringtemplate variable name to map into HTTPRequest.Latency
localIpstringtemplate variable name to map into HTTPRequest.LocalIP
remoteIpstringtemplate variable name to map into HTTPRequest.RemoteIP

MetricInfo

Describes how to represent an Istio metric in Stackdriver. See https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto

FieldTypeDescription
kindMetricKind
valueValueType
bucketsBucketsDefinitionFor metrics with a metric value of DISTRIBUTION, this provides a mechanism for configuring the buckets that will be used to store the aggregated values. This field must be provided for metrics declared to be of type DISTRIBUTION. This field will be ignored for non-distribution metric kinds.

BucketsDefinition

Describes buckets for DISTRIBUTION valued metrics.

FieldTypeDescription
linearBucketsLinear (oneof )The linear buckets.
exponentialBucketsExponential (oneof )The exponential buckets.
explicitBucketsExplicit (oneof )The explicit buckets.

Explicit

Specifies a set of buckets with arbitrary widths.

There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:

  • Upper bound (0 <= i < N-1): bounds[i]
  • Lower bound (1 <= i < N): bounds[i - 1]

The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.

FieldTypeDescription
bounds[]repeated doubleThe values must be monotonically increasing.

Exponential

Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.

There are numFiniteBuckets + 2 (= N) buckets. The two additional buckets are the underflow and overflow buckets.

Bucket i has the following boundaries:

  • Upper bound (0 <= i < N-1): scale * (growthFactor ^ i)
  • Lower bound (1 <= i < N): scale * (growthFactor ^ (i - 1))
FieldTypeDescription
numFiniteBucketsint32Must be greater than 0.
growthFactordoubleMust be greater than 1.
scaledoubleMust be greater than 0.

Linear

Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.

There are numFiniteBuckets + 2 (= N) buckets. The two additional buckets are the underflow and overflow buckets.

Bucket i has the following boundaries:

  • Upper bound (0 <= i < N-1): offset + (width * i)
  • Lower bound (1 <= i < N): offset + (width * (i - 1))
FieldTypeDescription
numFiniteBucketsint32Must be greater than 0.
widthdoubleMust be greater than 0.
offsetdoubleLower bound of the first bucket.

Package google.api

Index

MetricDescriptor

Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type’s existing data unusable.

NOTE: _No fields in this message type.__

MetricKind

The kind of measurement. It describes how the data is reported.

ValueDescription
METRICKINDUNSPECIFIEDDo not use this default value.
GAUGEAn instantaneous measurement of a value.
DELTAThe change in a value during a time interval.
CUMULATIVEA value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.

ValueType

The value type of a metric.

ValueDescription
VALUETYPEUNSPECIFIEDDo not use this default value.
BOOLThe value is a boolean. This value type can be used only if the metric kind is GAUGE.
INT64The value is a signed 64-bit integer.
DOUBLEThe value is a double precision floating point number.
STRINGThe value is a text string. This value type can be used only if the metric kind is GAUGE.
DISTRIBUTIONThe value is a Distribution.
MONEYThe value is money.