Skip to content

Do a better job of capturing org name in the metric#394

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

Do a better job of capturing org name in the metric#394
ankrgyl merged 1 commit intomainfrom
proxy-metrics

Conversation

@ankrgyl
Copy link
Contributor

@ankrgyl ankrgyl commented Feb 15, 2026

No description provided.

@vercel
Copy link

vercel bot commented Feb 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-proxy Building Building Preview, Comment Feb 15, 2026 6:11pm

Request Review

@ankrgyl ankrgyl merged commit e15d549 into main Feb 15, 2026
3 of 4 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 Preserve request metric for pre-secret failures

By gating logRequest() behind if (orgName) here, requests without an explicit org header no longer emit aiproxy.requests until much later in the flow. Any exception before the secrets callback or final tail logging (for example the vercel-ai non-stream validation error at streamFormat === "vercel-ai" && !isStreaming) now exits without ever recording a request, whereas the previous unconditional call counted these failed attempts. This regresses request-count accuracy for error/invalid traffic.

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