Attribute external agent imports by provider (#34451)

## What changed

- Add an optional opaque `providerId` to `externalAgentConfig/import` for analytics attribution, independently of the `migrationSource` selector.
- Include the provider ID in completed-import and import-failure analytics events.
- Have TUI imports identify their selected migration source as the provider.

## Testing

- Cover provider attribution in app-server import completion and failure tests and analytics serialization tests.

GitOrigin-RevId: 0ee7313a43652e5305939c526bf6b903a79334ad
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-07-21 02:59:22 +00:00
1 parent 3bc49e1721
commit a30aee8d90
15 files changed
+71 -2

No files matched your search

+2
View File
@@ -1025,6 +1025,7 @@ pub(crate) struct CodexPluginInstallFailedEventRequest {
pub(crate) struct CodexOnboardingExternalAgentImportCompleteMetadata {
pub(crate) import_id: String,
pub(crate) source: String,
pub(crate) provider_id: String,
#[serde(rename = "type")]
pub(crate) item_type: String,
pub(crate) success_count: usize,
@@ -1042,6 +1043,7 @@ pub(crate) struct CodexOnboardingExternalAgentImportCompleteEventRequest {
pub(crate) struct CodexOnboardingExternalAgentImportFailureMetadata {
pub(crate) import_id: String,
pub(crate) source: String,
pub(crate) provider_id: String,
#[serde(rename = "type")]
pub(crate) item_type: String,
pub(crate) failure_stage: String,