Repository navigation
[Bug]: Bug in OpenAI OTel Instrumentation? #119
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingdistroRelated to the OpenTelemetry distroRelated to the OpenTelemetry distro
Description
Activity
- addeddistroRelated to the OpenTelemetry distroRelated to the OpenTelemetry distro
on May 5, 2026 jeremydvoss commented
on May 6, 2026 MemberAuthorMore actionsSome more details about the different errors I get
Scenario 1: simple pnpm run build
repro:
pnpm run build
output:'rimraf' is not recognized as an internal or external command, operable program or batch file. ELIFECYCLE Command failed with exit code 1.Scenario 2: Install peers before build
repro:
pnpm install --config.auto-install-peers=true pnpm run buildoutput:
src/genai/instrumentations/openai/openAIAgentsTraceProcessor.ts:20:8 - error TS2307: Cannot find module '@openai/agents-core' or its corresponding type declarations. 20 } from "@openai/agents-core"; ~~~~~~~~~~~~~~~~~~~~~ src/genai/instrumentations/openai/utils.ts:6:51 - error TS2307: Cannot find module '@openai/agents-core' or its corresponding type declarations. 6 import type { Span as AgentsSpan, SpanData } from "@openai/agents-core"; ~~~~~~~~~~~~~~~~~~~~~ Found 2 errors in 2 files. Errors Files 1 src/genai/instrumentations/openai/openAIAgentsTraceProcessor.ts:20 1 src/genai/instrumentations/openai/utils.ts:6 ELIFECYCLE Command failed with exit code 2.Scenario 3: Install openai agents-core first
Repro:
pnpm install --config.auto-install-peers=true pnpm add -D @openai/agents-core Pnpm run buildOutput:
Types of property 'onTraceStart' are incompatible. Type '(_trace: Trace) => Promise<void>' is not comparable to type '(trace: Trace) => Promise<void>'. Types of parameters '_trace' and 'trace' are incompatible. Type 'import("C:/Users/jeremyvoss/workplace/opentelemetry-distro-javascript/node_modules/.pnpm/@openai+agents-core@0.8.5_@_a7e194fe3552aa075c4e455ccd0d128d/node_modules/@openai/agents-core/dist/tracing/traces").Trace' is not comparable to type 'import("C:/Users/jeremyvoss/workplace/opentelemetry-distro-javascript/node_modules/.pnpm/@openai+agents-core@0.9.1_@_a54df637cafab6a0b1a986d0f8ba7605/node_modules/@openai/agents-core/dist/tracing/traces").Trace'. Property '#private' in type 'Trace' refers to a different member that cannot be accessed from within type 'Trace'. 95 setTraceProcessors([this.processor as TracingProcessor]);- added a commit that references this issue
on May 6, 2026 - added a commit that references this issue
on May 12, 2026
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdistroRelated to the OpenTelemetry distroRelated to the OpenTelemetry distro
Component
distro
Description
Error:

Distro version: 1.0.1 (built from sources)
Exporter version: 1.0.0-beta.39
App:
Expected Behavior
Should run without type error
Steps to Reproduce
pnpm run buildat rootpnpm packEnvironment
Windows
Distro version: 1.0.1 (built from sources)
Exporter version: 1.0.0-beta.39
Additional Context
No response