Options
Example — production
Example — local/offline
For CI, local development without network to the TruLayer backend, or sandboxed tests:Sampling
sample_rate=0.1 means 10% of traces are sent. Sampling is applied per trace (not per span), so a sampled trace always contains all of its spans.
For deterministic sampling (same trace always in or out based on its ID), use the SDK’s default hash-based sampler. For random sampling, pass a callable: