Files
wehub-resource-sync 5a558eb09e
Backend Tests / discover-tests (push) Waiting to run
Backend Tests / ${{ matrix.name }} (push) Blocked by required conditions
Build and Publish SDK / build-and-publish (push) Waiting to run
Build Opik Docker Images / set-version (push) Waiting to run
Build Opik Docker Images / build-backend (push) Blocked by required conditions
Build Opik Docker Images / build-sandbox-executor-python (push) Blocked by required conditions
Build Opik Docker Images / build-python-backend (push) Blocked by required conditions
Build Opik Docker Images / build-frontend (push) Blocked by required conditions
Build Opik Docker Images / create-git-tag (push) Blocked by required conditions
ClickHouse Migration Cluster Check / validate-clickhouse-migrations (push) Waiting to run
🐙 Code Quality / detect (push) Waiting to run
🐙 Code Quality / lint (${{ matrix.leg.name }}) (push) Blocked by required conditions
🐙 Code Quality / summary (push) Blocked by required conditions
Docs - Publish / run (push) Waiting to run
E2E Tests - Post Merge (v2) / 🧪 E2E v2 Tests (${{ github.event.inputs.tier || 't1' }}) (push) Waiting to run
E2E Tests - Post Merge (v2) / 📢 Slack Notification (push) Blocked by required conditions
Frontend Unit Tests / Test on Node 20 (push) Waiting to run
Guardrails E2E Tests / Select Python version matrix (push) Waiting to run
Guardrails E2E Tests / Guardrails E2E Tests ${{matrix.python_version}} (push) Blocked by required conditions
Guardrails E2E Tests / 📢 Slack Notification (push) Blocked by required conditions
Guardrails Backend Unit Tests / Guardrails Backend Unit Tests (push) Waiting to run
Guardrails Backend Unit Tests / 📢 Slack Notification (push) Blocked by required conditions
SDK Library Integration Tests Runner / Check Secrets (push) Waiting to run
SDK Library Integration Tests Runner / Missed OpenAI API Key Warning (push) Blocked by required conditions
SDK Library Integration Tests Runner / Build (push) Blocked by required conditions
SDK Library Integration Tests Runner / openai_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / langchain_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / langchain_legacy_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / llama_index_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / anthropic_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / mistral_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / groq_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / aisuite_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / haystack_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / dspy_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / crewai_v0_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / crewai_v1_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / genai_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / adk_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / adk_legacy_1_3_0_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / evaluation_metrics_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / bedrock_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / litellm_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / harbor_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / Slack Notification (push) Blocked by required conditions
Lint Opik Helm Chart / lint-helm-chart (Helm v3.21.0) (push) Waiting to run
Lint Opik Helm Chart / lint-helm-chart (Helm v4.2.0) (push) Waiting to run
Lint Opik Helm Chart / unittest-helm-chart (push) Waiting to run
Lint Opik Helm Chart / render-equality (push) Waiting to run
Opik Optimizer - E2E Tests / build-opik (push) Waiting to run
Opik Optimizer - E2E Tests / Opik Optimizer E2E Tests Python ${{matrix.python_version}} (push) Blocked by required conditions
Opik Optimizer - E2E Tests / Opik Optimizer Integration Smoke Tests (push) Blocked by required conditions
Opik Optimizer - Unit Tests / Opik Optimizer Unit Tests Python ${{matrix.python_version}} (push) Waiting to run
Python BE E2E Tests / Python BE E2E (push) Waiting to run
Python Backend Tests / run-python-backend-tests (push) Waiting to run
Python SDK Compatibility V1.x E2E Tests / Select Python version matrix (push) Waiting to run
Python SDK Compatibility V1.x E2E Tests / build-opik (push) Waiting to run
Python SDK Compatibility V1.x E2E Tests / Python SDK Compatibility V1.x E2E Tests ${{matrix.python_version}} (push) Blocked by required conditions
Python SDK E2E Tests / Select Python version matrix (push) Waiting to run
Python SDK E2E Tests / build-opik (push) Waiting to run
Python SDK E2E Tests / Python SDK E2E Tests ${{matrix.python_version}} (push) Blocked by required conditions
Python SDK Unit Tests / Python SDK Unit Tests ${{matrix.python_version}} (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
SDK E2E Libraries Integration Tests / Check Secrets (push) Waiting to run
SDK E2E Libraries Integration Tests / Missed OpenAI API Key Warning (push) Blocked by required conditions
SDK E2E Libraries Integration Tests / build-opik (push) Blocked by required conditions
SDK E2E Libraries Integration Tests / E2E Lib Integration Python ${{matrix.python_version}} (push) Blocked by required conditions
TypeScript SDK Compatibility V1.x E2E Tests / Select Node version matrix (push) Waiting to run
TypeScript SDK Compatibility V1.x E2E Tests / build-opik (push) Waiting to run
TypeScript SDK Compatibility V1.x E2E Tests / TypeScript SDK Compatibility V1.x E2E Tests Node ${{matrix.node_version}} (push) Blocked by required conditions
TypeScript SDK E2E Tests / Select Node version matrix (push) Waiting to run
TypeScript SDK E2E Tests / build-opik (push) Waiting to run
TypeScript SDK E2E Tests / TypeScript SDK E2E Tests Node ${{matrix.node_version}} (push) Blocked by required conditions
TypeScript SDK Integration Build & Publish / build-and-publish (opik-gemini) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-langchain) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-openai) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-otel) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-vercel) (push) Waiting to run
TypeScript SDK Library Integration Tests / Check Secrets (push) Waiting to run
TypeScript SDK Library Integration Tests / opik-vercel (Vercel AI SDK / eve) (push) Blocked by required conditions
TypeScript SDK Build & Publish / build-and-publish (push) Waiting to run
TypeScript SDK Unit Tests / Test on Node ${{ matrix.node-version }} (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:25:44 +08:00

5.5 KiB
Raw Permalink Blame History

Load tests

This folder contains two things:

  1. tests/ — standalone CLI scripts for ad-hoc, one-off performance probes.
  2. suite/<target>/ — pytest-driven load-test suites that run on a schedule in CI and can also be triggered manually. Each subdirectory targets a different system under test (currently just python_sdk/); future targets (TypeScript SDK, backend-only, etc.) would be peers.

Install Opik locally

Install Opik locally using the docker-compose deployment (docs).

The Python SDK reads its configuration from environment variables or ~/.opik.config. For a local docker-compose install:

export OPIK_URL_OVERRIDE=http://localhost:5173/api/

Python SDK load-test suite (suite/python_sdk/)

The suite covers four ingestion shapes against a local Opik installation. Defaults are sized for a scheduled (weekly) run — not for PR checks — so each scenario produces meaningful load. Use --load-scale to dial them down for local smoke runs.

File / scenario Default volume
test_ingestion_rate.py::test_many_traces_one_span_each 100k traces × 1 nested span, ~100 B payloads
test_ingestion_rate.py::test_many_spans_per_trace 5k traces × 50 spans = 250k spans, ~100 B payloads
test_heavy_payload.py::test_traces_with_one_megabyte_payload 500 traces × (1 MB in + 1 MB out) ≈ 1 GB
test_heavy_payload.py::test_spans_with_heavy_payload 200 traces × 5 spans × (500 KB in + 500 KB out) ≈ 1 GB
test_attachments.py::test_traces_with_explicit_attachments 500 traces × 2 × 50 KB attachments ≈ 50 MB, 1k uploads
test_attachments.py::test_traces_with_implicit_attachments 500 traces × 400 KB base64 blob extracted as attachment
test_bursts.py::test_burst_single_loop 50k traces, tight loop, no think-time
test_bursts.py::test_spread_over_time 10k traces evenly spread over 10 minutes
test_bursts.py::test_concurrent_writers_share_one_client 30 threads × 1k traces = 30k traces sharing one client
test_dataset_items.py::test_dataset_insert_many_versions 50 sequential Dataset.insert() calls × 50 items × ~4 KB payload = 2.5k items across 50 versions. Verifies dataset.get_items() round-trips the full count — catches the multi-replica ClickHouse COPY_VERSION_ITEMS short-read truncation that drops items on prod (won't reproduce against single-replica localhost)

Every test:

  1. Logs the requested traces/spans (with attachments where applicable).
  2. Calls opik.flush_tracker().
  3. Polls search_traces / search_spans / attachments.attachment_list until the expected number of items is visible, so the run only passes if every logged item lands.
  4. Records per-phase timings (logging, flush, verify, total) to tests_load/.last_run/<test_name>.json.

Setup

# Install the Opik SDK (from this repo, or `pip install opik` for released)
pip install -e sdks/python

# Install suite-specific deps
pip install -r tests_load/suite/python_sdk/requirements.txt

# Point the SDK at whichever Opik install you want to hit
export OPIK_URL_OVERRIDE=http://localhost:5173/api/   # full local stack
# export OPIK_URL_OVERRIDE=http://localhost:8080      # backend-only (./opik.sh --backend)
# export OPIK_URL_OVERRIDE=https://www.comet.com/opik/api/  OPIK_API_KEY=...  OPIK_WORKSPACE=...

The suite is environment-agnostic — it reads whatever OPIK_* variables are set in the shell. Configuring those is the caller's responsibility.

Run

cd tests_load
pytest suite/python_sdk                                 # serial
pytest suite/python_sdk -n auto --dist=worksteal        # parallel via pytest-xdist

The scheduled workflow runs with -n 2 --dist=worksteal-n auto (4 workers on ubuntu-latest) was reliably OOM-killing the highest- volume ingestion-rate scenarios when they coincided with other heavy tests against the same docker-compose Opik stack on the 7 GB runner. Each scenario uses a unique project name so worker isolation holds; the shared backend will see meaningful concurrent load, which is itself useful coverage.

Scale up / down

Every scenario accepts a scale multiplier. Use it for quick smoke runs or heavy bake-offs:

# Quick smoke (~10% of default volumes)
pytest suite/python_sdk --load-scale 0.1

# Heavy run (5x default)
OPIK_LOAD_SCALE=5 pytest suite/python_sdk

Scheduled CI run

The GitHub Actions workflow .github/workflows/load_tests.yml:

  • Runs weekly on Sunday at 04:00 UTC.
  • Can be triggered manually via workflow_dispatch.
  • Stands up a fresh dockerised Opik backend, installs the SDK, runs the suite, and uploads .last_run/ as a build artifact.

Standalone scripts (tests/)

These are kept for ad-hoc experiments; they are not picked up by pytest.

Their dependencies are pinned in requirements.txt.