Skip to content

Commit

Permalink
Stop supporting -trace-exporter=jaeger (#4717)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Upgrade of OTEL is failing in #4705 because `jaeger` exporter is
deprecated

## Description of the changes
- Remove `jaeger` as supported trace exporter

---------

Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro authored Sep 4, 2023
1 parent 8771501 commit 1ebc8bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ next release (yyyy-mm-dd)

#### ⛔ Breaking Changes

* Make OTLP the default exporter in HotROD ([@yurishkuro](https://github.com/yurishkuro) in [#4698](https://github.com/jaegertracing/jaeger/pull/4698))
* [hotrod] Make OTLP the default exporter in HotROD ([@yurishkuro](https://github.com/yurishkuro) in [#4698](https://github.com/jaegertracing/jaeger/pull/4698))
* [SPM] Support spanmetrics connector by default ([@albertteoh](https://github.com/albertteoh) in [#4704](https://github.com/jaegertracing/jaeger/pull/4704))
* [tracegen] Stop supporting -trace-exporter=jaeger ([@yurishkuro](https://github.com/yurishkuro) in [#4717](https://github.com/jaegertracing/jaeger/pull/4717))

#### New Features

Expand Down
7 changes: 2 additions & 5 deletions cmd/tracegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

"github.com/go-logr/zapr"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
Expand Down Expand Up @@ -76,7 +75,7 @@ func createTracers(cfg *tracegen.Config, logger *zap.Logger) ([]trace.Tracer, fu

exp, err := createOtelExporter(cfg.TraceExporter)
if err != nil {
logger.Sugar().Fatalf("cannot create trace exporter %s: %w", cfg.TraceExporter, err)
logger.Sugar().Fatalf("cannot create trace exporter %s: %s", cfg.TraceExporter, err)
}
logger.Sugar().Infof("using %s trace exporter for service %s", cfg.TraceExporter, svc)

Expand Down Expand Up @@ -104,9 +103,7 @@ func createOtelExporter(exporterType string) (sdktrace.SpanExporter, error) {
var err error
switch exporterType {
case "jaeger":
exporter, err = jaeger.New(
jaeger.WithCollectorEndpoint(),
)
return nil, errors.New("jaeger exporter is no longer supported, please use otlp")
case "otlp", "otlp-http":
client := otlptracehttp.NewClient(
otlptracehttp.WithInsecure(),
Expand Down
2 changes: 1 addition & 1 deletion internal/tracegen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *Config) Flags(fs *flag.FlagSet) {
fs.DurationVar(&c.Duration, "duration", 0, "For how long to run the test if greater than 0s (overrides -traces).")
fs.StringVar(&c.Service, "service", "tracegen", "Service name prefix to use")
fs.IntVar(&c.Services, "services", 1, "Number of unique suffixes to add to service name when generating traces, e.g. tracegen-01 (but only one service per trace)")
fs.StringVar(&c.TraceExporter, "trace-exporter", "jaeger", "Trace exporter (jaeger|otlp/otlp-http|otlp-grpc|stdout). Exporters can be additionally configured via environment variables, see https://github.com/jaegertracing/jaeger/blob/main/cmd/tracegen/README.md")
fs.StringVar(&c.TraceExporter, "trace-exporter", "otlp-http", "Trace exporter (otlp/otlp-http|otlp-grpc|stdout). Exporters can be additionally configured via environment variables, see https://github.com/jaegertracing/jaeger/blob/main/cmd/tracegen/README.md")
}

// Run executes the test scenario.
Expand Down

0 comments on commit 1ebc8bc

Please sign in to comment.