| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Reverts the span_queue.py batch_size/linger_ms changes (and their tests) so this PR stays scoped to end-only ingest (sgp_tracing_processor.py). The batching throughput tuning ships separately in #397. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gh-volume ingest Coalesce more spans into each upsert_batch HTTP call to amortize the per-request round trip and the per-statement parse/plan + index-maintenance overhead that dominates at high span volume. batch_size is now env-tunable via AGENTEX_SPAN_QUEUE_BATCH_SIZE (default 200), and linger rises to 250ms so batches fill rather than shipping near-size-1. Split out of #394 (end-only ingest) so each change ships and is reviewed independently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reverts the span_queue.py batch_size/linger_ms changes (and their tests) so this PR stays scoped to end-only ingest (sgp_tracing_processor.py). The batching throughput tuning ships separately in #397. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
Splits the span batch-size / linger tuning out of #394 (which is now scoped to end-only ingest) so each change ships and reverts independently.
Changes in span_queue.py:
Tests: test_span_queue.py — batch_size resolution (explicit arg > env > default, min-clamp).
Why separate
#394 is the end-only ingest change (skip span-start upsert); this is independent batching throughput tuning. Splitting keeps each reviewable and revertable on its own.
🤖 Generated with Claude Code
Greptile Summary
This PR tunes the AsyncSpanQueue's default batch parameters and makes batch_size configurable at runtime via an environment variable. The implementation is straightforward and well-tested.
Confidence Score: 5/5
Safe to merge; the changes are bounded config tuning with no logic alterations to the drain loop or export path.
The batch size and linger defaults are raised within documented safe limits, the env-var resolution follows the exact same pattern already used for linger_ms, max_retries, concurrency, and max_size, and all resolution paths are covered by dedicated unit tests. No callers outside the test suite pass batch_size explicitly, so the signature change is non-breaking.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[AsyncSpanQueue.__init__] --> B{batch_size arg provided?} B -->|No - None| C[_read_int_env AGENTEX_SPAN_QUEUE_BATCH_SIZE default=200 min=1] C --> D{Env var set?} D -->|Yes valid int| E[max 1 int env] D -->|Yes invalid| F[log warning use 200] D -->|Not set| G[use 200] B -->|Yes explicit int| H[max 1 batch_size] E --> I[self._batch_size] F --> I G --> I H --> IReviews (2): Last reviewed commit: "perf(tracing): larger span batch (50→200..." | Re-trigger Greptile