Measure plugin recommendation latency during initial context setup (#62326)

Record how long initial context assembly waits for prompt-only plugin
recommendations in `codex.initial_context.plugin_recommendations_wait_ms`.
Use named info-level spans for loading recommendations, reading the
tooling change marker, and fetching the recommendation catalog.

GitOrigin-RevId: 67b26f79252f8cba6e770f43df252ec1d73a569f
This commit is contained in:
bkotsopoulos
2026-11-18 17:57:12 +00:00
committed by copyberry
parent c1ed51ca2c
commit 0ba514837d
3 changed files with 19 additions and 4 deletions
+10 -2
View File
@@ -1160,7 +1160,11 @@ pub fn invalidate_cached_remote_plugin_catalog_scopes(
}
}
#[instrument(level = "trace", skip_all)]
#[instrument(
name = "plugins.recommendations.read_tooling_marker",
level = "info",
skip_all
)]
pub(crate) async fn fetch_tooling_changed_at(
config: &RemotePluginServiceConfig,
auth: Option<&CodexAuth>,
@@ -1181,7 +1185,11 @@ pub(crate) async fn fetch_tooling_changed_at(
})
}
#[instrument(level = "trace", skip_all)]
#[instrument(
name = "plugins.recommendations.fetch_catalog",
level = "info",
skip_all
)]
pub async fn fetch_recommended_plugins(
config: &RemotePluginServiceConfig,
auth: Option<&CodexAuth>,