From e16041e968bae2add52c3679f7bd99513b5e2697 Mon Sep 17 00:00:00 2001 From: Adriel Perkins Date: Thu, 20 Jul 2023 13:18:58 -0400 Subject: [PATCH] feat: add prometheus exporter to otel collector (#54) --- Makefile | 5 +++-- config/config.yaml | 2 +- config/manifest.yaml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6d1e25a0..ef2b8a08 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ endif .PHONY: build build: check-prep - $(OCB_PATH)/ocb --config config/manifest.yaml + GOOS=$(OS) GOARCH=$(ARCH) $(OCB_PATH)/ocb --config config/manifest.yaml .PHONY: build-debug build-debug: check-prep @@ -83,5 +83,6 @@ cibuild: check-prep $(OCB_PATH)/ocb --config config/manifest.yaml --skip-compilation .PHONY: dockerbuild -dockerbuild: build +dockerbuild: + $(MAKE) build OS=linux ARCH=amd64 docker build . -t liatrio/liatrio-otel-collector:localdev --build-arg BIN_PATH="./build/otelcol-custom" diff --git a/config/config.yaml b/config/config.yaml index e2805ac5..8cd6663b 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -62,7 +62,7 @@ service: extensions: [health_check, pprof, zpages] pipelines: metrics: - receivers: [otlp, gitprovider] + receivers: [otlp, prometheus, gitprovider] processors: [batch] exporters: [logging] diff --git a/config/manifest.yaml b/config/manifest.yaml index 4f25d215..74fbcfdd 100644 --- a/config/manifest.yaml +++ b/config/manifest.yaml @@ -18,6 +18,7 @@ exporters: - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.81.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.81.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.81.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.81.0 processors: - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.81.0