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.

    • View examples
  • commonrequiredtimestamp

    timestamp

    The exact time the log or trace was generated.

    • View examples
  • 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.

        • Enum, must be one of: "event" "span"
        • View examples
      • enumcommonrequiredstring

        level

        The level of verbosity of the described span or event.

        • Enum, must be one of: "TRACE" "DEBUG" "INFO" "WARN" "ERROR"
        • View examples
      • commonrequiredstring

        module_path

        The path to the internal module where the span occurred

        • View examples
      • commonrequiredstring

        target

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

        • View examples

    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

      processed_events_total

      The total number of events processed 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.

      • file - The file that produced the error

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

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

    • counter

      processed_bytes_total

      The total number of bytes processed by the 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.