mirror of
https://github.com/openai/codex.git
synced 2026-11-20 23:08:21 +00:00
codex-otel: add configurable trace metadata (#21556)
Add Codex config for static trace span attributes and structured W3C tracestate field upserts. The config flows through OtelSettings so callers can attach trace metadata without touching every span call site. Apply span attributes with an SDK span processor so every exported trace span carries the configured metadata. Model tracestate as nested member fields so configured keys can be upserted while unrelated propagated state in the same member is preserved. Validate configured tracestate before installing provider-global state, including header-unsafe values the SDK does not reject by itself. This keeps Codex from propagating malformed trace context from config. Update the config schema, public docs, and OTLP loopback coverage for config parsing, span export, propagation, and invalid-header rejection.
This commit is contained in:
1 parent
0d0835dd53
commit
31b233c7c6
16 files changed
+707
-47
No files matched your search
@@ -60,6 +60,7 @@ const PROJECT_LOCAL_CONFIG_DENYLIST: &[&str] = &[
|
||||
"profile",
|
||||
"profiles",
|
||||
"experimental_realtime_ws_base_url",
|
||||
"otel",
|
||||
];
|
||||
|
||||
async fn first_layer_config_error_from_entries(layers: &[ConfigLayerEntry]) -> Option<ConfigError> {
|
||||
|
||||
Reference in new issue
Block a user