You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/operate.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,3 +60,22 @@ Optional variables
60
60
`OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` - The batcher timeout in seconds to send batch of data points (`5` by default)
61
61
62
62
### Configuring Service Failover
63
+
64
+
# Configuring metrics for the KEDA HTTP Add-on Operator
65
+
66
+
### Exportable metrics:
67
+
***operator_http_scaled_object_count** - the number of http_scaled_object
68
+
69
+
There are currently 2 supported methods for exposing metrics from the operator - via a Prometheus compatible metrics endpoint or by pushing metrics to a OTEL HTTP collector.
70
+
71
+
### Configuring the Prometheus compatible metrics endpoint
72
+
When configured, the operator can expose metrics on a Prometheus compatible endpoint.
73
+
74
+
This endpoint can be enabled by setting the `OTEL_PROM_EXPORTER_ENABLED` environment variable to `true` on the operator deployment (`true` by default) and by setting `OTEL_PROM_EXPORTER_PORT` to an unused port for the endpoint to be made avaialble on (`2223` by default).
75
+
76
+
### Configuring the OTEL HTTP exporter
77
+
When configured, the ioperator can export metrics to a OTEL HTTP collector.
78
+
79
+
The OTEL exporter can be enabled by setting the `OTEL_EXPORTER_OTLP_METRICS_ENABLED` environment variable to `true` on the operator deployment (`false` by default). When enabled the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable must also be configured so the exporter knows what collector to send the metrics to (e.g. http://opentelemetry-collector.open-telemetry-system:4318).
80
+
81
+
If you need to provide any headers such as authentication details in order to utilise your OTEL collector you can add them into the `OTEL_EXPORTER_OTLP_HEADERS` environment variable. The frequency at which the metrics are exported can be configured by setting `OTEL_METRIC_EXPORT_INTERVAL` to the number of seconds you require between each export interval (`30` by default).
httpScaledObjectCounter, err:=meter.Int64Counter("operator_http_scaled_object_count", api.WithDescription("a counter of http_scaled_objects processed by the operator"))
46
+
httpScaledObjectCounter, err:=meter.Int64UpDownCounter("operator_http_scaled_object_count", api.WithDescription("a counter of http_scaled_objects processed by the operator"))
47
47
iferr!=nil {
48
48
log.Fatalf("could not create new otelhttpmetric request counter: %v", err)
httpScaledObjectCounter, err:=meter.Int64Counter("operator_http_scaled_object_count", api.WithDescription("a counter of http_scaled_objects processed by the operator"))
46
+
httpScaledObjectCounter, err:=meter.Int64UpDownCounter("operator_http_scaled_object_count", api.WithDescription("a counter of http_scaled_objects processed by the operator"))
47
47
iferr!=nil {
48
48
log.Fatalf("could not create new Prometheus request counter: %v", err)
0 commit comments