jaegar 收集器能否从通过 otlp 协议传入的 otel 收集器接收跨度和跟踪?

Can jaegar collector receive spans and traces from otel collector which are coming in via otlp protocol?

我有一个应用程序正在生成跨度和跟踪,并使用 otlp 协议将它们发送到 otel 收集器。现在,如果我将 jaeger 配置为 otel 收集器配置中的导出器之一,jaeger 收集器是否能够接收和显示跟踪和跨度?

如果我们看到 jaeger 收集器文档

At default settings the collector exposes the following ports:
Port    Protocol    Function
14250   gRPC    used by jaeger-agent to send spans in model.proto format
14268   HTTP    can accept spans directly from clients in jaeger.thrift format over binary thrift protocol
9411    HTTP    can accept Zipkin spans in Thrift, JSON and Proto (disabled by default)
14269   HTTP    admin port: health check at / and metrics at /metrics

没有提到它接受 otel 格式的跟踪和跨度。

Otel 收集器配置

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: collector-config
data:
  collector.yaml: |
    receivers:
      otlp:
        protocols: 
          grpc:
    processors:
    exporters:
      logging:
      jaeger:
        endpoint: jaeger-all-in-one:14250
        insecure: true
    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: []
          exporters: [logging]

是的,将 otel 跟踪导出为其他格式(包括 jaeger)是设计使然。 您可以像这样进行配置

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: collector-config
data:
  collector.yaml: |
    receivers:
      otlp:
        protocols:
          grpc:
    processors:
    exporters:
      jaeger:
        endpoint: jaeger-collector.default.svc.cluster.local:14250
        insecure: true
      logging:
    service:
      name: cpp-template
      pipelines:
        traces:
          receivers: [otlp]
          processors: []
          exporters: [jaeger]

只需要将导出器设置为具有有效端点的 jaeger,并在跟踪管道的导出器列表中设置 jaeger