Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ tmp
# User context files for AI assistant tools
.context/*
!.context/README.md
.task.md

# External repos
.ext/*
Expand Down
87 changes: 86 additions & 1 deletion content/shared/influxdb3-cli/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,92 @@ Sets the endpoint of an S3-compatible, HTTP/2-enabled object store cache.

#### log-filter

Sets the filter directive for logs.
Sets the filter directive for logs. Use this option to control the verbosity of
server logs globally or for specific components.

##### Log levels

The following log levels are available (from least to most verbose):

| Level | Description |
| :------ | :---------------------------------------------------------------------------------------------------- |
| `error` | Only errors |
| `warn` | Warnings and errors |
| `info` | Informational messages, warnings, and errors _(default)_ |
| `debug` | Debug information for troubleshooting, plus all above levels |
| `trace` | Very detailed tracing information, plus all above levels (produces high log volume) |

##### Basic usage

To set the log level globally, pass one of the log levels:

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter debug
```

##### Targeted filtering

Globally enabling `debug` or `trace` produces a high volume of log output.
For more targeted debugging, you can set different log levels for specific
components using the format `<global_level>,<component>=<level>`.

###### Debug write buffer operations

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_write_buffer=debug
```

###### Trace WAL operations

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_wal=trace
```

###### Multiple targeted filters

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_write_buffer=debug,influxdb3_wal=debug
```

{{% show-in "enterprise" %}}

###### Debug Enterprise storage engine operations

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_pacha_tree=debug
```

{{% /show-in %}}

##### Common component names

The following are common component names you can use for targeted filtering:

| Component | Description |
| :------------------------------------ | :------------------------------------------------------- |
| `influxdb3_write_buffer` | Write buffer operations |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i missed this: I think its called write_buffer; I think it'll be influxdb3_write::write_buffer specifically.

| `influxdb3_wal` | Write-ahead log operations |
| `influxdb3_catalog` | Catalog and schema operations |
| `influxdb3_cache` | Caching operations |
{{% show-in "enterprise" %}}`influxdb3_pacha_tree` | Enterprise storage engine operations |
`influxdb3_enterprise` | Enterprise-specific features |
{{% /show-in %}}

> [!Note]
> Targeted filtering requires knowledge of the codebase component names.
> The component names correspond to Rust package names in the InfluxDB 3 source
> code. Use `debug` or `trace` sparingly on specific components to avoid
> excessive log output.

| influxdb3 serve option | Environment variable |
| :--------------------- | :------------------- |
Expand Down
27 changes: 26 additions & 1 deletion content/shared/influxdb3-write-guides/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Learn how to avoid unexpected results and recover from errors when writing to
- [Review HTTP status codes](#review-http-status-codes)
- [Troubleshoot failures](#troubleshoot-failures)
- [Troubleshoot rejected points](#troubleshoot-rejected-points)
{{% show-in "core,enterprise" %}}- [Troubleshoot write performance issues](#troubleshoot-write-performance-issues){{% /show-in %}}
{{% show-in "core,enterprise" %}}- [Troubleshoot write performance issues](#troubleshoot-write-performance-issues)
- [Use debug logs for troubleshooting](#use-debug-logs-for-troubleshooting){{% /show-in %}}

## Handle write responses

Expand Down Expand Up @@ -105,4 +106,28 @@ influxdb3 serve \
Replace {{% code-placeholder-key %}}`PERCENTAGE`{{% /code-placeholder-key %}} with the percentage
of available memory to allocate (for example, `35%` for write-heavy workloads).

### Use debug logs for troubleshooting

For deeper investigation of write issues, enable debug logging for specific
components. Debug logs provide detailed information about write buffer
operations and WAL activity.

To enable debug logs for write operations, restart {{% product-name %}} with
targeted log filters:

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_write_buffer=debug
```

<!--pytest.mark.skip-->

```sh
influxdb3 serve --log-filter info,influxdb3_wal=debug
```

For more information about log levels and targeted filtering, see
[log-filter configuration](/influxdb3/version/reference/config-options/#log-filter).

{{% /show-in %}}
Loading