Skip to content

Commit

Permalink
fix(demo): hotrod was broken
Browse files Browse the repository at this point in the history
In the demo, the hotrod app was emitting trace events without
attributes, including name. It seems that is related to this PR:
jaegertracing/jaeger#4187

For now, the easy fix is to rollback hotrod to Jaeger version 1.41.
  • Loading branch information
jacobmarble committed Apr 4, 2023
1 parent 83c29ff commit 971e470
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion demo/Dockerfile.hotrod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 9 additions & 14 deletions demo/hotrod.patch
Original file line number Diff line number Diff line change
@@ -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)

)
7 changes: 6 additions & 1 deletion demo/otelcol-config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
receivers:
jaeger:
protocols:
thrift_compact:
thrift_http:

otlp:
protocols:
grpc:
Expand Down Expand Up @@ -35,7 +40,7 @@ service:

pipelines:
traces:
receivers: [otlp]
receivers: [otlp, jaeger]
processors: [spanmetrics]
exporters: [influxdb]

Expand Down

0 comments on commit 971e470

Please sign in to comment.