Skip to main content
  1. blog/

Migrating from Jaeger Extension to OpenTelemetry Protocol in OpenTelemetry Collector

·2 mins

Introduction #

If you are using the OpenTelemetry Collector together with Jaeger, you may have noticed that the Jaeger extension in the OpenTelemetry Collector is deprecated and will be removed in the near future. To ensure compatibility and take advantage of the latest features, migrating from the Jaeger extension to the OpenTelemetry Protocol (OTLP) extension is recommended. I will show you how to make this switch in this blog post.

Let’s consider the following OpenTelemetry Collector configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:
  logging:
    verbosity: detailed
  jaeger:
    endpoint: jaeger:14250
    tls:
      insecure: true
  
processors:
  batch:

service:
  telemetry:
    logs:
      level: "debug"
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [logging, jaeger]
      processors: [batch]
    metrics:
      receivers: [otlp]
      exporters: [logging, prometheus]
      processors: [batch]
    logs:
      receivers: [otlp]
      exporters: [logging]
      processors: [batch]

If you simply change the line 11 to endpoint: jaeger:14250 to endpoint: jaeger:4317, you will encounter the following error:

2023-07-06T17:28:37.520Z        debug   jaegerexporter@v0.80.0/exporter.go:106  failed to push trace data to Jaeger     {"kind": "exporter", "data_type": "traces", "name": "jaeger", "error": "rpc error: code = Unimplemented desc = unknown service jaeger.api_v2.CollectorService"}

This error occurs because the Jaeger extension is incompatible with the OpenTelemetry Protocol, so simply changing the port is insufficient.

Solution: Switch to OTLP Extension #

The solution is to use the OTLP extension instead. If you change the configuration to the following, it will work:

otlp/jaeger:
  endpoint: jaeger:4317
  tls:
    insecure: true

You can forward to as many OTLP exporters as you want as long as they are prefixed with otlp/. Don’t forget to update your pipelines to use the new extension:

pipelines:
  traces:
    receivers: [otlp]
    exporters: [logging, otlp/jaeger]
    processors: [batch]