Skip to main content
Enable tracing at process startup, then use the integration for your agent. The SDK groups telemetry by session so the transcript and trace are available on the same conversation in Logs.

Trace chat or SMS

Use @client.session(...) in Python or a client.session(...) callback in Node.js. Choose a stable conversation ID from the handler’s arguments. Use the same ID for every message in the conversation.
For SMS, use the conversation ID across messages and record the agent turn after your send succeeds:
Use the external ID configured on your Bluejay agent. To build the conversation when your app knows it has ended, call client.end_session() in Python or await client.endSession() in Node.js. Pass the conversation ID and the same agent ID. Bluejay also builds idle sessions automatically.

Trace custom voice

Keep one ID for the call. Record the caller’s finalized transcript and the portion of the reply that played. Pass timezone-aware datetime values for speech timing.
For callbacks, reopen the same session ID as each callback runs. A custom stack supplies its own audio. If you already have a recording and a transcript, you can submit the finished call through Evaluate as an alternative ingest path. Use one ingest path per conversation.

Add model and tool details

turn() writes a transcript line. Supported provider calls are traced automatically inside the active session. Node.js has built-in OpenAI tracing. For other providers, use existing OpenTelemetry instrumentation or a manual model span. See OpenAI, Anthropic, Gemini, or Bedrock. Wrap a custom function with observe() to record its arguments, result, and errors. Use a decorator in Python or wrap the function in Node.js.
For a model request that has no provider or framework span, use a manual span and set its output and token counts.

Configure data capture

Configure trace redaction when initializing the client at startup:
redact_pii=True in Python and redactPii: true in Node.js strip supported content attributes such as transcript lines, prompts, and tool payloads from spans sent to Bluejay. For custom span attributes, provide a mask function. The voice integrations have separate audio upload settings.

Verify the integration

Send a message or place a call, then open the conversation in Logs and inspect its trace. For a short-lived trace-only script, flush spans before exit with client.flush() in Python or await client.flush() in Node.js.
Last modified on November 23, 2026