Skip to content

fix(agent): topTalkersByBytes display names after v0.6.0#26

Merged
kgrubb merged 4 commits into
mainfrom
feat/top-talkers-src-display-names
May 13, 2026
Merged

fix(agent): topTalkersByBytes display names after v0.6.0#26
kgrubb merged 4 commits into
mainfrom
feat/top-talkers-src-display-names

Conversation

@kgrubb
Copy link
Copy Markdown
Contributor

@kgrubb kgrubb commented May 13, 2026

Follow-up to v0.6.0: that release laid out source display-name support for
topTalkersByBytes, but the OpenSearch request could still attach a redundant
terms sub-aggregation when the display field matched the pod or namespace
terms field. This branch corrects that and locks the behavior in tests.

Fixed

  • Skip the top_display_names sub-agg when srcDisplayNameField resolves to
    the same field as the pod or namespace terms aggs, so the query matches the
    intended shape and row data stays consistent.
  • Tests assert by_src sub-aggs via a small helper so collisions and
    non-aggregatable display fields stay covered.

Changed

  • Shorter topTalkersByBytes tool description; FLOW_ANALYTICS copy still nudges
    the model toward topSrcDisplayNames when buckets exist.

Notes

  • Human-readable labels still depend on the index populating the display field;
    empty buckets mean no label in the underlying flow documents.

kgrubb added 4 commits May 13, 2026 12:57
## Added

- Per-source terms sub-agg on srcDisplayNameField when field caps show it as
  aggregatable; rows gain topSrcDisplayNames (displayName + docCount).
- Skips duplicate terms agg when display field matches pod name field.

## Changed

- Tool spec and FLOW_ANALYTICS playbook text for the LLM.
- Skip top_display_names when display agg field matches namespace terms
- Test non-aggregatable srcDisplayNameField (no agg, no topSrcDisplayNames)
- Test display/namespace field collision
- Tool spec note on dedupe

Tool results remain unstructured (ToolResult.result: unknown); no Zod/OpenAPI surface for per-tool payloads.
## Changed
- Skip display-name terms agg when it matches pod or namespace terms field.
- Shorten topTalkersByBytes tool description.
- Assert by_src sub-aggs via a small bySrcAggs helper; fix namespace collision test.
@kgrubb kgrubb changed the title feat(agent): topTalkersByBytes surface src display names fix(agent): topTalkersByBytes display names after v0.6.0 May 13, 2026
@kgrubb kgrubb merged commit 5cb1451 into main May 13, 2026
1 check passed
@kgrubb kgrubb deleted the feat/top-talkers-src-display-names branch May 13, 2026 17:08
@github-actions github-actions Bot mentioned this pull request May 13, 2026
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 this pull request may close these issues.

1 participant