LumiqTrace adds zero latency in production because events are batched asynchronously. In test environments, you want to ensure the SDK does not make network calls, slow down test suites, or leak API keys.Documentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
Disable tracing in tests
SetsampleRate to 0 to drop all events before they reach the queue. No network calls are made.
lumiqtrace.init() entirely in tests — the SDK is a no-op if not initialized. Calls to wrapOpenAI() and other wrappers return the original client unchanged.
Disable via environment variable
IfLUMIQTRACE_API_KEY is not set, the SDK does not initialize. In CI, simply omit the variable:
Mock the SDK in unit tests
For unit tests that assert on span creation, mock the SDK module:Use a test API key
If you want the SDK initialized in integration tests but do not want real traces sent to LumiqTrace, set a dummy API key and point to a local mock server:Flush in tests
If your test runner exits before the SDK flushes its event queue, traces may be silently dropped. Calllumiqtrace.flush() at the end of each test:
CI environment configuration
In CI (GitHub Actions, CircleCI, etc.), setenvironment to "ci" and sampleRate to 0:
LUMIQTRACE_SAMPLE_RATE as a number between 0.0 and 1.0. Set it to 0 to drop all events in CI without changing application code.
Next steps
- Environments — separate production, staging, and development traces
- SDK configuration — full init options reference