• Metric
    • Template

    Metric

    The metric template is designed to let you describe runtime metric to dispatch tomonitoring backends.

    Example config:

    1. apiVersion: "config.istio.io/v1alpha2"
    2. kind: instance
    3. metadata:
    4. name: requestsize
    5. namespace: istio-system
    6. spec:
    7. compiledTemplate: metric
    8. params:
    9. value: request.size | 0
    10. dimensions:
    11. source_version: source.labels["version"] | "unknown"
    12. destination_service: destination.service.host | "unknown"
    13. destination_version: destination.labels["version"] | "unknown"
    14. response_code: response.code | 200
    15. 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 aliteral 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.

    FieldTypeDescriptionRequired
    valueValueThe value being reported.No
    dimensionsmap<string, Value>The unique identity of the particular metric to report.No
    monitoredResourceTypestringOptional. An expression to compute the type of the monitored resource this metric is being reported on.If the metric backend supports monitored resources, these fields are used to populate that resource. Otherwisethese fields will be ignored by the adapter.No
    monitoredResourceDimensionsmap<string, Value>Optional. A set of expressions that will form the dimensions of the monitored resource this metric is being reported on.If the metric backend supports monitored resources, these fields are used to populate that resource. Otherwisethese fields will be ignored by the adapter.No