feat(opentelemetry): add structured metadata support and update log transformation logic
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
6bbc81a940
commit
222f5ee0fb
@ -347,6 +347,17 @@ loki:
|
||||
split_queries_by_interval: 15m
|
||||
query_timeout: 300s
|
||||
volume_enabled: true
|
||||
allow_structured_metadata: true
|
||||
otlp_config:
|
||||
resource_attributes:
|
||||
attributes_config:
|
||||
- action: index_label
|
||||
attributes:
|
||||
- app
|
||||
- env
|
||||
- k8s.pod.name
|
||||
- k8s.namespace.name
|
||||
- k8s.node.name
|
||||
# -- Provides a reloadable runtime configuration file for some specific configuration
|
||||
runtimeConfig: {}
|
||||
# -- Check https://grafana.com/docs/loki/latest/configuration/#common_config for more info on how to provide a common configuration
|
||||
|
||||
@ -78,9 +78,7 @@ spec:
|
||||
log_statements:
|
||||
- context: log
|
||||
statements:
|
||||
- merge_maps(log.cache, ParseJSON(log.body), "upsert")
|
||||
- set(log.cache["kubernetes"], resource.attributes["kubernetes"])
|
||||
- set(log.body, log.cache)
|
||||
- set(log.body["kubernetes"], log.attributes["kubernetes"])
|
||||
batch:
|
||||
send_batch_size: 5
|
||||
timeout: 10s
|
||||
|
||||
Loading…
Reference in New Issue
Block a user