mirror of
https://github.com/openai/codex.git
synced 2026-11-23 07:17:11 +00:00
Propagate caller metadata to rendezvous connections (#39073)
## What changed - Add `x-cluster-name` from `OPENAI_CLUSTER` and `x-openai-internal-caller` from `DD_SERVICE` to rendezvous WebSocket handshakes when the environment values are nonempty and valid HTTP header values. - Apply the rendezvous headers to both client and remote executor connections while preserving the existing W3C trace context headers. GitOrigin-RevId: fead0244ba24fa208990b92d2170a9ae76ff2ceb
This commit is contained in:
1 parent
682f57254f
commit
45cf6cbc19
3 files changed
+20
-7
No files matched your search
@@ -34,7 +34,7 @@ use crate::noise_relay::NoiseHarnessConnectionArgs;
|
||||
use crate::noise_relay::noise_harness_connection_from_websocket;
|
||||
use crate::noise_relay::noise_relay_websocket_config;
|
||||
use crate::relay::harness_connection_from_websocket;
|
||||
use crate::trace_context::current_trace_context_headers;
|
||||
use crate::trace_context::current_rendezvous_headers;
|
||||
|
||||
const ENVIRONMENT_CLIENT_NAME: &str = "codex-environment";
|
||||
|
||||
@@ -342,9 +342,7 @@ impl ExecServerClient {
|
||||
url: diagnostic_url.clone(),
|
||||
source,
|
||||
})?;
|
||||
request
|
||||
.headers_mut()
|
||||
.extend(current_trace_context_headers());
|
||||
request.headers_mut().extend(current_rendezvous_headers());
|
||||
let (stream, _) = timeout(
|
||||
connect_timeout,
|
||||
WebSocketConnector::new_with_tls_mode(
|
||||
|
||||
Reference in new issue
Block a user