diff --git a/services/otel-gateway/Dockerfile b/services/otel-gateway/Dockerfile index 1db2661..3b76e94 100644 --- a/services/otel-gateway/Dockerfile +++ b/services/otel-gateway/Dockerfile @@ -4,7 +4,7 @@ # # https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol/Dockerfile # -FROM otel/opentelemetry-collector-contrib:0.110.0 +FROM otel/opentelemetry-collector-contrib:0.144.0 LABEL org.opencontainers.image.authors="tech@opensafely.org" \ org.opencontainers.image.url="opensafely.org" \ @@ -15,6 +15,7 @@ LABEL org.opencontainers.image.authors="tech@opensafely.org" \ ENV HONEYCOMB_ENDPOINT="https://api.honeycomb.io" ENV METRICS_DATASET="jobrunner-metrics" ENV LOG_LEVEL="info" +ENV VERBOSITY="normal" # these must be provided at runtime # ENV HONEYCOMB_KEY diff --git a/services/otel-gateway/config.yaml b/services/otel-gateway/config.yaml index 37a2ead..6f23106 100644 --- a/services/otel-gateway/config.yaml +++ b/services/otel-gateway/config.yaml @@ -18,8 +18,8 @@ processors: batch: exporters: - logging: - loglevel: "${LOG_LEVEL}" + debug: + verbosity: "${VERBOSITY}" otlphttp/traces: endpoint: "${HONEYCOMB_ENDPOINT}" @@ -44,8 +44,8 @@ service: traces: receivers: [otlp] processors: [batch] - exporters: [otlphttp/traces, logging] + exporters: [otlphttp/traces, debug] metrics: receivers: [otlp] processors: [batch] - exporters: [otlphttp/metrics, logging] + exporters: [otlphttp/metrics, debug] diff --git a/services/otel-gateway/justfile b/services/otel-gateway/justfile index 98f4749..9a7d8e5 100644 --- a/services/otel-gateway/justfile +++ b/services/otel-gateway/justfile @@ -32,7 +32,7 @@ test-integration: venv #!/bin/bash set -euo pipefail - {{ just_executable() }} run -d -e LOG_LEVEL=debug -p 4318:4318 + {{ just_executable() }} run -d -e LOG_LEVEL=debug -e VERBOSITY=detailed -p 4318:4318 {{ just_executable() }} run-python tests.py echo "Data sent to honeycomb" echo "https://ui.honeycomb.io/bennett-institute-for-applied-data-science/environments/development/datasets/otel-gateway-tests?query=%7B%22time_range%22%3A600%2C%22granularity%22%3A0%2C%22breakdowns%22%3A%5B%5D%2C%22calculations%22%3A%5B%5D%2C%22orders%22%3A%5B%5D%2C%22havings%22%3A%5B%5D%2C%22limit%22%3A100%7D" @@ -67,6 +67,7 @@ test-ci: venv _mock_honeycomb_start && _mock_honeycomb_stop {{ just_executable() }} run -d \ -e HONEYCOMB_ENDPOINT \ -e LOG_LEVEL=debug \ + -e VERBOSITY=detailed \ -p 4318:4318 \ --add-host=host.docker.internal:host-gateway diff --git a/services/otel-gateway/tests.py b/services/otel-gateway/tests.py index 7d9d0f5..41ac38e 100644 --- a/services/otel-gateway/tests.py +++ b/services/otel-gateway/tests.py @@ -1,9 +1,8 @@ import json -import os import time from pathlib import Path -from opentelemetry import metrics, trace +from opentelemetry import trace from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from opentelemetry.metrics import (