Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KafkaServer and KafkaClient parsers java processes as consumer or producer spans with the resource is the kafka broker or the client is the kafka broker #1423

Open
esara opened this issue Nov 30, 2024 · 0 comments
Assignees

Comments

@esara
Copy link
Contributor

esara commented Nov 30, 2024

With both consumer and product java application and the kafka broker running as a containerized service in k8s, beyla generates the following traces

2024-11-30 01:58:09.11301589 (500.3197ms[500.3197ms]) KafkaServer 0 process * [10.233.102.129 as kafka-client.namespace:52388]->[10.233.102.161 as kafka.namespace:9092] size:0B svc=[namespace/kafka java] traceparent=[]
2024-11-30 02:41:18.11302411 (500.5914ms[500.5914ms]) KafkaServer 0 process namespace.suspend-engine-processing [10.233.102.148 as suspend.namespace:57146]->[10.233.102.161 as kafka.namespace:9092] size:0B svc=[namespace/kafka java] traceparent=[]

and

2024-11-30 01:59:29.113015929 (500.275ms[500.275ms]) KafkaClient 0 process namespace.topology-on-demand-cost [10.233.102.148 as suspend.namespace:57146]->[10.233.57.197 as kafka.namespace:9092] size:0B svc=[namespace/suspend go] traceparent=[]
2024-11-30 01:59:30.113015930 (169.528ms[169.528µs]) KafkaClient 0 process * [10.233.102.136 as metrics-processor.namespace:35984]->[10.233.57.197 as kafka.namespace:9092] size:0B svc=[namespace/metrics-processor java] traceparent=[]

or queried using a tempo traceql

{resource.telemetry.sdk.name="beyla" && resource.service.name="kafka" && span.messaging.system="kafka"}

This is not the correct, because the consumer and the producer is supposed to have the application as the resource, not the kafka broker.
because we are parsing the tcp connection for the peer address for kafka messages
https://github.com/grafana/beyla/blob/main/pkg/internal/ebpf/common/kafka_detect_transform.go#L351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants