Python SDK Configuration
This page covers all configuration options for the SideSeat Python SDK.
Constructor Parameters
Section titled “Constructor Parameters”SideSeat( # Connection endpoint: str | None = None, project_id: str | None = None, api_key: str | None = None,
# Framework framework: str | None = None, auto_instrument: bool = True,
# Service identity service_name: str | None = None, service_version: str | None = None,
# Telemetry signals enable_traces: bool = True, enable_metrics: bool = True, enable_logs: bool = False,
# Content capture capture_content: bool = True, encode_binary: bool = True,
# Control disabled: bool = False, debug: bool = False,)Connection Parameters
Section titled “Connection Parameters”endpoint
Section titled “endpoint”SideSeat server URL.
# Defaultclient = SideSeat() # Uses http://127.0.0.1:5388
# Custom endpointclient = SideSeat(endpoint="http://sideseat.example.com:5388")project_id
Section titled “project_id”Project identifier for organizing traces.
client = SideSeat(project_id="my-project")api_key
Section titled “api_key”Authentication key for the SideSeat server.
client = SideSeat(api_key="pk-your-api-key")Framework Parameters
Section titled “Framework Parameters”framework
Section titled “framework”Explicitly select a framework to instrument.
from sideseat import SideSeat, Frameworks
client = SideSeat(framework=Frameworks.LangGraph)Available frameworks:
Frameworks.StrandsFrameworks.LangGraphFrameworks.LangChainFrameworks.CrewAIFrameworks.AutoGenFrameworks.OpenAIAgentsFrameworks.GoogleADKFrameworks.PydanticAI
If not specified, the SDK auto-detects in this order:
- Strands (
strands-agents) - LangChain / LangGraph (
langchain-core) - CrewAI (
crewai) - AutoGen (
autogen-agentchat) - OpenAI Agents (
agents) - Google ADK (
google-adk) - PydanticAI (
pydantic-ai)
auto_instrument
Section titled “auto_instrument”Enable automatic framework instrumentation.
# Auto-instrument (default)client = SideSeat(auto_instrument=True)
# Skip instrumentationclient = SideSeat(auto_instrument=False)Service Identity
Section titled “Service Identity”service_name
Section titled “service_name”Override the auto-detected service name.
# Auto-detect (default)client = SideSeat()
# Explicit nameclient = SideSeat(service_name="my-agent")service_version
Section titled “service_version”Set the service version for resource attributes.
client = SideSeat( service_name="my-agent", service_version="1.2.3")Telemetry Signals
Section titled “Telemetry Signals”enable_traces
Section titled “enable_traces”Enable trace span export.
client = SideSeat(enable_traces=True) # Defaultenable_metrics
Section titled “enable_metrics”Enable metrics export.
client = SideSeat(enable_metrics=True) # Defaultenable_logs
Section titled “enable_logs”Enable log export.
client = SideSeat(enable_logs=False) # DefaultContent Capture
Section titled “Content Capture”capture_content
Section titled “capture_content”Capture LLM prompts and responses.
# Capture content (default)client = SideSeat(capture_content=True)
# Disable for privacyclient = SideSeat(capture_content=False)encode_binary
Section titled “encode_binary”Base64 encode binary data in spans.
# Encode binary (default)client = SideSeat(encode_binary=True)
# Leave as-is (may cause export errors)client = SideSeat(encode_binary=False)Control Parameters
Section titled “Control Parameters”disabled
Section titled “disabled”Disable all telemetry.
# Disabled modeclient = SideSeat(disabled=True)Useful for testing or CI environments.
Enable verbose logging.
client = SideSeat(debug=True)Environment Variables
Section titled “Environment Variables”The SDK respects these environment variables:
| Variable | Default | Description |
|---|---|---|
SIDESEAT_ENDPOINT | http://127.0.0.1:5388 | Server URL |
SIDESEAT_PROJECT | default | Project identifier |
SIDESEAT_API_KEY | — | Authentication key |
SIDESEAT_DISABLED | false | Disable all telemetry |
SIDESEAT_DEBUG | false | Enable verbose logging |
Standard OpenTelemetry variables are also supported:
| Variable | Description |
|---|---|
OTEL_SERVICE_NAME | Override service name |
OTEL_EXPORTER_OTLP_ENDPOINT | Default OTLP endpoint |
OTEL_EXPORTER_OTLP_HEADERS | Default headers (comma-separated) |
OTEL_EXPORTER_OTLP_TIMEOUT | Request timeout |
Configuration Priority
Section titled “Configuration Priority”Settings are resolved in this order (highest to lowest):
- Constructor parameters
SIDESEAT_*environment variablesOTEL_*environment variables- Defaults
Complete Example
Section titled “Complete Example”from sideseat import SideSeat, Frameworks
# Full configurationclient = SideSeat( # Connection endpoint="http://localhost:5388", project_id="my-project", api_key="pk-xxx",
# Framework framework=Frameworks.LangGraph, auto_instrument=True,
# Service identity service_name="my-agent", service_version="1.0.0",
# Telemetry signals enable_traces=True, enable_metrics=True, enable_logs=False,
# Content capture capture_content=True, encode_binary=True,
# Control disabled=False, debug=False,)
# Add debug exportersclient.telemetry.setup_file_exporter("traces.jsonl")
# Your agent code here...
# Explicit shutdown (or let atexit handle it)client.shutdown()Next Steps
Section titled “Next Steps”- SideSeat Class — API reference
- Exporters — debug exporters