Skip to content

Commit b8b9648

Browse files
docs: document the json pattern tokenizable field limits (#19964)
1 parent f1a0af6 commit b8b9648

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/sources/shared/configuration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4739,6 +4739,20 @@ otlp_config:
47394739
# List of LogQL vector and range aggregations that should be sharded.
47404740
[shard_aggregations: <list of strings>]
47414741

4742+
# Default list of JSON fields to tokenize for pattern detection. It is recommend
4743+
# to append to or delete from the defaults rather than replacing them.
4744+
# CLI flag: -limits.pattern-ingester-tokenizable-json-fields
4745+
[pattern_ingester_tokenizable_json_fields_default: <string> | default = "log,message,msg,msg_,_msg,content"]
4746+
4747+
# List of additional JSON fields to tokenize for pattern detection.
4748+
# CLI flag: -limits.pattern-ingester-tokenizable-json-fields-append
4749+
[pattern_ingester_tokenizable_json_fields_append: <string> | default = ""]
4750+
4751+
# List of JSON fields to excluded from the defaults to tokenize for pattern
4752+
# detection.
4753+
# CLI flag: -limits.pattern-ingester-tokenizable-json-fields-delete
4754+
[pattern_ingester_tokenizable_json_fields_delete: <string> | default = ""]
4755+
47424756
# Enable metric aggregation. When enabled, pushed streams will be sampled for
47434757
# bytes and line counts. These metrics will be written back into Loki as a
47444758
# special __aggregated_metric__ stream.

pkg/validation/limits.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ type Limits struct {
270270

271271
ShardAggregations []string `yaml:"shard_aggregations,omitempty" json:"shard_aggregations,omitempty" doc:"description=List of LogQL vector and range aggregations that should be sharded."`
272272

273-
PatternIngesterTokenizableJSONFieldsDefault dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_default" json:"pattern_ingester_tokenizable_json_fields_default" doc:"hidden"`
274-
PatternIngesterTokenizableJSONFieldsAppend dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_append" json:"pattern_ingester_tokenizable_json_fields_append" doc:"hidden"`
275-
PatternIngesterTokenizableJSONFieldsDelete dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_delete" json:"pattern_ingester_tokenizable_json_fields_delete" doc:"hidden"`
273+
PatternIngesterTokenizableJSONFieldsDefault dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_default" json:"pattern_ingester_tokenizable_json_fields_default" doc:"description=Default list of JSON fields to tokenize for pattern detection. It is recommend to append to or delete from the defaults rather than replacing them."`
274+
PatternIngesterTokenizableJSONFieldsAppend dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_append" json:"pattern_ingester_tokenizable_json_fields_append" doc:"description=List of additional JSON fields to tokenize for pattern detection."`
275+
PatternIngesterTokenizableJSONFieldsDelete dskit_flagext.StringSliceCSV `yaml:"pattern_ingester_tokenizable_json_fields_delete" json:"pattern_ingester_tokenizable_json_fields_delete" doc:"description=List of JSON fields to excluded from the defaults to tokenize for pattern detection."`
276276
MetricAggregationEnabled bool `yaml:"metric_aggregation_enabled" json:"metric_aggregation_enabled"`
277277
PatternPersistenceEnabled bool `yaml:"pattern_persistence_enabled" json:"pattern_persistence_enabled"`
278278
PatternPersistenceGranularity model.Duration `yaml:"pattern_persistence_granularity" json:"pattern_persistence_granularity"`

0 commit comments

Comments
 (0)