{"record":{"id":"cb394d7ec5a20c13","repo":"openai/codex","slug":"configured-span-attribute-key-must-not-be-empty","errorCode":null,"errorMessage":"configured span attribute key must not be empty","messagePattern":"configured span attribute key must not be empty","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/otel/src/config.rs","lineNumber":41,"sourceCode":"\n            OtelExporter::OtlpHttp {\n                endpoint: STATSIG_OTLP_HTTP_ENDPOINT.to_string(),\n                headers: HashMap::from([(\n                    STATSIG_API_KEY_HEADER.to_string(),\n                    STATSIG_API_KEY.to_string(),\n                )]),\n                protocol: OtelHttpProtocol::Json,\n                tls: None,\n            }\n        }\n        _ => exporter.clone(),\n    }\n}\n\n/// Validates configured span attributes before they are attached to exported spans.\npub fn validate_span_attributes(attributes: &BTreeMap<String, String>) -> std::io::Result<()> {\n    if attributes.keys().any(String::is_empty) {\n        return Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            \"configured span attribute key must not be empty\",\n        ));\n    }\n\n    Ok(())\n}\n\n#[derive(Clone, Debug)]\npub struct OtelSettings {\n    pub environment: String,\n    pub service_name: String,\n    pub service_version: String,\n    pub codex_home: PathBuf,\n    pub exporter: OtelExporter,\n    pub trace_exporter: OtelExporter,\n    pub metrics_exporter: OtelExporter,\n    pub runtime_metrics: bool,","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/otel/src/config.rs#L23-L59","documentation":"Error \"configured span attribute key must not be empty\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/otel/src/config.rs:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}