Skip to content

feat: trace Retell call and chat execution - #2815

Draft
pear1-pea (pear1-pea) wants to merge 1 commit into
braintrustdata:mainfrom
pear1-pea:feat/retell-instrumentation
Draft

pear1-pea (pear1-pea) wants to merge 1 commit into
braintrustdata:mainfrom
pear1-pea:feat/retell-instrumentation

Conversation

@pear1-pea

Copy link
Copy Markdown

Retell call and chat requests currently have no Braintrust execution spans. This adds tracing for call.createPhoneCall, call.createWebCall, call.retrieve, chat.create, and chat.createChatCompletion in retell-sdk >=6.2.22 <7.

The change uses the existing interceptor/provider/config architecture and adds wrapRetell. Session creation and retrieval use task spans; chat completion uses an LLM span. Output capture omits web-call access tokens, transport credentials, phone numbers, arbitrary metadata and recording URLs. The original SDK promise is returned, and response helpers wait for capture of a cloned response body before application parsing.

Validation performed locally:

  • Focused instrumentation, registration and span-origin tests: 50 passed.
  • SDK source and test TypeScript checks passed.
  • Scoped formatting/lint and package build passed; lint reported zero warnings and zero errors.
  • Independent offline Retell 6.2.22 probe: 60 cases covering five endpoints, six consumption styles and success/error, including unread asResponse bodies and completed telemetry after helper consumption.

Refs #2412

This branch has not been deployed

No deployments
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