quickwit-oss / quickwit-oss/quickwit

Enable increasing tracing level without increasing the log level

Open
#5,959 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
11.7k
Forks
597
Avg merge
2d 22h
Merged PRs (30d)
37

Description

Currently, to enable debug level tracing, one sets the environment variable RUST_LOG to debug. This aloso increases the log level to be debug which often is not desired. The request is to add a new, appropriately named environment variable, such as RUST_TRACE, which can be used to independently change the tracing level.

From scanning the code I believe this is why, (1) is where tracing is configured. It uses this function (2) which uses RUST_LOG, if it could just read from RUST_TRACE instead that would give us what we want. However, (2) is also used at (3) for logging, so it could be changed to have the log level passed in and read from different env var for log vs trace:

  1. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L334
  2. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L46
  3. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L73

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 in quickwit/quickwit-cli/src/logger.rs at the tracing setup around line 334 and the shared configuration function around lines 46 and 73. Trace how RUST_LOG currently controls both tracing and logging, then define the separate environment-variable behavior requested. Done means tracing can be increased without also increasing the log level.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.