Basic Initialization
initialize_tracer.py
Advanced: Adding Detections to Traces
For more advanced use cases, you can enable detections on your traces to automatically analyze spans for issues like hallucinations or document relevancy:advanced_tracer.py
detections
parameter accepts an array of detection types that will be automatically run on trace data when available.
Parameters
app_name
(string): Human-friendly name displayed in the Quotient UI.environment
(string): Deployment environment (dev
,staging
,prod
, etc.).detections
(array): Optional list of detections to run on traces. Currently supportsHALLUCINATION
andDOCUMENT_RELEVANCY
.instruments
(array): Instrumentors that automatically attach to supported frameworks. See framework integrations.tags
(object, optional): Default metadata attached to every trace.
Tips
- Initialize the tracer once at application startup—subsequent calls reuse the same configuration.
- Combine tracer initialization with logger initialization so logs and traces share names and environments.
- Pass instrumentors during initialization to automatically capture spans from supported frameworks.
Next: Record Traces