You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tracing): log disabled-state warning once at init plus 4 edge-case tests
Two related changes addressing review feedback:
1. Restore observability for disabled processors. When the rewrite
moved the per-event 'SGP is disabled, skipping span upsert' warning
out of on_span_start it left the disabled state silent. The original
per-event log was spammy (one entry per span event at agent
throughput) and inconsistent (only on_span_start had it, on_span_end
did not). Replace it with a single warning at __init__ time.
2. Edge-case tests in TestSGPAsyncTracingProcessorEdgeCases:
- test_disabled_processor_never_enqueues_or_calls_upsert: confirms
a disabled processor builds no client, no queue, no worker, and
shutdown is a no-op.
- test_shutdown_is_safe_when_called_multiple_times: idempotency
regression. Second shutdown after the worker has already exited
does not re-flush or raise.
- test_shutdown_before_any_event_is_noop: shutdown invoked before
any span event must early-return without spinning up a worker.
- test_apierror_triggers_retry_then_drops_batch_on_exhaustion:
APIError is retried up to DEFAULT_RETRIES, batch is dropped after
exhaustion. asyncio.sleep is patched to keep the test fast.
0 commit comments