Skip to content

Commit 1e8e24a

Browse files
committed
fix typos and correctly keying HTTPSO resource for otel metrics
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
1 parent bb94b8f commit 1e8e24a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/operate.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ There are currently 2 supported methods for exposing metrics from the intercepto
99
### Configuring the Prometheus compatible metrics endpoint
1010
When configured, the interceptor proxy can expose metrics on a Prometheus compatible endpoint.
1111

12-
This endpoint can be enabled by setting the `OTEL_PROM_EXPORTER_ENABLED` environment variable to `true` on the interceptor 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).
12+
This endpoint can be enabled by setting the `OTEL_PROM_EXPORTER_ENABLED` environment variable to `true` on the interceptor deployment (`true` by default) and by setting `OTEL_PROM_EXPORTER_PORT` to an unused port for the endpoint to be made available on (`2223` by default).
1313

1414
### Configuring the OTEL HTTP exporter
1515
When configured, the interceptor proxy can export metrics to a OTEL HTTP collector.
@@ -71,7 +71,7 @@ There are currently 2 supported methods for exposing metrics from the operator -
7171
### Configuring the Prometheus compatible metrics endpoint
7272
When configured, the operator can expose metrics on a Prometheus compatible endpoint.
7373

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 (`8080` by default).
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 available on (`8080` by default).
7575

7676
### Configuring the OTEL HTTP exporter
7777

@@ -85,4 +85,4 @@ The `OTEL_EXPORTER_OTLP_PROTOCOL` defaults to `http`
8585

8686
### Configuring the OTEL GRPC exporter
8787

88-
Please note that using `OTEL_EXPORTER_OTLP_PROTOCOL` will alows you to set it up to `grpc` to conect to otel collector. Also `OTEL_EXPORTER_OTLP_ENDPOINT` should be set to the right enpoint (eg: http://opentelemetry-collector.open-telemetry-system:4317)
88+
Please note that using `OTEL_EXPORTER_OTLP_PROTOCOL` will allows you to set it up to `grpc` to connect to otel collector. Also `OTEL_EXPORTER_OTLP_ENDPOINT` should be set to the right endpoint (eg: http://opentelemetry-collector.open-telemetry-system:4317)

operator/controllers/http/httpscaledobject_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (r *HTTPScaledObjectReconciler) updatePromMetrics(ctx context.Context, scal
185185
httpScaledObjectPromMetricsLock.Lock()
186186
defer httpScaledObjectPromMetricsLock.Unlock()
187187

188-
namespacedName := scaledObject.Name + scaledObject.Namespace
188+
namespacedName := client.ObjectKeyFromObject(scaledObject).String()
189189
metricsData, ok := httpScaledObjectPromMetricsMap[namespacedName]
190190
if ok {
191191
metrics.RecordDeleteHTTPScaledObjectCount(scaledObject.Namespace)

0 commit comments

Comments
 (0)