Skip to content

Conversation

@RulaKhaled
Copy link
Member

Upgrades OpenAI instrumentation to support OpenAI SDK v6.0.0 and adds node integration tests to verify compatibility.

Changes

Instrumentation:

  • Bumped OpenAI SDK support to v6.0.0 (<v7)
  • OpenAI v6 introduces no breaking changes that affect our instrumentation
  • All existing instrumentation logic remains compatible with the new SDK version

ref: https://github.com/openai/openai-node/releases/tag/v6.0.0

Testing:

  • Created v6 test suite in dev-packages/node-integration-tests/suites/tracing/openai/v6/
  • Tests verify OpenAI SDK v6.0.0 instrumentation across:
    • Chat completions API with and without PII tracking
    • Responses API with streaming support
    • Custom integration options (recordInputs, recordOutputs)
    • Error handling in chat completions and streaming contexts
    • Root span creation without wrapping spans
    • Embeddings API

@linear
Copy link

linear bot commented Nov 18, 2025

@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,576 - 8,602 -0%
GET With Sentry 1,302 15% 1,345 -3%
GET With Sentry (error only) 6,018 70% 5,849 +3%
POST Baseline 1,164 - 1,161 +0%
POST With Sentry 508 44% 483 +5%
POST With Sentry (error only) 1,021 88% 1,018 +0%
MYSQL Baseline 3,270 - 3,313 -1%
MYSQL With Sentry 434 13% 422 +3%
MYSQL With Sentry (error only) 2,689 82% 2,665 +1%

View base workflow run

Copy link
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

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

Nice

Comment on lines +57 to +58
// eslint-disable-next-line no-console
console.log(JSON.stringify(response));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// eslint-disable-next-line no-console
console.log(JSON.stringify(response));

@RulaKhaled RulaKhaled merged commit b3bf56d into develop Nov 19, 2025
134 of 135 checks passed
@RulaKhaled RulaKhaled deleted the rolaabuhasna/js-1112-support-openai-v6 branch November 19, 2025 09:04
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.

3 participants