core: trace executor skill discovery (#30318)

## Why

Make it easier to measure the performance of different parts of skill
loading.

## What

- Add spans for step-context capture, world-state construction, executor
catalog snapshot/root loading, and environment skill loading.
- Record the discovered environment skill count.
- Trace outbound exec-server requests with client kind and RPC method
fields.
- Update trace propagation tests to assert that requests keep the parent
trace id while creating their own child span.
This commit is contained in:
Adam Perry @ OpenAI authored and GitHub committed 2026-07-06 18:44:08 +00:00
1 parent 84fe70c30e
commit a86d525e4d
6 files changed
+46 -2

No files matched your search

@@ -143,6 +143,12 @@ pub struct EnvironmentSkillLoadOutcome {
}
/// Discovers skills without converting environment-owned paths to host paths.
#[tracing::instrument(
name = "skills.environment.load",
level = "info",
skip_all,
fields(skill_count = tracing::field::Empty)
)]
pub async fn load_environment_skills_from_root(
file_system: &dyn ExecutorFileSystem,
root: &PathUri,
@@ -235,6 +241,7 @@ pub async fn load_environment_skills_from_root(
warnings: vec![format!("failed to walk skills root {root}: {error:#}")],
},
};
tracing::Span::current().record("skill_count", discovery.skills.len());
outcome.warnings.extend(discovery.warnings);
if discovery.skills.is_empty() {
return outcome;