Skip to content

Kuadrant TelemetryPolicy

The Kuadrant TelemetryPolicy CRD allows you to add custom labels to Kuadrant data plane component metrics.

How it works

Custom labels are defined as key-value pairs, where the key is the label name and the value is either a literal or a CEL expression. Using dynamically evaluated CEL expressions, you can label existing metrics with any data referenced by the Well-known Attributes.

Only labels with CEL expressions that resolve successfully will be included.

Examples

The following example configuration adds user and group labels for authenticated traffic.

apiVersion: extensions.kuadrant.io/v1alpha1
kind: TelemetryPolicy
metadata:
  name: user-group
  namespace: gateway-system
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: Gateway
    name: kuadrant-ingressgateway
  metrics:
    default:
      labels:
        user: auth.identity.userid
        group: auth.identity.groups