Provider Guides
OpenAI
Python and JavaScript
Anthropic
Python and JavaScript
Python and JavaScript
AWS Bedrock
Python and JavaScript
Enable All Installed Providers
Python requires the optional instrumentation extra. Install only the provider SDKs your application uses:PROMPTLAYER_API_KEY and instruments every supported provider. Call shutdownTracing() before a short-lived process exits:
Select Providers
Omit the provider selection to instrument every supported provider. Pass an empty list or tuple to export PromptLayer spans without provider SDK auto-instrumentation.openai, anthropic, google, and bedrock. Python accepts amazon.bedrock and aws.bedrock as aliases for the Botocore instrumentor, and openai.azure as an alias for the OpenAI instrumentor. Anthropic Vertex uses anthropic; Google clients created with vertexai=True use google.
Python applications that do not create a PromptLayer client can call configure_tracing(providers=(...)). The function returns the configured tracer provider so short-lived processes can call force_flush().
Capture Prompts and Responses
PromptLayer captures supported provider prompt and response content by default. This provides the prompt, response, and tool data used by request inspection, content search, analytics, and debugging. To export metadata-only telemetry, opt out before tracing is configured:captureContent: false to configureTracing(). Python defaults the official OpenTelemetry capture mode to SPAN_ONLY when PromptLayer enables provider instrumentation and preserves an explicitly configured NO_CONTENT, SPAN_ONLY, EVENT_ONLY, or SPAN_AND_EVENT value.
Without content capture, traces still include model names, timing, token usage when available, and other non-content telemetry. PromptLayer cannot search or analyze prompt, response, and tool content that was not exported.
If a framework or agent SDK creates the provider client for you, use Telemetry Integrations. If no provider guide applies or you already own the telemetry pipeline, use OpenTelemetry. See the Tracing overview for the complete routing guide.
