jaegertracing/jaeger · error
unrecognized exporter type
Error message
unrecognized exporter type %s
What it means
createOtelExporter (cmd/tracegen/main.go:144) returns this error when the exporterType flag value does not match any supported switch case: otlp, otlp-http, otlp-grpc, or stdout. The legacy "jaeger" exporter is rejected separately with its own message because it was removed. tracegen fails fast at startup with this message plus the unrecognized value.
Solutions
- Use one of the supported values: otlp or otlp-http (HTTP client), otlp-grpc (gRPC client), or stdout for console output
- If you intended the legacy jaeger exporter, switch to otlp/otlp-grpc — it was removed from tracegen
- Point the exporter at a collector that accepts OTLP (e.g. set OTEL_EXPORTER_OTLP_ENDPOINT) when using otlp* types
Example fix
// before // go run ./cmd/tracegen --exporter=jaeger-remote ... // after // go run ./cmd/tracegen --exporter=otlp-grpc ...
Defensive patterns
Strategy: validation
Validate before calling
supported := map[string]bool{"otlp": true, "otlp-http": true, "otlp-grpc": true, "stdout": true}
if !supported[exporterType] {
return fmt.Errorf("exporter must be one of otlp, otlp-http, otlp-grpc, stdout; got %q", exporterType)
} Try / catch
exporter, err := createOtelExporter(exporterType)
if err != nil {
if strings.Contains(err.Error(), "unrecognized exporter type") {
flag.Usage() // print supported values and exit
}
os.Exit(1)
} Prevention
- Make the exporter flag a choice-enum in CLI tooling so invalid values are rejected by the flag parser
- Copy flag values from the current repo docs, not older posts referencing the removed jaeger exporter
- Remember values are case-sensitive: use lowercase otlp-grpc, not OTLP-GRPC or otlpgrpc
- Default to stdout for local smoke tests, otlp-grpc against a real collector
When it happens
Trigger: Running tracegen with an exporter value that is not exactly one of: otlp, otlp-http, otlp-grpc, stdout (case-sensitive exact match). Examples: --exporter jaeger-remote, --exporter OTLP (uppercase), --exporter otlpgrpc (missing hyphen), --exporter prometheus.
Common situations: Users following older Jaeger docs or blog posts referencing the removed jaeger exporter; shell scripts or Makefiles with a stale exporter name; confusion between otlp-grpc vs otlpgrpc or otlp-http vs otlphttp.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- jaeger exporter is no longer supported, please use otlp
- abnormal value of http status code
- archive span storage was not configured
- attribute_metadata_cache_max_size must be a non-negative…
- attribute_metadata_cache_ttl must be a non-negative duration
AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01).
Data as JSON: /api/errors/44828c750b71a817.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/tracegen/main.go:144
var exporter sdktrace.SpanExporter
var err error
switch exporterType {
case "jaeger":
return nil, errors.New("jaeger exporter is no longer supported, please use otlp")
case "otlp", "otlp-http":
client := otlptracehttp.NewClient(
otlptracehttp.WithInsecure(),
)
exporter, err = otlptrace.New(context.Background(), client)
case "otlp-grpc":
client := otlptracegrpc.NewClient(
otlptracegrpc.WithInsecure(),
)
exporter, err = otlptrace.New(context.Background(), client)
case "stdout":
exporter, err = stdouttrace.New()
default:
return nil, fmt.Errorf("unrecognized exporter type %s", exporterType)
}
return exporter, err
}
View on GitHub (pinned to 806f444784)