Ingesting logs using Vector

Vectoropen in new window collects, transforms, and sends your logs to multiple destinations including Uptrace. It is blazingly fast and memory efficient.

To configure Vector to send logs to Uptrace, use the HTTP sink and pass your project DSN via HTTP headers. For example, to collect syslog messages, you can create the following Vector config:

[sources.in]
type = "file"
include = ["/var/log/syslog"]

[sinks.out]
type = "http"
inputs = ["in"]
encoding.codec = "json"
framing.method = "newline_delimited"
compression = "gzip"
uri = "http://localhost:14318/api/v1/vector/logs"
#uri = "https://api.uptrace.dev/api/v1/vector/logs"
headers.uptrace-dsn = "http://project2_secret_token@localhost:14317/2"

Copy the config above to vector.toml and then start Vector:

vector --config=vector.toml

See vector-logsopen in new window example for details.

Last Updated: