From 5ada61a99b0d9112936a2f94ed47b070600a4a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 2 Sep 2021 09:00:46 +0200 Subject: [PATCH] Update to OpenTelemetry core 0.34.0 (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #67 Signed-off-by: Juraci Paixão Kröhling --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/builder/main.go | 2 +- test/nocore.builder.yaml | 6 +++--- test/nocore.otel.yaml | 11 ++++------- test/replaces.builder.yaml | 8 ++++---- test/replaces.otel.yaml | 4 ++-- test/test.sh | 2 +- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9c766a5..f22694d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index f8af3a4..a7bcba5 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.33.0" +const defaultOtelColVersion = "0.34.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/builder/main.go b/internal/builder/main.go index 2b8ab77..8a8ca6c 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -110,7 +110,7 @@ func Compile(cfg Config) error { // GetModules retrieves the go modules, updating go.mod and go.sum in the process func GetModules(cfg Config) error { // #nosec G204 - cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy") + cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.17") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { return fmt.Errorf("failed to update go.mod: %w. Output: %q", err, out) diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index f982f24..80d5787 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,14 +1,14 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.33.0 + otelcol_version: 0.34.0 include_core: false receivers: - - import: go.opentelemetry.io/collector/receiver/jaegerreceiver + - import: go.opentelemetry.io/collector/receiver/otlpreceiver core: true exporters: - import: go.opentelemetry.io/collector/exporter/loggingexporter core: true extensions: - - import: go.opentelemetry.io/collector/extension/healthcheckextension + - import: go.opentelemetry.io/collector/extension/zpagesextension core: true diff --git a/test/nocore.otel.yaml b/test/nocore.otel.yaml index 8f80938..e0d615c 100644 --- a/test/nocore.otel.yaml +++ b/test/nocore.otel.yaml @@ -1,13 +1,10 @@ extensions: - health_check: + zpages: receivers: - jaeger: + otlp: protocols: grpc: - thrift_http: - thrift_compact: - thrift_binary: processors: @@ -15,11 +12,11 @@ exporters: logging: service: - extensions: [health_check] + extensions: [zpages] pipelines: traces: receivers: - - jaeger + - otlp processors: [] exporters: - logging diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 8956e21..bf603e8 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.33.0 + otelcol_version: 0.34.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.33.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.33.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.34.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.34.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 diff --git a/test/replaces.otel.yaml b/test/replaces.otel.yaml index 04e3d50..ebf08a2 100755 --- a/test/replaces.otel.yaml +++ b/test/replaces.otel.yaml @@ -1,5 +1,5 @@ extensions: - health_check: + zpages: receivers: otlp: @@ -24,7 +24,7 @@ exporters: logging: service: - extensions: [health_check] + extensions: [zpages] pipelines: traces: receivers: diff --git a/test/test.sh b/test/test.sh index cd7a498..bc4d598 100755 --- a/test/test.sh +++ b/test/test.sh @@ -62,7 +62,7 @@ do break fi - curl -s localhost:13133 | grep "Server available" > /dev/null + curl -s http://localhost:55679/debug/servicez | grep Uptime > /dev/null if [ $? == 0 ]; then echo "✅ PASS ${test}"