Skip to content

[eas-cli] Add observe:metrics and observe:events commands#3564

Open
douglowder wants to merge 7 commits intomainfrom
doug/eng-20174-observe-events
Open

[eas-cli] Add observe:metrics and observe:events commands#3564
douglowder wants to merge 7 commits intomainfrom
doug/eng-20174-observe-events

Conversation

@douglowder
Copy link
Copy Markdown
Contributor

@douglowder douglowder commented Mar 31, 2026

This is a merge of @Ubax 's changes from #3431 and #3432 , with refactoring to align with the recent OCLIF upgrade and some other adjustments.

Why

Provide CLI commands to display Observe metrics and events.

USAGE
  $ eas observe:events --metric
    tti|ttr|cold_launch|warm_launch|bundle_load|expo.app_startup.tti|expo.app_startup.ttr|expo.app_startup.cold_launch_t
    ime|expo.app_startup.warm_launch_time|expo.app_startup.bundle_load_time [--sort slowest|fastest|newest|oldest]
    [--platform android|ios] [--after <value>] [--limit <value>] [--start <value> | --days-from-now <value>] [--end
    <value> | ] [--app-version <value>] [--update-id <value>] [--json] [--non-interactive]

FLAGS
  --after=<value>          Cursor for pagination. Use the endCursor from a previous query to fetch the next page.
  --app-version=<value>    Filter by app version
  --days-from-now=<value>  Show events from the last N days (mutually exclusive with --start/--end)
  --end=<value>            End of time range (ISO date)
  --json                   Enable JSON output, non-JSON messages will be printed to stderr. Implies --non-interactive.
  --limit=<value>          The number of items to fetch each query. Defaults to 10 and is capped at 100.
  --metric=<option>        (required) Metric to query (full name or alias)
                           <options: tti|ttr|cold_launch|warm_launch|bundle_load|expo.app_startup.tti|expo.app_startup.t
                           tr|expo.app_startup.cold_launch_time|expo.app_startup.warm_launch_time|expo.app_startup.bundl
                           e_load_time>
  --non-interactive        Run the command in non-interactive mode.
  --platform=<option>      Filter by platform
                           <options: android|ios>
  --sort=<option>          [default: oldest] Sort order for events
                           <options: slowest|fastest|newest|oldest>
  --start=<value>          Start of time range (ISO date)
  --update-id=<value>      Filter by EAS update ID

DESCRIPTION
  display individual app performance events ordered by metric value


USAGE
  $ eas observe:events --metric <value> [--sort slowest|fastest|newest|oldest] [--platform android|ios] [--after
    <value>] [--limit <value>] [--start <value> | --days-from-now <value>] [--end <value> | ] [--app-version <value>]
    [--update-id <value>] [--json] [--non-interactive]

FLAGS
  --after=<value>          Cursor for pagination. Use the endCursor from a previous query to fetch the next page.
  --app-version=<value>    Filter by app version
  --days-from-now=<value>  Show events from the last N days (mutually exclusive with --start/--end)
  --end=<value>            End of time range (ISO date)
  --json                   Enable JSON output, non-JSON messages will be printed to stderr. Implies --non-interactive.
  --limit=<value>          The number of items to fetch each query. Defaults to 10 and is capped at 100.
  --metric=<value>         (required) Metric to query (full name or alias: tti, ttr, cold_launch, warm_launch,
                           bundle_load)
  --non-interactive        Run the command in non-interactive mode.
  --platform=<option>      Filter by platform
                           <options: android|ios>
  --sort=<option>          [default: oldest] Sort order for events
                           <options: slowest|fastest|newest|oldest>
  --start=<value>          Start of time range (ISO date)
  --update-id=<value>      Filter by EAS update ID

DESCRIPTION
  display individual app performance events ordered by metric value

How

New commands and GraphQL queries.

Test Plan

New unit tests added in fetchEvents-test.ts

@linear
Copy link
Copy Markdown

linear bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@douglowder douglowder changed the title [eas-cli] Add observe:metrics command [eas-cli] Add observe:metrics and observe:events commands Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 97.22222% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.72%. Comparing base (3945763) to head (1d5613f).

Files with missing lines Patch % Lines
...ckages/eas-cli/src/graphql/queries/ObserveQuery.ts 38.47% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3564      +/-   ##
==========================================
+ Coverage   54.38%   54.72%   +0.35%     
==========================================
  Files         824      833       +9     
  Lines       35420    35707     +287     
  Branches     7318     7381      +63     
==========================================
+ Hits        19258    19537     +279     
- Misses      16075    16083       +8     
  Partials       87       87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@douglowder douglowder marked this pull request as ready for review March 31, 2026 21:56
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.

2 participants