Using Istio 1.8.2
Followed the instructions here Istio / Customizing Istio Metrics, with some changes to try to create a new metric rather than altering an existing one.
My configuration is:
telemetry:
v2:
prometheus:
configOverride:
inboundSidecar:
definitions:
- name: test_metric
type: COUNTER
value: "1"
metrics:
- name: test_metric
dimensions:
request_host: request.host
outboundSidecar:
definitions:
- name: test_metric
type: COUNTER
value: "1"
metrics:
- name: test_metric
dimensions:
request_host: request.host
gateway:
definitions:
- name: test_metric
type: COUNTER
value: "1"
metrics:
- name: test_metric
dimensions:
request_host: request.host
My envoy config now has a large number of istio.stats
filter entries, with the following information:
"configuration": {
"@type": "type.googleapis.com/google.protobuf.StringValue",
"value": "{\"definitions\":[{\"name\":\"test_metric\",\"type\":\"COUNTER\",\"value\":\"1\"}],\"metrics\":[{\"dimensions\":{\"request_host\":\"request.host\"},\"name\":\"test_metric\"}]}\n"
}
Which I’m assuming isn’t correct, as there are no test_metric
or istio_test_metric
stats being output by envoy - however I haven’t been able to find a good example of what this should look like, and there am mostly extrapolating from the docs, which only talk about altering an existing metric.
If anyone has any insight into what I’m doing incorrectly here that would be greatly appreciated - thanks!