From 3ae87ca051b784a096edfa32a8ed93f8beca5954 Mon Sep 17 00:00:00 2001 From: Murphy Chen Date: Thu, 4 Aug 2022 11:44:26 +0800 Subject: [PATCH] add advance conf for otel-collector (#212) * add advance conf for otel-collector * undo not relate change * Apply suggestions from code review Co-authored-by: Cijo Thomas * apply reviewer's suggestion * apply reviewer's suggestion * Apply suggestions from code review Co-authored-by: Juliano Costa * add changelog entry. * fix markdown * Apply suggestions from code review Co-authored-by: JustWPH <2732352+wph95@users.noreply.github.com> Co-authored-by: Cijo Thomas Co-authored-by: Juliano Costa Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com> Co-authored-by: JustWPH <2732352+wph95@users.noreply.github.com> --- CHANGELOG.md | 2 ++ docker-compose.yml | 2 +- src/otelcollector/otelcol-config.yml | 11 ++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3672a839a3..cc38c355b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,3 +53,5 @@ significant modifications will be credited to OpenTelemetry Authors. ([#253](https://github.com/open-telemetry/opentelemetry-demo/pull/253)) * Added explicit support for Kubernetes. ([#255](https://github.com/open-telemetry/opentelemetry-demo/pull/255)) +* Added spanmetrics processor to otelcol +([#212](https://github.com/open-telemetry/opentelemetry-demo/pull/212)) diff --git a/docker-compose.yml b/docker-compose.yml index 9937c65cf6..56fc98f394 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: # Collector otelcol: - image: otel/opentelemetry-collector:0.56.0 + image: otel/opentelemetry-collector-contrib:0.56.0 container_name: otel-col command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: diff --git a/src/otelcollector/otelcol-config.yml b/src/otelcollector/otelcol-config.yml index 2662741172..8dc9950445 100644 --- a/src/otelcollector/otelcol-config.yml +++ b/src/otelcollector/otelcol-config.yml @@ -3,6 +3,10 @@ receivers: protocols: grpc: http: + otlp/spanmetrics: + protocols: + grpc: + endpoint: "localhost:65535" exporters: jaeger: @@ -16,14 +20,19 @@ exporters: processors: batch: + spanmetrics: + metrics_exporter: prometheus service: pipelines: traces: receivers: [otlp] - processors: [batch] + processors: [spanmetrics, batch] exporters: [logging, jaeger] metrics: receivers: [otlp] processors: [batch] exporters: [prometheus, logging] + metrics/spanmetrics: + receivers: [ otlp/spanmetrics ] + exporters: [ prometheus, logging ]