vectordotdev / vectordotdev/vector

Write documentation about how to use tracing filters

Open
#970 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: dev domain: internal docs domain: observability good first issue
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

Motivation

We should provide a good experience when users are trying to inspect why vector may have failed. Vector should provide methods in which developres/users can extract extensive debug information on specific components.

Proposal

Write extensive documentation on how users can use the LOG environment variable to dig deeper into the logs of vector to diagnose certains issues. These issues can range from high level topology issues to low level tokio task issues.

Using the LOG environment variable should follow the way directives are setup within tracing-subscriber. These filters follow roughly what https://docs.rs/env_logger/0.7.0/env_logger/ provides but with additional features to support spans. This additional support is important to allow us to dig deeper into specific components. Possible questions that can be answered are: why are all my sinks failing? why did my http sink fail to gzip my body? why didn't my source task wake up the inner task? All of these questions can be answered by providing the correct filter.

Example

This will only provide trace logs for events created within the vector crate and at the trace level.

$ LOG=vector[sinks]=trace vector -c my_config.toml

This will provide debug logs for just the "http" typed sinks.

$ LOG=vector[sinks{type="http"}]=debug vector -c my_config.toml

This will provide debug logs for our HTTP client from the hyper crate for just the "http" typed sinks.

$ LOG=hyper[sinks{type="http"}]=debug vector -c my_config.toml

Blockers

Only one issue is blocking supporting all of these features: https://github.com/tokio-rs/tracing/issues/367.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the LOG examples in the issue and the directive behavior provided by tracing-subscriber, then check the linked tokio-rs/tracing issue for the stated blocker. Done means users can follow documentation covering component- and span-specific filters, including the shown Vector, HTTP sink, and hyper examples, and understand which diagnostics each filter enables.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, observability
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.