Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document trace verbosity flags (-v, -vv) #691

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions spiceaidocs/docs/cli/tracing.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,54 @@
---
title: 'Configuring Trace Levels'
sidebar_label: 'Trace Levels'
description: 'Documentation on how to configure Spice.ai OSS trace levels'
description: 'Configuring Spice.ai OSS trace output verbosity levels'
pagination_prev: null
---

Trace verbosity is controlled by the `SPICED_LOG` environment variable.
Output trace verbosity is controlled by the `SPICED_LOG` environment variable and verbosity flags (`-v`, `-vv`).

### Default Trace Levels
### Default

The default level is `INFO` for these components:
The default trace level is `INFO`, suitable for general information about the system.

```bash
SPICED_LOG="task_history=INFO,spiced=INFO,runtime=INFO,secrets=INFO,data_components=INFO,cache=INFO,extensions=INFO,spice_cloud=INFO"
SPICED_LOG="task_history=INFO,spiced=INFO,runtime=INFO,secrets=INFO,data_components=INFO,cache=INFO,extensions=INFO,spice_cloud=INFO,llms=INFO,reqwest_retry::middleware=off,WARN"
```

### Enabling Debug Mode

To enable debug mode, which provides detailed logs, use:
Use the `-v` CLI flag to enable detailed logs, useful for debugging.

```bash
SPICED_LOG="DEBUG" spice run
spice run -v
spiced -v
```

For the most verbose logging, set the trace level to `TRACE`:
This sets `SPICED_LOG` to `DEBUG` level:

```bash
SPICED_LOG="TRACE" spice run
SPICED_LOG="task_history=DEBUG,spiced=DEBUG,runtime=DEBUG,secrets=DEBUG,data_components=DEBUG,cache=DEBUG,extensions=DEBUG,spice_cloud=DEBUG,llms=DEBUG,DEBUG" spice run
```

### Enabling Trace Mode

Use the `-vv` CLI flag to enable the most detailed logs, typically for in-depth troubleshooting.

```bash
spice run -vv
spiced -vv
```

This sets `SPICED_LOG` to `TRACE` level:

```bash
SPICED_LOG="task_history=TRACE,spiced=TRACE,runtime=TRACE,secrets=TRACE,data_components=TRACE,cache=TRACE,extensions=TRACE,spice_cloud=TRACE,llms=TRACE,TRACE" spice run
```

### Granular Configuration

For specific components, adjust the trace levels as needed:
For specific component trace configuration, adjust the trace levels as needed:

```bash
SPICED_LOG="spiced=INFO,runtime=DEBUG,data_components=WARN,cache=WARN" spice run
```
```
Loading