Skip to content

[WIP] observability: add SessionTimer.Reset to re-anchor session start#1607

Draft
shishirng wants to merge 1 commit into
mainfrom
duration_fix
Draft

[WIP] observability: add SessionTimer.Reset to re-anchor session start#1607
shishirng wants to merge 1 commit into
mainfrom
duration_fix

Conversation

@shishirng
Copy link
Copy Markdown
Contributor

Lets callers re-anchor the timer to the moment a participant actually joins, so wall-clock time accrued before that (auth, room setup, ICE establishment) is not counted toward reported/billed duration. Guards Advance/Reset with a mutex since the re-anchor happens on a different goroutine than the periodic reporter tick. Min-seconds/min-minutes options are preserved across Reset.

Lets callers re-anchor the timer to the moment a participant actually
joins, so wall-clock time accrued before that (auth, room setup, ICE
establishment) is not counted toward reported/billed duration. Guards
Advance/Reset with a mutex since the re-anchor happens on a different
goroutine than the periodic reporter tick. Min-seconds/min-minutes
options are preserved across Reset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

⚠️ No Changeset found

Latest commit: 82fbe34

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@shishirng shishirng marked this pull request as draft June 5, 2026 10:34
@shishirng shishirng requested a review from paulwe June 5, 2026 10:47
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.

1 participant