close
Skip to content

fix(dashboard): use exact server filtering in logs#1984

Merged
tgmendes merged 3 commits intomainfrom
fix/logs-server-filter
Mar 25, 2026
Merged

fix(dashboard): use exact server filtering in logs#1984
tgmendes merged 3 commits intomainfrom
fix/logs-server-filter

Conversation

@tgmendes
Copy link
Copy Markdown
Contributor

@tgmendes tgmendes commented Mar 25, 2026

Summary

  • update the Logs page server filter to use the selected toolset slug instead of deriving a broad gram URN prefix
  • route server-filtered logs through the structured logs query path so server and text filters work together correctly
  • keep empty-state messaging aligned with active server, search, and attribute filters

Testing

  • not run (client/dashboard dependencies are not installed in this worktree, so pnpm run type-check could not run)

Open with Devin

@tgmendes tgmendes requested a review from a team as a code owner March 25, 2026 12:36
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Mar 25, 2026 1:32pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: 0c6c2ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
dashboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines 397 to 406
const attrLogsQuery = useLogsEnabledErrorCheck(
useAttributeLogsQuery({
logFilters,
extraFilters: serverFilters,
gramUrn: effectiveGramUrn,
from,
to,
enabled: hasLogFilters,
enabled: hasStructuredFilters,
}),
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Server-only filter now uses searchLogs API instead of searchToolCalls

When a server is selected without any attribute filters, the old code stayed on the toolCallsQuery (backed by telemetrySearchToolCalls API) with a URN prefix. The new code switches to attrLogsQuery (backed by telemetrySearchLogs API) whenever a server is selected. This is a change in which backend endpoint is hit for server-only filtering. The attrLogsQuery path involves client-side grouping of logs into trace summaries via logsToTraceSummaries (use-attribute-logs-query.ts:27-84), which is heavier than letting the server do grouping. If the server-side endpoint could support the gram.toolset.slug filter directly, it would be more efficient. This is worth noting but not a bug — it's a correctness-over-performance tradeoff.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@tgmendes tgmendes merged commit 3d28f83 into main Mar 25, 2026
29 checks passed
@tgmendes tgmendes deleted the fix/logs-server-filter branch March 25, 2026 13:52
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants