jaeger数据导入后,许多信息没有展示
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
DeepFlow Component
Agent
What you expected to happen
根据官网https://www.deepflow.io/docs/zh/integration/input/tracing/opentelemetry/导入jaeger数据后,发现不少数据缺失。
How to reproduce
采集jaeger的otel-agent配置: apiVersion: v1 data: otel-collector.yml: | receivers: jaeger: protocols: # listens on :14250 grpc: thrift_compact: thrift_binary: processors: k8sattributes: resource: attributes: - key: app.host.ip from_attribute: k8s.pod.ip action: insert
tail_sampling:
# 在做出采样决定之前,从 trace 的第一个跨度开始的等待时间
decision_wait: 30s
# 内存中保存的 trace 数
num_traces: 50000
# 预期的新 trace 数
expected_new_traces_per_sec: 0
policies:
[
{
name: probattr_policy,
type: probabilistic,
probabilistic: { sampling_percentage: 1 }
},
{
name: status_policy,
type: status_code,
status_code: { status_codes: ["ERROR"] }
},
{
name: latency_policy,
type: latency,
latency: { threshold_ms: 1500 }
},
{
name: slow-boolattr-policy,
type: boolean_attribute,
boolean_attribute: { key: "slow", value: true }
},
{
name: scrape-boolattr-policy,
type: boolean_attribute,
boolean_attribute: { key: "scrape", value: true }
}
]
extensions:
health_check:
pprof:
zpages:
exporters:
otlphttp:
traces_endpoint: 'http://deepflow-agent.deepflow/api/v1/otel/trace'
tls:
insecure: true
retry_on_failure:
enabled: true
service:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [ jaeger ]
processors: [ k8sattributes, resource, tail_sampling ]
exporters: [ otlphttp ]
kind: ConfigMap metadata: creationTimestamp: "2024-07-24T03:42:02Z" name: test namespace: default resourceVersion: "45237" uid: 1edd0810-ddb1-4724-8d93-23fe3d4d2ccd
DeepFlow version
registry.cn-hongkong.aliyuncs.com/deepflow-ce/deepflow-agent:v6.5
DeepFlow agent list
kubewps> deepflow-ctl agent-group-config list -o yaml vtap_group_id: g-a2a719b149 http_log_trace_id: uber-trace-id ntp_enabled: 1 static_config: ntp-max-interval: 30s ntp-min-interval: 1s
Kubernetes CNI
flannel
Operation-System/Kernel version
4.4.0-142-generic
Anything else
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
关键问题是:为什么client和service都是0.0.0.0
主要是这两部分代码获取 IP ,通过导入数据产生的 span,要求在标签中加入 app.host.ip (已通过 otel 配置实现)与 net.peer.ip (需要在被追踪的应用代码中实现)来注入双端 IP
https://github.com/deepflowio/deepflow/blob/main/server/ingester/flow_log/log_data/otel_import.go#L179
https://github.com/deepflowio/deepflow/blob/main/server/ingester/flow_log/log_data/otel_import.go#L213
对客户端 span:app.host.ip 等于 client,net.peer.ip 等于 service 对服务端 span: app.host.ip 等于 service , net.peer.ip 等于 client
我们jaeger里有这个属性,不知道能不能满足
我们jaeger里有这个属性,不知道能不能满足
需要明确这个属性 是【本机 ip】,还是【请求访问的服务端】或【来源的客户端】(对端)
我们jaeger里有这个属性,不知道能不能满足
需要明确
这个属性是【本机 ip】,还是【请求访问的服务端】或【来源的客户端】(对端)
如果确认这个信息是期望的对端,可以在 otel 里配置一个类似 https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor 的转换器,把 attibute 从 来源 attribute name 复制到 span 下的 net.peer.ip 即可
