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

SQLClient mistaken parses java logger messages as other_sql client spans #1422

Closed
esara opened this issue Nov 30, 2024 · 2 comments · Fixed by #1427
Closed

SQLClient mistaken parses java logger messages as other_sql client spans #1422

esara opened this issue Nov 30, 2024 · 2 comments · Fixed by #1427
Assignees

Comments

@esara
Copy link
Contributor

esara commented Nov 30, 2024

One of my java applications is generating log messages like

2024-09-10 04:04:38,438  INFO [pool-7-thread-61] [LicenseCheckService]	: New live topology available in repository -- will update the license summary

which gets parsed into

{
  "value": "update the license summary\n<13>Nov 30 ",
  "key": "db.query.text"
}

and

2024-11-29 19:17:50,957  INFO [kconsumer-3] [GroupInfoUpdater]	: Skipping group info update pipeline for topology id 75758107665296

which gets parsed as

{
  "value": "Update Pipeline\n<13>Nov 30 00:00:03 group-6bdc85d785-mhhtm group-6bdc85d785-mhhtm: 2024-11-",
  "key": "db.query.text"
}

or printing traces

2024-11-30 02:25:25.113022525 (1.04144ms[1.04144ms]) SQLClient 0 UPDATE pipeline [10.233.7.112 as 10.233.7.112.namespace:3306]->[10.233.102.133 as group.namespace:59768] size:0B svc=[namespace/group java] traceparent=[]
2024-11-30 02:25:25.113022525 (427.663µs[427.663µs]) SQLClient 0 UPDATE pipeline [10.233.102.133 as group.namespace:43568]->[10.233.102.161 as kafka.namespace:9092] size:0B svc=[namespace/kafka java] traceparent=[]

or viewing them tempo using

{resource.telemetry.sdk.name="beyla" && duration>2ms && span.db.system="other_sql" && name=~"UPDATE.*"}

because we are checking for the word update, but it could be in the middle of sentence in
https://github.com/grafana/beyla/blob/main/pkg/internal/ebpf/common/sql_detect_transform.go#L83

@grcevski
Copy link
Contributor

Ah, thanks for reporting this Endre, I think it's an edge case we didn't think of, the logs must be sent out through some tcp connection. I think we need to tighten that detection.

@esara
Copy link
Contributor Author

esara commented Nov 30, 2024

we are sending these messages out using syslog to a centralized syslog server in this case

@grcevski grcevski self-assigned this Dec 2, 2024
@grcevski grcevski mentioned this issue Dec 2, 2024
1 task
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

Successfully merging a pull request may close this issue.

2 participants