Skip to content

Commit 5072d8b

Browse files
prontclaude
andauthored
docs(schemas): improve log_namespace docs and warn on log_schema (#25560)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 29b089d commit 5072d8b

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

lib/vector-core/src/config/global_options.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ pub struct GlobalOptions {
8484
/// This is used if a component does not have its own specific log schema. All events use a log
8585
/// schema, whether or not the default is used, to assign event fields on incoming events.
8686
#[serde(default, skip_serializing_if = "crate::serde::is_default")]
87-
#[configurable(metadata(docs::common = false, docs::required = false))]
87+
#[configurable(metadata(
88+
docs::common = false,
89+
docs::required = false,
90+
docs::warnings = "These settings are ignored when `schema.log_namespace` is set to `true`."
91+
))]
8892
pub log_schema: LogSchema,
8993

9094
/// Telemetry options.

src/config/schema.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pub struct Options {
3030

3131
/// Controls how metadata is stored in log events.
3232
///
33+
/// This feature is in beta and behavior may change.
34+
///
3335
/// When set to `false` (legacy mode), metadata fields like `host`, `timestamp`, and `source_type`
3436
/// are stored as top-level fields alongside your log data.
3537
///
@@ -39,6 +41,7 @@ pub struct Options {
3941
/// See the [Log Namespacing guide](/guides/level-up/log_namespace/) for detailed information
4042
/// about when to use Vector namespace mode and how to migrate from legacy mode.
4143
#[configurable(metadata(
44+
status = "beta",
4245
docs::warnings = "Enabling log namespacing currently does not work when disk buffers are used. Avoid combining `schema.log_namespace = true` with disk buffers until [#18574](https://github.com/vectordotdev/vector/issues/18574) is resolved."
4346
))]
4447
pub log_namespace: Option<bool>,

website/content/en/guides/level-up/log_namespace.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ If you encounter any issues please [report them here](https://github.com/vectord
2323

2424
{{< /requirement >}}
2525

26+
{{< warning >}}
27+
Enabling log namespacing does not work when disk buffers are used. Avoid combining
28+
`schema.log_namespace: true` with disk buffers until
29+
[#18574](https://github.com/vectordotdev/vector/issues/18574) is resolved.
30+
{{< /warning >}}
31+
2632
## Background
2733

2834
Vector traditionally stored metadata (like `host`, `timestamp`, and `source_type`) as top-level

website/cue/reference/generated/configuration.cue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ generated: configuration: {
433433
description: """
434434
Controls how metadata is stored in log events.
435435
436+
This feature is in beta and behavior may change.
437+
436438
When set to `false` (legacy mode), metadata fields like `host`, `timestamp`, and `source_type`
437439
are stored as top-level fields alongside your log data.
438440
@@ -1498,7 +1500,8 @@ generated: configuration: {
14981500
"""
14991501
common: false
15001502
required: false
1501-
group: "schema"
1503+
warnings: ["These settings are ignored when `schema.log_namespace` is set to `true`."]
1504+
group: "schema"
15021505
}
15031506
metrics_storage_refresh_period: {
15041507
type: float: {}

0 commit comments

Comments
 (0)