Skip to content

Commit 3bcc562

Browse files
committed
docs: complete README config table with all fields
- Add OTEL username/password fields with env vars - Add missing console.errors_to_stderr - Add otel.headers and otel.attributes - Clarify OTEL_ENDPOINT is only read by InitFromEnv()
1 parent 88be9dd commit 3bcc562

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ The `Config` struct maps to YAML/JSON and Environment Variables.
262262
| `console.enabled` | - | `true` | Enable stdout/stderr output. |
263263
| `console.format` | - | `json` | `json` or `pretty`. |
264264
| `console.color` | - | `true` | Enable ANSI colors in `pretty` mode. |
265+
| `console.errors_to_stderr` | - | `true` | Send warn/error/fatal to stderr. |
265266
| **File** | | | |
266267
| `file.enabled` | - | `false` | Enable writing to a log file. |
267268
| `file.path` | - | `""` | Absolute path to the log file. |
@@ -271,12 +272,21 @@ The `Config` struct maps to YAML/JSON and Environment Variables.
271272
| `file.compress` | - | `true` | Gzip rotated files. |
272273
| **OTEL** | | | |
273274
| `otel.enabled` | - | `false` | Enable OpenTelemetry export. |
274-
| `otel.endpoint` | - | `""` | Collector address (e.g., `localhost:4317`). |
275+
| `otel.endpoint` | `OTEL_ENDPOINT`* | `""` | Collector address (e.g., `localhost:4317`). |
275276
| `otel.protocol` | - | `grpc` | `grpc` or `http`. |
276277
| `otel.insecure` | - | `false` | Disable TLS (use for local collectors). |
278+
| `otel.username` | `OTEL_USERNAME` | `""` | Basic Auth username (optional). |
279+
| `otel.password` | `OTEL_PASSWORD` | `""` | Basic Auth password (optional). |
280+
| `otel.headers` | - | `{}` | Custom headers (map, for Bearer tokens, etc.). |
277281
| `otel.timeout` | - | `10s` | Export timeout. |
278282
| `otel.batch_size` | - | `512` | Max logs per batch. |
279283
| `otel.export_interval`| - | `5s` | Flush interval. |
284+
| `otel.attributes` | - | `{}` | Extra resource attributes (map). |
285+
286+
> *`OTEL_ENDPOINT` is only read by `InitFromEnv()`, not automatically by the struct.
287+
288+
289+
280290

281291
## Architecture
282292

0 commit comments

Comments
 (0)