vectordotdev/vector · error

message is required (make sure the "message" semantic meanin

Error message

message is required (make sure the "message" semantic meaning is set)

What it means

The Datadog Events sink maps missing required fields onto semantic meanings: when an event lacks a 'text' field it renames the log's message field, located via log.message_path(). That method returns the 'message' semantic meaning path (Vector log namespace) or the global log_schema.message_key (legacy namespace); if neither exists the Option is None and this expect panics inside the sink's event path.

Source

Thrown at src/sinks/datadog/events/sink.rs:57

            })
            .into_driver(self.service)
            .run()
            .await
    }
}

async fn ensure_required_fields(event: Event) -> Option<Event> {
    let mut log = event.into_log();

    if !log.contains(event_path!("title")) {
        emit!(ParserMissingFieldError::<DROP_EVENT> { field: "title" });
        return None;
    }

    if !log.contains(event_path!("text")) {
        let message_path = log
            .message_path()
            .expect("message is required (make sure the \"message\" semantic meaning is set)")
            .clone();
        log.rename_key(&message_path, event_path!("text"));
    }

    if !log.contains(event_path!("host"))
        && let Some(host_path) = log.host_path().cloned().as_ref()
    {
        log.rename_key(host_path, event_path!("host"));
    }

    if !log.contains(event_path!("date_happened"))
        && let Some(timestamp_path) = log.timestamp_path().cloned().as_ref()
    {
        log.rename_key(timestamp_path, event_path!("date_happened"));
    }

    if !log.contains(event_path!("source_type_name"))
        && let Some(source_type_path) = log.source_type_path().cloned().as_ref()

View on GitHub (pinned to 3708c39b12)

Solutions

  1. Add a remap transform before the sink that guarantees .text exists (e.g. .text = string(.message) ?? "")
  2. Remove log_schema.message_key overrides so the global message key resolves
  3. Ensure sources emitting Vector-namespace events assign the 'message' meaning or set the field explicitly
  4. File an issue: this path should drop the event or emit ParserMissingFieldError instead of panicking

Example fix

# before
[transforms.pre]
type = "remap"
# no .text handling; events without text hit the panic

# after
[transforms.pre]
type = "remap"
source = '.text = string(.message) ?? ""'
Defensive patterns

Strategy: validation

Validate before calling

# VRL guard before the datadog_events sink
if !exists(.text) {
  if exists(.message) {
    .text = string(.message)
  } else {
    abort
  }
}

Prevention

When it happens

Trigger: An event reaches the datadog_events sink with no 'text' field and no resolvable message path: a Vector-namespace event whose source never set the message meaning, log_schema.message_key explicitly nulled in global config (legacy namespace), or programmatically constructed events in tests.

Common situations: Setting log_schema.message_key to null/empty globally; custom sources or exec inputs that skip semantic-meaning assignment; events shaped for other sinks routed into datadog_events.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of vectordotdev/vector@3708c39b12 (2026-08-20). Data as JSON: /api/errors/9bbc8adf94a6a69a. Report an issue: GitHub.