Seer is currently in private beta. Email ben@seersearch.com to request access and receive SDK installation instructions.
Installation
Quick Start
Configuration
Environment Variables
Constructor Options
SeerClient API
log()
Log a retrieval event.
fire_and_forget=True(default):None(event queued async)fire_and_forget=False:record_idstring from API
flush()
Wait for all queued events to be sent.
stats()
Get client statistics.
ClientStats object:
close()
Shutdown client gracefully (flushes remaining events).
Context Format
Passages can be simple strings or objects with metadata:Decorator
Use@seer_trace to automatically log function calls:
Decorator Parameters
Fire-and-Forget vs Synchronous
Fire-and-Forget (Default)
Events are queued and sent asynchronously.log() returns immediately.
atexit happens on normal exit. Call flush() explicitly before os._exit() or in process pools.
Synchronous
Events are sent immediately.log() blocks and returns record_id.
OpenTelemetry Integration
The SDK automatically captures OTEL trace context when available:Manual Trace IDs
Span Name Patterns
Span names are used for filtering in the UI:Ground Truth (Accuracy Testing)
Include expected results for accuracy measurement:Convenience Function
For simple cases, use the globalseer_log:
SeerClient on first call.
Error Handling
The SDK is designed to be non-blocking and fail gracefully:- Queue overflow: Events are dropped (logged to
seer.clientlogger) - Network errors: Retried with exponential backoff, then dropped
- Invalid API key: Warning logged, event sent (server rejects)
client.stats() for failure counts.
Examples
- Basic usage
- OpenTelemetry integration
- Replay rollouts