I created custom metrics with IstioOperator
as such (example only in inboundSidecar
, but I also add it for outboundSidecar
and Gateway
)
telemetry:
v2:
prometheus:
configOverride:
inboundSidecar:
debug: true
definitions:
- name: proxy_latency_milliseconds
type: 'HISTOGRAM'
value: "(request.duration - duration(response.headers['x-envoy-upstream-service-time']+'ms')).getMilliseconds()"
stat_prefix: istio
I want this proxy_latency_milliseconds
to be differentiated based on whether it is in inbound sidecar, outbound sidecar, or gateway. For default istio metrics, there is label called reporter
, but I can't find that label on this custom metrics. How do I get it?
I have tried adding a custom dimension label by name proxy_type
, each with a different value such as:
- dimensions:
request_host: request.host
request_method: request.method
route_name: route_name
response_code_details: '(response.code_details == "via_upstream") ? response.code_details : "other"'
proxy_type: "inbound"
however, when I see the actual metrics, it is actually shown as "unknown" instead of "inbound" or "outbound" or "gateway".