Skip to content

Conversation

@BorisTkachenko
Copy link
Contributor

Details

Add query logs for TraceDAO

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-3531

Testing

NA

Documentation

NA

@BorisTkachenko BorisTkachenko self-assigned this Dec 18, 2025
@BorisTkachenko BorisTkachenko requested a review from a team as a code owner December 18, 2025 14:55
@github-actions github-actions bot added java Pull requests that update Java code Backend labels Dec 18, 2025
@BorisTkachenko BorisTkachenko marked this pull request as draft December 18, 2025 15:23
@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Backend Tests Results

6 280 tests   6 270 ✅  57m 44s ⏱️
  378 suites     10 💤
  378 files        0 ❌

Results for commit 5158b06.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 26, 2025

SDK E2E Tests Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 5158b06.

♻️ This comment has been updated with latest results.

@BorisTkachenko BorisTkachenko force-pushed the boryst/OPIK-3531-be-add-query-logging-for-trace-related-queries branch from a5b12bc to cb4145a Compare January 5, 2026 08:58
@BorisTkachenko BorisTkachenko marked this pull request as ready for review January 5, 2026 10:34
Comment on lines +3470 to 3473
private ST newBulkUpdateTemplate(TraceUpdate traceUpdate, String sql, boolean mergeTags, String workspaceId) {
var template = getSTWithLogComment(sql, "bulk_update_traces", workspaceId, "");

if (StringUtils.isNotBlank(traceUpdate.name())) {
Copy link
Contributor

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.

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants