Metric
The metric
template is designed to let you describe runtime metric to dispatch to
monitoring backends.
Example config:
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: requestsize
namespace: istio-system
spec:
compiledTemplate: metric
params:
value: request.size | 0
dimensions:
source_version: source.labels["version"] | "unknown"
destination_service: destination.service.host | "unknown"
destination_version: destination.labels["version"] | "unknown"
response_code: response.code | 200
monitored_resource_type: '"UNSPECIFIED"'
Template
The metric
template represents a single piece of data to report.
When writing the configuration, the value for the fields associated with this template can either be a literal or an expression. Please note that if the datatype of a field is not istio.policy.v1beta1.Value, then the expression’s inferred type must match the datatype of the field.