feat(rum): add --user-email filter to rum aggregate#496
Merged
platinummonkey merged 1 commit intoMay 12, 2026
Conversation
Adds --user-email <email> to `pup rum aggregate` as a convenience shorthand
for filtering RUM sessions by user. Prepends @usr.email:<value> to the query,
combining with any --query value already set.
Supports the LLMObs session classification use case: finding RUM behavioral
signals for a specific user around the time of an assistant session.
Example:
pup rum aggregate \
--user-email alice@example.com \
--from 30m \
--compute count \
--group-by @session.id
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
platinummonkey
approved these changes
May 12, 2026
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.
Why this is needed
This flag is required to ship the
/eval-session-classifyand/llm-obs-session-classifyskills on top of pup.Those skills classify whether a user's intent was satisfied in a Datadog assistant (CMD+I) session by combining LLMObs trace data with behavioral signals from web RUM. Specifically, they query RUM events filtered to a specific user by email to see what the user did before and after the assistant session — whether they navigated to the suggested pages, triggered the recommended actions, or abandoned the session.
When the skills run through pup instead of the MCP server, they need
pup rum aggregatewith a user-scoped filter. The existing command already supports--queryfor free-form filtering, but the@usr.email:syntax is non-obvious and error-prone. Without a dedicated flag, every call topup rum aggregatefor session classification requires the user to know and correctly quote the RUM field name.Skills that break without this
/eval-session-classifyand/llm-obs-session-classify— Steps 4 and 5 of the session classification workflow pull two RUM event streams for the user:@usr.email:<user_handle>filter on view events, to understand which pages the user navigated to around the assistant session (showing whether they followed up on the assistant's response)@action.type:custom @usr.email:<user_handle>filter on action events, to catch assistant-specific in-app actions (e.g.ai-suggestion-accepted,ai-feedback-submitted)Without user-email filtering, the skill cannot isolate signals for the specific user being classified and falls back to trace-only classification, losing the behavioral validation layer entirely. This makes the satisfied/unsatisfied label significantly less reliable for sessions where the user acted silently after the conversation ended.
Summary
Adds
--user-email <email>topup rum aggregateas a convenience shorthand for filtering by user. Prepends@usr.email:<value>to the query, composing cleanly with any--queryvalue already set.Changes
src/main.rs—user_email: Option<String>arg onRumActions::Aggregate, routing builds the effective queryUsage
When both
--user-emailand--queryare set, the effective filter is@usr.email:<email> <query>. When only--user-emailis set, it is used as the sole filter.Testing
Automated
cargo test— passingcargo clippy -- -D warnings— cleancargo fmt --check— cleanManual smoke test
🤖 Generated with Claude Code