feat(o11y): add kilo_user_id to API metrics for usage reconciliation#3239
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
feat(o11y): add kilo_user_id to API metrics for usage reconciliation#3239kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
Include kiloUserId (already present in ApiMetricsParamsSchema) as blob7 in the Analytics Engine data point and as kilo_user_id in the Pipeline stream payload so that o11y API metrics records can be reconciled with microdollar usage records by user.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis is a clean, minimal change that correctly wires up Key points verified:
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-4.6 · 213,182 tokens |
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.
Summary
kiloUserIdwas already a required field inApiMetricsParamsSchema(populated by the caller) but was never written to either the Analytics Engine dataset (O11Y_API_METRICS) or the Cloudflare Pipeline stream (API_METRICS_STREAM).kiloUserIdasblob7in the Analytics EnginewriteDataPointcall and askilo_user_idin the stream payload, making it available in both AE queries and Snowflake exports.api-metrics-schema.jsonpipeline schema definition is updated accordingly to reflect the newkilo_user_id: stringfield.Verification
/ingest/api-metricsrequest; confirmkilo_user_idappears in AE query results and in the stream batch.Visual Changes
N/A
Reviewer Notes
ApiMetricsParamsSchemawere needed —kiloUserIdwas already required there.blob7 = kiloUserIdappends without shifting existing fields.Built for Igor Šćekić by Kilo for Slack