Files
codex/codex-rs/analytics
ding-oai b059ce11f9 Allow hosts to route selected analytics events (#62684)
## Why

The analytics client sends eligible events through HTTP. Hosts that
embed Codex need a way to deliver specific event types themselves while
keeping HTTP delivery for the rest of the batch.

## What changed

Add `AnalyticsEventsClient::new_with_event_transport` so hosts can opt
in and select eligible events by wire type. The transport receives the
complete wire payload and the event's product SKU, when available.
Events stay on the HTTP path unless the transport returns `Handled`,
which suppresses a duplicate HTTP send.

Disabled analytics and local file capture bypass the transport.
Rebinding the client to a new auth context restores HTTP delivery.

## Testing

Add tests for mixed batches that verify HTTP payloads and product
attribution, plus coverage for auth eligibility, local capture,
analytics opt-out, and auth rebinding.

GitOrigin-RevId: 27ba3fe54050754b5f844f00e7e761a4d7bcb8c0
2026-11-20 06:37:15 +00:00
..