{"record":{"id":"9bbc8adf94a6a69a","repo":"vectordotdev/vector","slug":"message-is-required-make-sure-the-message-seman","errorCode":null,"errorMessage":"message is required (make sure the \"message\" semantic meaning is set)","messagePattern":"message is required \\(make sure the \"message\" semantic meaning is set\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/sinks/datadog/events/sink.rs","lineNumber":57,"sourceCode":"            })\n            .into_driver(self.service)\n            .run()\n            .await\n    }\n}\n\nasync fn ensure_required_fields(event: Event) -> Option<Event> {\n    let mut log = event.into_log();\n\n    if !log.contains(event_path!(\"title\")) {\n        emit!(ParserMissingFieldError::<DROP_EVENT> { field: \"title\" });\n        return None;\n    }\n\n    if !log.contains(event_path!(\"text\")) {\n        let message_path = log\n            .message_path()\n            .expect(\"message is required (make sure the \\\"message\\\" semantic meaning is set)\")\n            .clone();\n        log.rename_key(&message_path, event_path!(\"text\"));\n    }\n\n    if !log.contains(event_path!(\"host\"))\n        && let Some(host_path) = log.host_path().cloned().as_ref()\n    {\n        log.rename_key(host_path, event_path!(\"host\"));\n    }\n\n    if !log.contains(event_path!(\"date_happened\"))\n        && let Some(timestamp_path) = log.timestamp_path().cloned().as_ref()\n    {\n        log.rename_key(timestamp_path, event_path!(\"date_happened\"));\n    }\n\n    if !log.contains(event_path!(\"source_type_name\"))\n        && let Some(source_type_path) = log.source_type_path().cloned().as_ref()","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/sinks/datadog/events/sink.rs#L39-L75","documentation":"The Datadog events sink renames the log's message field to the Datadog 'text' event path. It relies on the global log schema's semantic meaning for 'message' being set; if the log has no event_path!\\\"text\\\" field and message_path() returns None, the expect panics.","triggerScenarios":"A log event reaching the Datadog events sink that lacks a 'text' field AND whose log schema has no field carrying the 'message' semantic meaning.","commonSituations":"Custom log_schema.message_key configuration that removes or renames the message field; transforms that strip the message field before the sink; events constructed programmatically without semantic-meaning metadata.","solutions":["Restore/keep the default log_schema.message_key ('message') in configuration","Ensure upstream transforms do not remove the message field","Set an explicit message_key in the datadog_events sink/log_schema config","Enable semantic-meaning setting on custom events before sending"],"exampleFix":"// vector config\n// before\nlog_schema:\n  message_key: my_msg\n// after\nlog_schema:\n  message_key: message","handlingStrategy":"validation","validationCode":"// ensure the log has a message semantic path before the sink\nif !log.contains(event_path!(\"text\")) && log.message_path().is_none() {\n    return Err(\"log event has no message semantic meaning set\");\n}","typeGuard":"fn has_message(log: &LogEvent) -> bool { log.contains(event_path!(\"text\")) || log.message_path().is_some() }","tryCatchPattern":"let message_path = log.message_path().ok_or_else(|| anyhow!(\"message semantic meaning not set\"))?;","preventionTips":["Keep log_schema.message_key at its default unless intentional","Avoid transforms that drop the message field before Datadog sinks","Set semantic meanings on programmatically built events","Add a transform assertion that message exists before the sink"],"tags":["rust","datadog","logs","schema"],"backgroundTag":"missing-required-argument","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}