Skip to content

chore: add tallyman events for ai seat tracking#22689

Merged
Emyrk merged 1 commit into
mainfrom
stevevenmasley/tallyman
Mar 18, 2026
Merged

chore: add tallyman events for ai seat tracking#22689
Emyrk merged 1 commit into
mainfrom
stevevenmasley/tallyman

Conversation

@Emyrk
Copy link
Copy Markdown
Member

@Emyrk Emyrk commented Mar 5, 2026

Need to update the metronome and other side before this is merged. The aggregation and publish I believe is handled by the usage_events_daily table

Copy link
Copy Markdown
Member Author

Emyrk commented Mar 5, 2026

@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 94fadb3 to 431ac5e Compare March 5, 2026 23:09
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 37583a8 to 17ec635 Compare March 5, 2026 23:09
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 431ac5e to 522ed8c Compare March 6, 2026 12:25
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 17ec635 to 119050c Compare March 6, 2026 12:26
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 522ed8c to d446981 Compare March 6, 2026 14:41
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch 2 times, most recently from 37a5eea to b961430 Compare March 6, 2026 16:49
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from d446981 to 5854628 Compare March 6, 2026 16:49
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch 3 times, most recently from f7a1990 to 3d4ce09 Compare March 9, 2026 16:06
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 5854628 to 691cd7f Compare March 11, 2026 01:08
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 3d4ce09 to 33d4fed Compare March 11, 2026 01:08
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 691cd7f to 5c27ce2 Compare March 11, 2026 01:21
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch 2 times, most recently from 0d542d6 to 4e511de Compare March 11, 2026 14:48
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch 2 times, most recently from 2385613 to 4416045 Compare March 11, 2026 14:48
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch 2 times, most recently from 5c8c1e3 to 953fe60 Compare March 11, 2026 15:06
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 4416045 to a7a70de Compare March 11, 2026 15:06
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 953fe60 to 854dc3d Compare March 11, 2026 15:27
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from a7a70de to f72dbb6 Compare March 11, 2026 15:27
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 854dc3d to a884dcf Compare March 11, 2026 15:29
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from f72dbb6 to 1af7bf3 Compare March 11, 2026 15:29
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from ef434fa to 0143c23 Compare March 16, 2026 16:26
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 3d6a148 to 7e1523f Compare March 16, 2026 16:26
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 0143c23 to cd03dee Compare March 16, 2026 16:27
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 7e1523f to 9cc91b4 Compare March 16, 2026 16:27
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from cd03dee to 7840052 Compare March 16, 2026 16:54
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 9cc91b4 to a05813b Compare March 16, 2026 16:55
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 7840052 to e5d9f7f Compare March 16, 2026 17:20
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from a05813b to e3483f3 Compare March 16, 2026 17:20
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from e5d9f7f to 53e614d Compare March 16, 2026 17:21
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from e3483f3 to bdbbd8b Compare March 16, 2026 17:21
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 53e614d to 72e0c01 Compare March 16, 2026 17:29
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from bdbbd8b to 6688935 Compare March 16, 2026 17:29
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch 2 times, most recently from a19f431 to ce6da7b Compare March 16, 2026 17:37
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 6688935 to b2d3275 Compare March 16, 2026 17:37
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from ce6da7b to 94483e8 Compare March 16, 2026 18:07
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch 2 times, most recently from 8e4b8c4 to caffb50 Compare March 16, 2026 19:55
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 94483e8 to 9d779ed Compare March 16, 2026 19:55
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from caffb50 to 71ff620 Compare March 16, 2026 20:08
@Emyrk Emyrk force-pushed the stevenmasley/ai_seats_audit branch from 9d779ed to 4afd9e1 Compare March 16, 2026 20:08
@Emyrk Emyrk changed the base branch from stevenmasley/ai_seats_audit to graphite-base/22689 March 16, 2026 20:30
@Emyrk Emyrk force-pushed the stevevenmasley/tallyman branch from 71ff620 to e269255 Compare March 16, 2026 20:30
@Emyrk Emyrk force-pushed the graphite-base/22689 branch from 4afd9e1 to 93b9d70 Compare March 16, 2026 20:30
@Emyrk
Copy link
Copy Markdown
Member Author

Emyrk commented Mar 17, 2026

@deansheather now the cron package handles

  • Choosing the stable ID
  • Checking if the event already exists

So the heartbeat function only has to generate the event. There is a race between checking if the event exists, generating the event, then inserting. This is ok because inserts are idempotent, and this is just a minor optimization to avoid some work where we can.

Maybe we can add better synchronization if we need to fix that race.

All the tickers start from this epoch: var epoch = time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC)

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@Emyrk
Copy link
Copy Markdown
Member Author

Emyrk commented Mar 18, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Comment thread coderd/usage/usagetypes/events.go
Comment thread enterprise/coderd/usage/cron.go Outdated
Comment thread enterprise/coderd/usage/cron.go Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants