-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[OPIK-3531] [BE] Add query logs for TraceDAO #4495
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
base: main
Are you sure you want to change the base?
[OPIK-3531] [BE] Add query logs for TraceDAO #4495
Conversation
apps/opik-backend/src/main/java/com/comet/opik/infrastructure/DatabaseUtils.java
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/infrastructure/DatabaseUtils.java
Show resolved
Hide resolved
Backend Tests Results6 280 tests 6 270 ✅ 57m 44s ⏱️ Results for commit 5158b06. ♻️ This comment has been updated with latest results. |
SDK E2E Tests Results0 tests 0 ✅ 0s ⏱️ Results for commit 5158b06. ♻️ This comment has been updated with latest results. |
a5b12bc to
cb4145a
Compare
| private ST newBulkUpdateTemplate(TraceUpdate traceUpdate, String sql, boolean mergeTags, String workspaceId) { | ||
| var template = getSTWithLogComment(sql, "bulk_update_traces", workspaceId, ""); | ||
|
|
||
| if (StringUtils.isNotBlank(traceUpdate.name())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bulk_update_traces is rendered through getSTWithLogComment with an empty details argument, so the new log_comment string is always just bulk_update_traces:<workspace>:. Because bulk updates are one of the few batch queries that actually vary in size, this prevents the structured log comment from capturing the ids/count that give it meaning, which violates the logging guidance in AGENTS.md (Repository-Wide Code Review Guidelines) that new instrumentation should include useful context.
| private ST newBulkUpdateTemplate(TraceUpdate traceUpdate, String sql, boolean mergeTags, String workspaceId) { | |
| var template = getSTWithLogComment(sql, "bulk_update_traces", workspaceId, ""); | |
| if (StringUtils.isNotBlank(traceUpdate.name())) { | |
| private ST newBulkUpdateTemplate(TraceUpdate traceUpdate, String sql, boolean mergeTags, String workspaceId) { | |
| var template = getSTWithLogComment(sql, "bulk_update_traces", workspaceId, "bulk_operation"); | |
| if (StringUtils.isNotBlank(traceUpdate.name())) { |
Finding type: AI Coding Guidelines
Details
Add query logs for TraceDAO
Change checklist
Issues
Testing
NA
Documentation
NA