feat(agent): enrich service intelligence and incident summaries - #350
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Makes the Agent Services surface accurate and useful across logs, metrics,
traces, and incidents:
IncidentServiceCounterstorage capability for org-,service-, and time-scoped counts plus bounded recent incidents.
aggregate-only count SQL, a hard-limited recent-list query, and a composite
(org_id, service, created_at DESC)index.fell outside the newest 500 incidents.
returns the effective window with the count, including unbounded
all.shared
/intelquery.independent loading, locked, empty, and error states.
Detect breakdown, using accessible conventional vertical bar charts.
*config.Configdependency from report preview rendering.Why?
Service detail previously filtered only the newest 500 incidents across the
entire deployment. A service with older-but-still-in-window incidents could show
0even though the Incidents page found matching records. Postgres now performsindexed, service-scoped queries rather than loading full payload histories.
The Services UI also stopped at log patterns and incidents even when licensed
metrics and traces intelligence was available. Operators had to leave the
service context to understand what had been learned. Agent Overview had the
opposite problem: multiple raw key/count tables were hard to scan and visually
disconnected from the signal summary.
How to test
Automated
Run storage parity against an isolated Postgres database — the test truncates
its target, so never use development or production data:
Manual
load; Metrics/Traces remain absent on an OSS/unlicensed binary.
latest incidents match rows attributed to that exact service in the active
incident count window, and the window is shown beside the count.
count remains accurate.
list remains ordered by
created_at DESC.full page renders separate Metrics and Traces cards from one
/intelrequest.Detect breakdown, with standard vertical bar charts, exact values, and no
shadow verdict/outcome card.
Type of change
Checklist
go test ./...passes locallygo vet ./...is cleangofmt'dsrc/if behavior changes — service detailand overview UX documentation remains a follow-up
ROADMAP.mdif this closes a roadmap item