|
| 1 | ++++ |
| 2 | +title= "Integrate with OpenTelemetry Collector (Experimental)" |
| 3 | +description= "Detail of integrating OpenTelemetry Collector in KEDA" |
| 4 | +weight = 100 |
| 5 | ++++ |
| 6 | + |
| 7 | +## Push Metrics to OpenTelemetry Collector (Experimental) |
| 8 | + |
| 9 | +### Operator |
| 10 | + |
| 11 | +The KEDA Operator supports outputting metrics to the OpenTelemetry collector using HTTP. The parameter `--enable-opentelemetry-metrics=true` needs to be set. KEDA will push metrics to the OpenTelemetry collector specified by the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable. Other environment variables in OpenTelemetry are also supported (https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/). Here is an example configuration of the operator: |
| 12 | +``` |
| 13 | +apiVersion: apps/v1 |
| 14 | +kind: Deployment |
| 15 | +metadata: |
| 16 | + name: keda-operator |
| 17 | + ... |
| 18 | + containers: |
| 19 | + - name: keda-operator |
| 20 | + image: ghcr.io/kedacore/keda:latest |
| 21 | + command: |
| 22 | + - /keda |
| 23 | + args: |
| 24 | + --enable-opentelemetry-metrics=true |
| 25 | + ... |
| 26 | + ... |
| 27 | + env: |
| 28 | + - name: OTEL_EXPORTER_OTLP_ENDPOINT |
| 29 | + value: "http://opentelemetry-collector.default.svc.cluster.local:4318" |
| 30 | +``` |
| 31 | +The following metrics are being gathered: |
| 32 | + |
| 33 | +| Metric | Description | |
| 34 | +| ------ | ----------- | |
| 35 | +| `keda.build.info` | Info metric, with static information about KEDA build like: version, git commit and Golang runtime info. | |
| 36 | +| `keda.scaler.active` | This metric marks whether the particular scaler is active (value == 1) or in|active (value == 0). | |
| 37 | +| `keda.scaler.metrics.value` | The current value for each scaler's metric that would be used by the HPA in computing the target average. | |
| 38 | +| `keda.scaler.metrics.latency` | The latency of retrieving current metric from each scaler. | |
| 39 | +| `keda.scaler.errors` | The number of errors that have occurred for each scaler. | |
| 40 | +| `keda.scaler.errors.total` | The total number of errors encountered for all scalers. | |
| 41 | +| `keda.scaled.object.errors` | The number of errors that have occurred for each ScaledObject. | |
| 42 | +| `keda.resource.totals` | Total number of KEDA custom resources per namespace for each custom resource type (CRD). | |
| 43 | +| `keda.trigger.totals` | Total number of triggers per trigger type. | |
| 44 | +| `keda.internal.scale.loop.latency` | Total deviation (in milliseconds) between the expected execution time and the actual execution time for the scaling loop. This latency could be produced due to accumulated scalers latencies or high load. This is an internal metric. | |
0 commit comments