July 2019
Intermediate to advanced
502 pages
14h
English
Istio collects metrics after each request. The metrics are sent to Mixer. Envoy is the primary producer of metrics, but you can add your own metrics if you wish. The configuration model for metrics is based on multiple Istio concepts: attributes, instances, templates, handlers, rules, and Mixer adapters.
Here is a sample instance that counts all the requests and reports them as the request-count metric:
apiVersion: config.istio.io/v1alpha2 kind: instance metadata: name: request-count namespace: istio-system spec: compiledTemplate: metric params: value: "1" # count each request dimensions: reporter: conditional((context.reporter.kind | "inbound") == "outbound", "client", "server") source: source.workload.name ...