mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
74dcce594d
## Why Exec-server JSON-RPC calls can cross local and remote transports, but trace context stopped at the RPC boundary. That made client and server work difficult to correlate when diagnosing latency or failures. ## What changed - Propagate the current W3C trace context on outbound JSON-RPC requests. - Parent inbound request spans from received trace context. - Record the received JSON-RPC method on server spans and keep each span open through response enqueue. - Add only the OTEL dependencies required by the exec-server crate. ## Stack Review and land this stack in order: 1. #27466 — trace exec-server JSON-RPC requests **(this PR)** 2. #27467 — record bounded connection, request, and process lifecycle metrics 3. #27470 — observe remote registration and Noise rendezvous lifecycle ## Validation - `just test -p codex-exec-server --lib` (153 passed) - `just bazel-lock-check` - `just fix -p codex-exec-server`
23 lines
728 B
Python
23 lines
728 B
Python
load("//:defs.bzl", "codex_rust_crate")
|
|
|
|
codex_rust_crate(
|
|
name = "exec-server",
|
|
crate_name = "codex_exec_server",
|
|
deps_extra = [
|
|
"@crates//:opentelemetry",
|
|
"@crates//:opentelemetry_sdk",
|
|
"@crates//:toml",
|
|
],
|
|
extra_binaries = [
|
|
"//codex-rs/bwrap:bwrap",
|
|
],
|
|
integration_compile_data_extra = [
|
|
"src/proto/codex.exec_server.relay.v1.rs",
|
|
],
|
|
# Keep the crate's integration tests single-threaded under Bazel because
|
|
# they install process-global test-binary dispatch state, and the remote
|
|
# exec-server cases already rely on serialization around the full CLI path.
|
|
integration_test_args = ["--test-threads=1"],
|
|
test_tags = ["no-sandbox"],
|
|
)
|