From 58c463fa4f1fa57fdfaa0a4af618894928b2ce30 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 14 Jan 2025 18:16:46 +0000 Subject: [PATCH] feat: update opentelemetry sample to use exponential histograms Signed-off-by: David Ashpole --- opentelemetry/instrumentation/docker-compose.yaml | 3 ++- opentelemetry/instrumentation/otel-collector-config.yaml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/opentelemetry/instrumentation/docker-compose.yaml b/opentelemetry/instrumentation/docker-compose.yaml index bc7c526ab9..c7a81e6ad7 100644 --- a/opentelemetry/instrumentation/docker-compose.yaml +++ b/opentelemetry/instrumentation/docker-compose.yaml @@ -7,12 +7,13 @@ services: - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4318 - OTEL_SERVICE_NAME=otel-quickstart-go - OTEL_GO_X_EXEMPLAR=true + - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM volumes: - logs:/var/log:rw depends_on: - "otelcol" otelcol: - image: otel/opentelemetry-collector-contrib:0.105.0 + image: otel/opentelemetry-collector-contrib:0.115.1 volumes: - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml:ro - logs:/var/log:ro diff --git a/opentelemetry/instrumentation/otel-collector-config.yaml b/opentelemetry/instrumentation/otel-collector-config.yaml index 75e8fe328b..f2d891adfb 100644 --- a/opentelemetry/instrumentation/otel-collector-config.yaml +++ b/opentelemetry/instrumentation/otel-collector-config.yaml @@ -90,6 +90,14 @@ processors: detectors: ["env", "gcp"] service: + telemetry: + metrics: + readers: + - pull: + exporter: + prometheus: + host: '0.0.0.0' + port: 8888 pipelines: traces: receivers: ["otlp"]