Skip to content

Avoid login during OTEL logger startup#2163

Open
Alex R (alexr17) wants to merge 9 commits into
mainfrom
alexr/otel-initlogger-skip-login
Open

Avoid login during OTEL logger startup#2163
Alex R (alexr17) wants to merge 9 commits into
mainfrom
alexr/otel-initlogger-skip-login

Conversation

@alexr17

@alexr17 Alex R (alexr17) commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Context

Reduce startup login traffic for mixed OTEL + logger initialization in the JS SDK.

Description

  • let @braintrust/otel prime internal bootstrap auth for the resolved API key and API URL
  • let initLogger resolve project metadata directly on that path instead of eagerly calling /api/apikey/login
  • add focused unit coverage and extend the existing Next.js instrumentation e2e request-flow check

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

Copy link
Copy Markdown

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: 71f4c8a4d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread js/src/logger.ts Outdated
Comment thread integrations/otel-js/src/otel.ts
@alexr17

Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

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

Copy link
Copy Markdown

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: 4d94b2ab51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread js/src/logger.ts
@alexr17

Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

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

Copy link
Copy Markdown

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: 6a9a2bc2d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread js/src/logger.ts
Comment thread js/src/logger.ts
@alexr17

Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

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

Copy link
Copy Markdown

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: 9e99deb3c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +757 to +761
await expect(formatSpanTreeSnapshot(events)).toMatchFileSnapshot(
snapshotPath.replace(/\.json$/, ".txt"),
);
await expect(formatSpanTreeJsonSnapshot(events)).toMatchFileSnapshot(
snapshotPath,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve canary snapshot handling

In canary mode, matchFileSnapshot in e2e/helpers/file-snapshot.ts intentionally writes the snapshot and returns without failing, so provider drift is handled by the canary update workflow. These direct toMatchFileSnapshot calls bypass that wrapper, so the Claude Agent SDK canary assertions will now fail on expected span-tree drift instead of updating/passing as before; keep using matchSpanTreeSnapshot/matchFileSnapshot here or route both snapshots through the wrapper.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant