From 971e4708164f8d095f18ecaf43b6fe4012fbd837 Mon Sep 17 00:00:00 2001 From: Jacob Marble Date: Mon, 3 Apr 2023 18:11:19 -0700 Subject: [PATCH] fix(demo): hotrod was broken In the demo, the hotrod app was emitting trace events without attributes, including name. It seems that is related to this PR: https://github.com/jaegertracing/jaeger/pull/4187 For now, the easy fix is to rollback hotrod to Jaeger version 1.41. --- demo/Dockerfile.hotrod | 2 +- demo/docker-compose.yml | 4 ++-- demo/hotrod.patch | 23 +++++++++-------------- demo/otelcol-config.yml | 7 ++++++- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/demo/Dockerfile.hotrod b/demo/Dockerfile.hotrod index 7cef296c..2bb9aa8c 100644 --- a/demo/Dockerfile.hotrod +++ b/demo/Dockerfile.hotrod @@ -3,7 +3,7 @@ FROM golang:1.20-alpine3.16 AS builder RUN apk --update --no-cache add git ENV CGO_ENABLED 0 -RUN git clone --branch v1.43.0 --depth 1 https://github.com/jaegertracing/jaeger +RUN git clone --branch v1.41.0 --depth 1 https://github.com/jaegertracing/jaeger WORKDIR /go/jaeger COPY demo/hotrod.patch . RUN git apply hotrod.patch diff --git a/demo/docker-compose.yml b/demo/docker-compose.yml index 7d8f848b..0344c689 100644 --- a/demo/docker-compose.yml +++ b/demo/docker-compose.yml @@ -49,8 +49,8 @@ services: depends_on: - otelcol-influxdb environment: - OTEL_EXPORTER_OTLP_ENDPOINT: http://otelcol-influxdb:4318 - command: [ "all", "--otel-exporter=otlp"] + JAEGER_AGENT_HOST: otelcol-influxdb + JAEGER_AGENT_PORT: 6831 otelcol-influxdb: build: diff --git a/demo/hotrod.patch b/demo/hotrod.patch index 792865b7..9636560e 100644 --- a/demo/hotrod.patch +++ b/demo/hotrod.patch @@ -1,18 +1,13 @@ --- a/examples/hotrod/cmd/root.go +++ b/examples/hotrod/cmd/root.go -@@ -98,12 +98,9 @@ func onInitialize() { +@@ -81,7 +81,9 @@ func init() { + RootCmd.PersistentFlags().StringVarP(&jaegerUI, "jaeger-ui", "j", "http://localhost:16686", "Address of Jaeger UI to create [find trace] links") + + rand.Seed(int64(time.Now().Nanosecond())) +- logger, _ = zap.NewDevelopment( ++ loggerConfig := zap.NewProductionConfig() ++ loggerConfig.Level.SetLevel(zapcore.FatalLevel) ++ logger, _ = loggerConfig.Build( zap.AddStacktrace(zapcore.FatalLevel), zap.AddCallerSkip(1), - } -- if !verbose { -- zapOptions = append(zapOptions, -- zap.IncreaseLevel(zap.LevelEnablerFunc(func(l zapcore.Level) bool { return l != zapcore.DebugLevel })), -- ) -- } -- logger, _ = zap.NewDevelopment(zapOptions...) -+ loggerConfig := zap.NewProductionConfig() -+ loggerConfig.Level.SetLevel(zapcore.ErrorLevel) -+ logger, _ = loggerConfig.Build(zapOptions...) - - jaegerclientenv2otel.MapJaegerToOtelEnvVars(logger) - + ) diff --git a/demo/otelcol-config.yml b/demo/otelcol-config.yml index 718a3ecb..0418b938 100644 --- a/demo/otelcol-config.yml +++ b/demo/otelcol-config.yml @@ -1,4 +1,9 @@ receivers: + jaeger: + protocols: + thrift_compact: + thrift_http: + otlp: protocols: grpc: @@ -35,7 +40,7 @@ service: pipelines: traces: - receivers: [otlp] + receivers: [otlp, jaeger] processors: [spanmetrics] exporters: [influxdb]