Internal Logs Source

The Vector internal_logs source the internal logs source exposes all log and trace messages emitted by the running Vector instance.

Requirements

Configuration

[sources.my_source_id]
type = "internal_logs" # required

Output

This component outputs log events with the following fields:

{
"*" : null,
"message" : "Vector has started.",
"metadata" : {
"kind" : "event",
"level" : "TRACE",
"module_path" : "vector::internal_events::heartbeat",
"target" : "vector"
},
"timestamp" : "2020-10-10T17:07:36+00:00"
}
  • commonrequiredstring

    message

    The textual message for this log or trace.

    • Syntax: literal
  • commonrequiredtimestamp

    timestamp

    The exact time the log or trace was generated.

  • commonrequired*

    *

    Each field from the original message is copied into the event.

    • commonrequiredtable

      metadata

      Metadata from the source log or trace event.

      • enumcommonrequiredstring

        kind

        What kind of call site caused this log or trace.

        • Syntax: literal
        • Enum, must be one of: "event" "span"
      • enumcommonrequiredstring

        level

        The level of verbosity of the described span or event.

        • Syntax: literal
        • Enum, must be one of: "TRACE" "DEBUG" "INFO" "WARN" "ERROR"
      • commonrequiredstring

        module_path

        The path to the internal module where the span occurred

        • Syntax: literal
      • commonrequiredstring

        target

        Describes the part of the system where the span or event that this metadata describes occurred.

        • Syntax: literal

    Telemetry

    This component provides the following metrics that can be retrieved through the internal_metrics source. See the metrics section in the monitoring page for more info.

    • counter

      events_out_total

      The total number of events emitted by this component. This metric includes the following tags:

      • component_kind - The Vector component kind.

      • component_name - The Vector component ID.

      • component_type - The Vector component type.

      • instance - The Vector instance identified by host and port.

      • job - The name of the job producing Vector metrics.

    How It Works

    Context

    By default, the internal_logs source will augment events with helpful context keys as shown in the "Output" section.

    Logs are limited by startup options

    At startup, the selection of log messages generated by
    vector is set by a combination of the `$LOG` environment
    variable and the `--quiet` and `--verbose` command-line
    options. This internal logs source will only receive
    logs that are generated by these options.

    State

    This component is stateless, meaning its behavior is consistent across each input.