Skip to content

generated: add realtime reporter methods to gatewayobs#1663

Open
russellmartin-livekit wants to merge 1 commit into
mainfrom
realtime-gateway-obs-gen
Open

generated: add realtime reporter methods to gatewayobs#1663
russellmartin-livekit wants to merge 1 commit into
mainfrom
realtime-gateway-obs-gen

Conversation

@russellmartin-livekit

Copy link
Copy Markdown

Summary

Regenerated observability/gatewayobs from the cloud-observability schema/gateway.yaml realtime (speech-to-speech) billing columns merged in cloud-observability #502.

Adds these methods to the gateway model reporter / ModelTx (and the noop impls):

ReportRealtimeDurationSeconds(uint32)
ReportRealtimeInputTextTokens(uint64)
ReportRealtimeInputAudioTokens(uint64)
ReportRealtimeInputImageTokens(uint64)
ReportRealtimeInputVideoTokens(uint64)
ReportRealtimeOutputTextTokens(uint64)
ReportRealtimeOutputAudioTokens(uint64)
ReportRealtimeCachedTextTokens(uint64)
ReportRealtimeCachedAudioTokens(uint64)

Generated via generate-schema --schema-file schema/gateway.yaml (mirrors the existing STT/TTS/EoT reporter generation). Only the generated gen_reporter.go / gen_reporter_noop.go change (plus a version-hash bump); no new enum types, so gen_source.go is untouched.

Why

This is the missing write-side link in the realtime billing chain. The read/billing side is built (backend-common #939, analytics-recorder #949) and reads the realtime_* ClickHouse rollup columns — but nothing emits them yet. With these methods, agent-gateway (#876) can report realtime usage into the realtime_* columns instead of piggybacking on the inference_*/stt_duration columns.

Chain

Test plan

  • go build ./observability/gatewayobs/
  • CI

Regenerated from cloud-observability schema/gateway.yaml realtime (speech-to-speech)
billing columns (#502). Adds ReportRealtime{DurationSeconds, Input{Text,Audio,Image,
Video}Tokens, Output{Text,Audio}Tokens, Cached{Text,Audio}Tokens} to the gateway
model reporter, so agent-gateway can emit the realtime_* metrics that populate the
observability rollup consumed by analytics-recorder (#949) and backend-common (#939).
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c2164e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
github.com/livekit/protocol Patch
@livekit/protocol Patch

Not sure what this means? Click here to learn what changesets are.

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

@russellmartin-livekit russellmartin-livekit marked this pull request as ready for review July 10, 2026 19:09
@russellmartin-livekit russellmartin-livekit self-assigned this Jul 10, 2026
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