Configuration
The Shinzo Python SDK provides extensive configuration options to customize telemetry collection, data processing, and export behavior for your MCP server.Basic Configuration
The minimal configuration requires only a few essential parameters:TelemetryConfig Parameters
The configuration dictionary provides comprehensive configuration options:Required Parameters
| Parameter | Type | Description |
|---|---|---|
server_name | str | Name of your MCP server |
server_version | str | Version of your MCP server |
Export Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
exporter_endpoint | str | "https://api.app.shinzo.ai/telemetry/ingest_http" | OpenTelemetry collector endpoint URL |
exporter_type | "otlp-http" | "console" | "otlp-http" | Type of telemetry exporter |
exporter_auth | dict | None | Authentication configuration |
Data Collection
| Parameter | Type | Default | Description |
|---|---|---|---|
enable_tracing | bool | True | Enable trace collection |
enable_metrics | bool | True | Enable metrics collection |
enable_argument_collection | bool | True | Collect tool arguments in traces |
sampling_rate | float | 1.0 | Trace sampling rate (0.0 to 1.0) |
Privacy & Processing
| Parameter | Type | Default | Description |
|---|---|---|---|
enable_pii_sanitization | bool | False | Enable automatic PII sanitization |
pii_sanitizer | PIISanitizer | None | Custom PII sanitizer instance |
data_processors | list[Callable] | None | Custom data processing functions |
Performance
| Parameter | Type | Default | Description |
|---|---|---|---|
metric_export_interval_ms | int | 60000 | Metric export interval in milliseconds |
batch_timeout_ms | int | 30000 | Batch timeout in milliseconds |
Authentication Configuration
Bearer Token Authentication (required for the Shinzo Platform)
API Key Authentication
Basic Authentication
Exporter Types
OTLP HTTP Exporter (Default)
Console Exporter (Development)
Perfect for development and debugging:Privacy Configuration
Built-in PII Sanitization
The SDK can automatically detect and sanitize common PII patterns:Custom PII Sanitizer
Implement your own PII sanitization logic:Data Processing
Custom Data Processors
Add custom logic to process telemetry data before export:Sampling Configuration
Fixed Sampling Rate
Environment-based Sampling
Performance Tuning
Batch Configuration
Memory Optimization
For high-throughput servers:Environment-Specific Configuration
Development Configuration
Production Configuration
Configuration Validation
The SDK validates configuration at startup and will raiseValueError for common issues:
- Missing required parameters (
server_name,server_version) - Invalid sampling rates (must be between 0.0 and 1.0)
- Incomplete authentication configuration
- Invalid exporter types

