1

我有一个应用程序正在生成跨度和跟踪,并使用 otlp 协议将它们发送到 otel 收集器。现在,如果我将 jaeger 配置为 otel collector config 中的导出器之一,那么 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]
4

1 回答 1

1

是的,将 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

于 2021-06-23T04:19:21.570 回答