Skip to content

Fix org name metrics#395

Merged
ankrgyl merged 1 commit intomainfrom
proxy-metrics
Feb 15, 2026
Merged

Fix org name metrics#395
ankrgyl merged 1 commit intomainfrom
proxy-metrics

Conversation

@ankrgyl
Copy link
Contributor

@ankrgyl ankrgyl commented Feb 15, 2026

No description provided.

@ankrgyl ankrgyl merged commit d148d7d into main Feb 15, 2026
7 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b61e84a229

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +393 to +395
if (orgName) {
logRequest();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Record requests before throw paths without org metadata

aiproxy.requests is now emitted only when orgName is already known or later in the request flow, so requests without an orgName can exit without being counted when proxyV1 throws before the later logRequest() calls (for example the vercel-ai validation error path, or provider/secret lookup exceptions from fetchModelLoop). Before this change, the metric was emitted unconditionally near the start, so this regresses request-count accuracy for failed calls.

Useful? React with 👍 / 👎.

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

Comments