{"record":{"id":"76b1f3ae7542ead1","repo":"BoundaryML/baml","slug":"log-event-omitted-call","errorCode":null,"errorMessage":"log event omitted call","messagePattern":"log event omitted call","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/bex_events/src/value/record.rs","lineNumber":328,"sourceCode":"            file_path: value.file_path.clone(),\n            file_id: value.file_id,\n            line: value.line,\n            column: value.column,\n            end_line: value.end_line,\n            end_column: value.end_column,\n            start_offset: value.start_offset,\n            end_offset: value.end_offset,\n        }\n    }\n}\n\nimpl TryFrom<crate::value::pb::LogEventV1> for LogEventRecord {\n    type Error = io::Error;\n\n    fn try_from(value: crate::value::pb::LogEventV1) -> Result<Self, Self::Error> {\n        let call = value\n            .call\n            .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, \"log event omitted call\"))?;\n        Ok(Self {\n            call: call.try_into()?,\n            level: value.level,\n            source: value.source.map(TryInto::try_into).transpose()?,\n            timestamp_ms: value.timestamp_ms,\n            message_preview: value.message_preview,\n        })\n    }\n}\n\nimpl From<&LogEventRecord> for crate::value::pb::LogEventV1 {\n    fn from(value: &LogEventRecord) -> Self {\n        Self {\n            call: Some(value.call.into()),\n            level: value.level.clone(),\n            source: value.source.as_ref().map(Into::into),\n            timestamp_ms: value.timestamp_ms,\n            message_preview: value.message_preview.clone(),","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/bex_events/src/value/record.rs#L310-L346","documentation":"LogEventV1 carries its associated TraceCallKey in an optional 'call' field; when it is unset (proto3 optional absent / None), the TryFrom conversion to LogEventRecord cannot build a record and returns InvalidData with this message. Every log event must be attributable to a trace call.","triggerScenarios":"Decoding a LogEventV1 message written without setting the call field — e.g. an old writer version, a producer bug in fire-and-forget logging paths, or a manually constructed proto in tests.","commonSituations":"Telemetry emitted before a call was registered (race in producer), schema migration where 'call' was newly added, tools that rebuild protos and drop oneof/optional fields.","solutions":["Fix the producer to always set call (a valid TraceCallKeyV1) before emitting LogEventV1","At ingest, either drop events lacking a call or attach them to a synthetic 'unknown' call key","Check writer version skew and migrate old streams that predate the required call field","When building protos manually, remember call is an optional field and must be explicitly set"],"exampleFix":"// before\nlet ev = pb::LogEventV1 { level, message_preview: ..., ..Default::default() };\n// after\nlet ev = pb::LogEventV1 { call: Some(pb::TraceCallKeyV1{..}), level, message_preview: ..., ..Default::default() };","handlingStrategy":"validation","validationCode":"fn log_event_complete(ev: &pb::LogEventV1) -> bool { ev.call.is_some() }","typeGuard":"fn has_call(ev: &pb::LogEventV1) -> bool { matches!(&ev.call, Some(k) if k.process_id.len() == 16) }","tryCatchPattern":"LogEventRecord::try_from(ev).or_else(|e| if e.to_string().contains(\"omitted call\") { attach_unknown_call(ev) } else { Err(e) })","preventionTips":["Construct LogEventV1 only after the trace call key is available","Make 'call' a required-by-contract field with a producer-side assert","Drop or quarantine call-less events at ingest"],"tags":["rust","protobuf","deserialization","missing-field"],"backgroundTag":"missing-required-argument","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}