[eas-cli] Add observe:session for inspecting events by session ID#3868
Merged
douglowder merged 9 commits intoJun 18, 2026
Merged
Conversation
2680bbb to
5af17f2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3868 +/- ##
==========================================
+ Coverage 58.79% 58.91% +0.13%
==========================================
Files 929 932 +3
Lines 40612 40744 +132
Branches 8553 8593 +40
==========================================
+ Hits 23873 24002 +129
- Misses 16643 16646 +3
Partials 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kadikraman
approved these changes
Jun 18, 2026
kadikraman
left a comment
Contributor
There was a problem hiding this comment.
Works great, thank you for adding this!
abc81b0 to
2bf9b79
Compare
New observe:sessions command with two modes: * No argument — list distinct session IDs in the time window. Pulls one page (100) of each event source (events + customEventList) in parallel, derives the set of sessions client-side, groups by deviceOs, sorts by app version desc (semver-coerced, falling back to string compare) and then by firstSeenAt desc, and prints a Session ID / First seen / App version table per platform. Always emits a yellow note that the command scans the first 100 metric and log events, since the underlying GraphQL queries cap pages at 100 and a dedicated sessions query does not yet exist. * Session ID argument — combined timeline for that session. Filters both event sources by sessionId, merges them sorted by timestamp, and prints a Timestamp / Type / Name / Value-or-Severity table preceded by a metadata block (app version, device, first/last seen) derived from the newest entry. The same metadata is exposed as a top-level field in the JSON output. Additional features: * --event-name flag: when listing, restricts the result to sessions that contain at least one log event with the given name. Header and empty- state message reflect the filter. Rejected with an error when combined with a session-ID argument. * fetchObserveEventsAsync gains optional metricName / sessionId so the metric-event query can be filtered to a single session without requiring a metric. * New ObserveEventNameFlag in observe/flags.ts so future observe commands can reuse the same --event-name input. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ssion ID The session ID is now a required positional argument and the list-distinct-sessions mode is gone — along with --platform, --start/--end/--days, --app-version, --update-id, --event-name, and the helpers that only supported listing (SessionSummary, sort comparator, list fetcher / formatter, event-count tracking). The command now exposes only --project-id, --json, and --non-interactive. Since the sessionId filter uniquely identifies the session, the time range is no longer needed. Make startTime and endTime optional on FetchObserveEventsOptions and FetchCustomEventsOptions and omit them from the filter when undefined; the session fetcher relies on this so the request is purely sessionId-scoped (existing observe:metrics and observe:events callers still pass them explicitly, so behaviour is unchanged for those commands). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…event The "First seen" line in the metadata header already shows the full timestamp of the first event. The events table now replaces the absolute Timestamp column with an Offset column whose values are the elapsed time since that first event, in seconds with two-decimal precision (e.g. 0.00s, 1.23s, 12.50s). Also drop the stale "use --limit to fetch more per source" suggestion from the hasMore* warning since --limit is no longer a flag; the message now states that only the first 100 of each source are shown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-run yarn --cwd packages/eas-cli generate-graphql-code to pick up server-side schema changes that accumulated since the last sync, and extend AppObserveEventFragmentNode to select routeName so the CLI can surface which route navigation metric events (expo.navigation.cold_ttr, expo.navigation.warm_ttr, expo.navigation.tti) belong to. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Thread the AppObserveEvent.routeName field through the metric-event JSON shape (ObserveEventJson) and through SessionEventEntry, and render it alongside the metric display name in the observe:session timeline. Navigation rows now read e.g. "Nav TTI · /home" instead of just "Nav TTI", so users can see which screen each navigation metric belongs to within the session. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rity columns Replace the combined "Value / Severity" column with two: Value shows the metric value (e.g. 0.80s) for metric rows and the primitive properties (STRING / NUMBER / BOOLEAN) of a custom event for log rows, formatted as key=value with one row per property; Severity holds the severityText (falling back to severityNumber) and is only populated for log rows. Non-primitive (JSON) properties are still carried through to the JSON output but are omitted from the table view to keep it readable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ve:session Move the primitive-property rendering into its own Properties column, positioned between Value and Severity. This separates the data visually: metric events have a populated Value column and "-" in Properties, while custom log events have "-" in Value and their key=value primitive properties in Properties. Severity continues to hold only severityText / severityNumber for log rows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n table The session ID is already shown on the command line that produced the output (and is still emitted in --json), so the redundant "Session <id>" line above the metadata block adds noise. Remove it and drop the now-unused sessionId parameter from buildObserveSessionEventsTable; the table starts directly with the metadata block (App version / Device / First seen / Last seen) followed by the timeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bf79c06 to
c1da5c1
Compare
|
✅ Thank you for adding the changelog entry! |
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
New command for retrieving and analyzing events in a session.
How
Query both metrics and logs, filtered by the session ID passed in.
Example results:
Test Plan