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.
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-awaredatetime values for speech timing.
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.
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 withclient.flush() in Python or await client.flush() in Node.js.