Skip to content

[Due for payment 2026-03-02] Add Sentry spans for expense creation flow #82993

Closed

Description

@marcaaron

Problem

When analyzing expense creation performance in Sentry, all expense flows (request money, distance, split, track, invoice) are mixed under one broad span. This makes it hard to identify which specific flow has performance issues and to measure the full round-trip including server response time.

Solution

Add granular Sentry spans to the expense creation flow:

  • Add ManualSubmitExpense span measuring confirm tap → API dispatch, tagged with scenario attribute (e.g. request_money_manual, distance, split, track_expense, invoice) to distinguish flows
  • Add ManualNavigateAfterExpenseCreate span measuring post-submit navigation to the Search page
  • Add SentryServerTiming middleware that creates a ManualExpenseServerResponse span for expense write commands

PR: #82287

Activity

  1. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 23, 2026
  2. changed the title [-]Add Sentry spans for expense creation flow[/-] [+][Due for payment 2026-03-02] Add Sentry spans for expense creation flow[/+] on Feb 23, 2026
  3. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  4. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.24-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-03-02. 🎊

    For reference, here are some details about the assignees on this issue:

  5. melvin-bot commented on Mar 5, 2026

    @melvin-bot

    @OlimpiaZurek, @marcaaron, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  6. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    @OlimpiaZurek, @marcaaron, @bernhardoj 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  7. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    @OlimpiaZurek, @marcaaron, @bernhardoj 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  8. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 9, 2026
  9. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  10. marcaaron commented on Mar 9, 2026

    @marcaaron
    ContributorAuthor

    This wasn't a bug but adding the label because I think @bernhardoj was C+ on this and not sure if this is ready to be closed yet. The PR has been deployed for some time.

  11. MelvinBot commented on Mar 9, 2026

    @MelvinBot
    Contributor

    🔍 Issue Analysis

    Summary: This is an enhancement (not a bug) to add granular Sentry performance spans to the expense creation flow. The linked PR (#82287) was merged on 2026-02-19 and deployed to production in version 9.3.24-3.

    Current Status: The implementation is complete and deployed. The PR added:

    • ManualSubmitExpense span (confirm tap → API dispatch) with scenario tagging
    • ManualNavigateAfterExpenseCreate span (post-submit navigation)
    • SentryServerTiming middleware for ManualExpenseServerResponse spans

    Files changed in the PR:

    • src/CONST/index.ts — new span/scenario constants
    • src/libs/Middleware/SentryServerTiming.ts — new middleware for server timing spans
    • src/libs/actions/IOU/index.ts — span instrumentation in IOU actions
    • src/libs/telemetry/getSubmitExpenseScenario.ts — scenario classification helper
    • src/libs/telemetry/markSubmitExpenseEnd.ts — submit span end marker
    • src/libs/telemetry/markNavigateAfterExpenseCreateEnd.ts — navigation span end marker
    • src/pages/iou/request/step/IOURequestStepConfirmation.tsx — span start on confirm
    • src/components/Search/index.tsx — navigation span end on Search page render
    • src/libs/API/index.ts — middleware integration

    Assessment: The work is done and deployed. The 7-day regression period (ending 2026-03-02) has passed without reported regressions. This issue appears ready to be closed and payment processed.


    Next Steps: This issue can likely be closed. bernhardoj (C+) may want to confirm the regression period is clear before closing.

  12. JmillsExpensify commented on Mar 9, 2026

    @JmillsExpensify
    Contributor

    This is eligible for payment now.

    Summary: $250 @bernhardoj for PR review and testing. Paid via New Expensify.

  13. bernhardoj commented on Mar 10, 2026

    @bernhardoj
    Contributor

    Requested in ND.

  14. garrettmknight commented on Mar 10, 2026

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions