我试图让OpenTelemetry容器将跨度传递到我的Jaeger容器,但还没有完全弄清楚,也不能告诉出了什么问题。
本人已确认:
- 我的应用程序正在生成跨度并将其传递给OTel
- Otel正在接收跨度
但除此之外,我没有看到任何迹象表明在导出到Jaeger的过程中发生了错误,但那里从来没有出现过跨度。它也很难调试,因为每十秒钟就有大量的文本输出,这使得滚动并找到重要的位变得很困难。
运行Otel时使用:
/usr/bin/docker run \
--name oqm_otel \
-p 1888:1888 \
-p 8888:8888 \
-p 8889:8889 \
-p 13133:13133 \
-p 4317:4317 \
-p 4318:4318 \
-p 55679:55679 \
-v /etc/oqm/infra/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
--add-host host.docker.internal:host-gateway \
otel/opentelemetry-collector:0.72.0
运行Jaeger时使用:
docker run --name oqm_jaeger -p 8090:16686 -p 8091:14268 -p 8096:4317 -e COLLECTOR_OTLP_ENABLED=true -d jaegertracing/all-in-one:1.42
/etc/oqm/infra/otel/otel-collector-config.yaml
:
# Configuration for OpenTelemetry Collector within the OQM system.
receivers:
otlp:
protocols:
grpc:
http:
cors:
allowed_origins:
- "http://*"
- "https://*"
exporters:
jaeger:
endpoint: "host.docker.internal:8096"
tls:
insecure: true
logging:
verbosity: detailed
processors:
batch:
extensions:
health_check:
service:
telemetry:
logs:
level: "debug"
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [jaeger, logging]
登录Otel了解我的请求:
: -> http.method: Str(GET)
Mar 02 17:55:42 oqm-dev bash[38184]: -> net.host.port: Int(8080)
Mar 02 17:55:42 oqm-dev bash[38184]: -> http.response_content_length: Int(5)
Mar 02 17:55:42 oqm-dev bash[38184]: Attributes:
Mar 02 17:55:42 oqm-dev bash[38184]: Status message :
Mar 02 17:55:42 oqm-dev bash[38184]: Status code : Unset
Mar 02 17:55:42 oqm-dev bash[38184]: End time : 2023-03-02 22:55:39.869314467 +0000 UTC
Mar 02 17:55:42 oqm-dev bash[38184]: Start time : 2023-03-02 22:55:39.810170975 +0000 UTC
Mar 02 17:55:42 oqm-dev bash[38184]: Kind : Server
Mar 02 17:55:42 oqm-dev bash[38184]: Name : /api/v1/info/currency
Mar 02 17:55:42 oqm-dev bash[38184]: ID : 871e3a199b593b47
Mar 02 17:55:42 oqm-dev bash[38184]: Parent ID :
Mar 02 17:55:42 oqm-dev bash[38184]: Trace ID : 341d0d9ebb77fbc41c90dece6f725571
Mar 02 17:55:42 oqm-dev bash[38184]: Span #0
Mar 02 17:55:42 oqm-dev bash[38184]: InstrumentationScope io.quarkus.opentelemetry
Mar 02 17:55:42 oqm-dev bash[38184]: ScopeSpans SchemaURL:
Mar 02 17:55:42 oqm-dev bash[38184]: ScopeSpans #0
日志中唯一提到的字符串jaeger
:
Mar 02 21:15:08 oqm-dev bash[8359]: 2023-03-03T02:15:08.325Z warn internal/warning.go:51 Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks {"kind": "receiver", "name": "jaeger", "data_type": "traces", "docum ...
有什么想法吗?
1条答案
按热度按时间e5njpo681#
你的接收器配置看起来很奇怪。我只会使用默认值:
调试:
1.)为跟踪管道启用日志导出器:
如果您在收集器日志中看到跟踪,那么您可以假设app-〉collector连接正常。
2.)启用调试日志
检查收集器日志。
3.)启用和收集收集器度量
https://grafana.com/grafana/dashboards/15983-opentelemetry-collector/确保您没有任何针对导出程序的排队