Skip to content

Retire the ManualSendMessage telemetry span and keep only ManualSendMessageVisible #99409

Closed

Description

@cristipaval

Problem

We currently emit two Sentry spans for send-message latency:

  • ManualSendMessage — ends in a useEffect flush, which fires before the message is painted. It does not measure what the user waits for.
  • ManualSendMessageVisible — ends at the message onLayout, so it measures the real user-perceived send latency.

We started emitting both to compare them over a ~2 week window. The comparison is done and the two numbers disagree about direction:

  • Old timer (ManualSendMessage): 292.76ms → 321.48ms (+9.8%)
  • Honest timer (ManualSendMessageVisible): 542.35ms → 494.89ms (−8.8%)

Sentry traces confirm the old span is misleading — e.g. ManualSendMessage reads ~100ms on a trace where ManualSendMessageVisible reads ~2s, and FullStory shows the ~2s number is the real one. Reporting two spans that disagree is confusing, so we should keep only the honest one.

Solution

Remove ManualSendMessage everywhere and keep ManualSendMessageVisible as the single send-message metric:

  • Drop the SPAN_SEND_MESSAGE constant and stop starting the span in the composer submit.
  • Remove the effect-anchored endSpan in TextCommentFragment.
  • Point the skeleton-cancel listener and the navigate-away prefix cancels at SPAN_SEND_MESSAGE_VISIBLE only.
  • Update the observability docs and the agent-device flow tags/descriptions.

Target for the visible span: 300ms (P90).

Fixed in

#99403

Issue OwnerCurrent Issue Owner: @LukasMod

Activity

  1. self-assigned this
    on Aug 25, 2026
  2. added
    Reviewing
    Weekly
    and removed
    Daily
    on Aug 25, 2026
  3. added
    Daily
    and removed
    Reviewing
    Weekly
    on Aug 28, 2026
  4. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    @cristipaval @LukasMod

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

  5. cristipaval commented on Aug 29, 2026

    @cristipaval
    ContributorAuthor

    No payment needed here

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

Metadata

Metadata

Labels

Daily

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions