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
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[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
- View examples
- Syntax:
- 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.
- Syntax:
literal
- Enum, must be one of:
"event"
"span"
- View examples
- Syntax:
- enumcommonrequiredstring
level
The level of verbosity of the described span or event.
- Syntax:
literal
- Enum, must be one of:
"TRACE"
"DEBUG"
"INFO"
"WARN"
"ERROR"
- View examples
- Syntax:
- commonrequiredstring
module_path
The path to the internal module where the span occurred
- Syntax:
literal
- View examples
- Syntax:
- commonrequiredstring
target
Describes the part of the system where the span or event that this metadata describes occurred.
- Syntax:
literal
- View examples
- Syntax:
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 byvector is set by a combination of the `$LOG` environmentvariable and the `--quiet` and `--verbose` command-lineoptions. This internal logs source will only receivelogs that are generated by these options.
State
This component is stateless, meaning its behavior is consistent across each input.