Add assistant join wait/timeout/poll-rescue metrics#2
Open
yewreeka wants to merge 2 commits into
Open
Conversation
Instruments the gap after agents/join where the user watches the assistant joining/verifying state: - assistant_joined: a verified assistant appeared in the member list; wait_duration is the seconds spent watching, surface is where the user was watching (status message bubble, contact card, or agent builder placeholder). - assistant_join_timed_out: no verified assistant arrived within the client wait window (the assistant backend gives up after ~2 minutes). - assistant_join_rescued_by_polling: the iOS client's temporary join-request polling fallback processed a join request the realtime message stream missed - direct evidence of a silently dead stream, with stream_age_secs reporting how stale the stream was. Descriptor change + regenerated Swift package and README catalog (./gradlew build in metrics/). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ApprovabilityVerdict: Approved Purely additive telemetry changes - adds new metrics events for tracking assistant join wait times, timeouts, and polling rescues. No existing behavior modified; all new code simply fires analytics events with timing properties. You can customize Macroscope's approvability policy. Learn more. |
joinedConversation's verification_duration only samples successful joins. When the conversation creator's device never approves the join request (offline, or its message stream died), the joiner sits in the "Verifying" state with no telemetry at all. conversation_join_timed_out reports that wait: emitted by the client when the join wait window elapses without the conversation becoming ready, with the same source breakdown (url / scan / paste) as joined_conversation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dismissing prior approval to re-evaluate db0dde4
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
Convos iOS users sometimes watch the agent "Joining…/verifying" state until the agent backend gives up (~2 minutes). We suspect the client's XMTP message stream dies silently, so the agent's join-request DM never gets processed. convos-ios#1004 adds a temporary client-side polling fallback to diagnose this; these metrics make the problem (and the wait users experience) measurable in PostHog.
New events
assistant_joinedwait_duration(secs watching the joining state),surface(status_message/contact_card/builder_placeholder),member_countassistant_join_timed_outwait_duration,surfaceassistant_join_rescued_by_pollingstream_age_secs(time since the stream last delivered anything, -1 = never),poll_tickAdded in a follow-up commit:
conversation_join_timed_out(wait_duration,source) — the standard invite-join counterpart: emitted when a joiner sits in the "Verifying" state past the client wait window because the creator's device never approved the join request. Complementsjoined_conversation.verification_duration, which only samples successes.Funnel:
added_assistant(exists) →assistant_joinedgives stuck-rate and wait-duration distribution;assistant_join_rescued_by_pollinggives the stream-death rate.Descriptor change in
metrics/descriptors/.../core/CoreActions.kt+ regenerated Swift package and README catalog via./gradlew build.swift buildpasses on the regenerated package.Consumer PR: convos-ios#1005 (stacked on convos-ios#1004). Merge this first, then flip the iOS convos-shared pin back to main.
🤖 Generated with Claude Code
Note
Add assistant join wait, timeout, and poll-rescue metrics to
CoreActionsAdds four new metric events to track assistant join lifecycle:
assistant_joined,assistant_join_timed_out,assistant_join_rescued_by_polling, andconversation_join_timed_out. Each event captures relevant properties such as wait duration, surface, member count, stream age, and poll tick. Introduces a newAssistantJoinSurfaceenum with casesstatusMessage,contactCard, andbuilderPlaceholdermapped to stable string identifiers for use in metric payloads. Changes are applied to both the Swift (CoreActions.swift) and Kotlin (CoreActions.kt) definitions.Macroscope summarized db0dde4.