Open
Conversation
rektdeckard
reviewed
Mar 9, 2026
Comment on lines
+364
to
+384
| func resolveAnalyticsProjectID() (string, error) { | ||
| if project != nil && project.ProjectId != "" { | ||
| return project.ProjectId, nil | ||
| } | ||
|
|
||
| if project == nil { | ||
| return "", fmt.Errorf("%s; %s", analyticsProjectIDRequirement, analyticsProjectSelectHint) | ||
| } | ||
|
|
||
| projectName := project.Name | ||
| if strings.TrimSpace(projectName) == "" { | ||
| projectName = "<selected>" | ||
| } | ||
|
|
||
| return "", fmt.Errorf( | ||
| "selected project [%s] is missing project_id; %s. %s", | ||
| projectName, | ||
| analyticsProjectIDRequirement, | ||
| analyticsProjectSelectHint, | ||
| ) | ||
| } |
Member
There was a problem hiding this comment.
Urf, I would love a better solution than this...it basically mandates the user either remove and re-auth the legacy project, or go and edit ~/.livekit/cli-config.yaml to manually add it. We've only started storing the project ID in the last ~5 months.
Let me see if there's an easy way to maybe install a startup hook that will backfill old projects with their ID.
Member
|
This looks great so far! I will take a closer look and play around with it this evening. To answer your question, no -- analytics service is not implemented in LiveKit OSS. But neither are the |
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.
Adds a new
lk analyticscommand group to query LiveKit Cloud Analytics sessions.lk analytics listandlk analytics get SESSION_ID.--json/-joutput for both commands.--limit,--page,--start,--endwith validation.--project/ default project) and requires storedproject_id(no--project-idoverride).--curlsupport for analytics REST requests (prints equivalent curl command).go test ./cmd/lk.Mostly generated with Codex with manual code review.
Biggest thing I assumed was this is tightly coupled to LiveKit Cloud. Does this endpoint work for self hosted instances? I think the way this is built works for custom server URLs, but maybe some of the messages need to be tweaked