Ver código fonte

otel: OTLP auth-päis (authorization=HYPERDX_INGEST_KEY) zigbee/weather/nutikodu collectoritele — parandab UNAUTHENTICATED trace-ekspordi

Ardo 2 semanas atrás
pai
commit
36fc7429cc
2 arquivos alterados com 16 adições e 0 exclusões
  1. 10 0
      dev/LOEMIND_observability.md
  2. 6 0
      dev/docker-compose.yml

+ 10 - 0
dev/LOEMIND_observability.md

@@ -234,6 +234,16 @@ Dockerfile'ides: `pip install opentelemetry-distro opentelemetry-exporter-otlp-p
 opentelemetry-bootstrap -a install`, `CMD ["opentelemetry-instrument", ...]`.
 Kontroll: `SELECT ServiceName, SpanKind, count() FROM default.otel_traces GROUP BY 1,2`.
 
+**NB — OTLP auth-päis (kohustuslik, parandatud 2026-10-09):** ClickStack collector nõuab
+igal OTLP-saadetisel `authorization: <HYPERDX_INGEST_KEY>` päist, muidu:
+`Failed to export traces ... UNAUTHENTICATED ... missing or empty authorization header`.
+Iga OTLP-d saatev teenus peab seadistama:
+```yaml
+      - OTEL_EXPORTER_OTLP_HEADERS=authorization=${HYPERDX_INGEST_KEY}
+```
+See on lisatud `zigbee-collector`, `weather-collector`, `nutikodu-web` juurde. Väärtus tuleb
+`dev/.env`-ist (`HYPERDX_INGEST_KEY`), **ilma** `Bearer `-eelistes (Bearer → 401).
+
 ### Metrics source peab sisaldama `metricTables.exponentialHistogram`
 Vaikimisi bootstrap võib selle puudumisel metrikate valija katki teha. Kontroll:
 ```bash

+ 6 - 0
dev/docker-compose.yml

@@ -62,6 +62,8 @@ services:
       - OTEL_LOGS_EXPORTER=none
       - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
       - OTEL_EXPORTER_OTLP_PROTOCOL=grpc
+      # ClickStack collector nõuab OTLP-s authorization: <HYPERDX_INGEST_KEY>
+      - OTEL_EXPORTER_OTLP_HEADERS=authorization=${HYPERDX_INGEST_KEY}
       - OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=ohmu
     depends_on:
       - clickhouse
@@ -89,6 +91,8 @@ services:
       - OTEL_LOGS_EXPORTER=none
       - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
       - OTEL_EXPORTER_OTLP_PROTOCOL=grpc
+      # ClickStack collector nõuab OTLP-s authorization: <HYPERDX_INGEST_KEY>
+      - OTEL_EXPORTER_OTLP_HEADERS=authorization=${HYPERDX_INGEST_KEY}
       - OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=ohmu
     depends_on:
       - clickhouse
@@ -116,6 +120,8 @@ services:
       - OTEL_LOGS_EXPORTER=none
       - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
       - OTEL_EXPORTER_OTLP_PROTOCOL=grpc
+      # ClickStack collector nõuab OTLP-s authorization: <HYPERDX_INGEST_KEY>
+      - OTEL_EXPORTER_OTLP_HEADERS=authorization=${HYPERDX_INGEST_KEY}
       - OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=ohmu
     ports:
       - "100.87.1.24:8095:8095"