Skip to content

Commit

Permalink
fix: missing loki labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Dec 24, 2023
1 parent 83ebb2c commit 6541ddc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chart/collectors/container-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ processors:
- key: otel.source
action: insert
value: container-logs
- action: insert
key: loki.attribute.labels
value: otel.source
resource:
attributes:
- key: container.id
Expand All @@ -149,6 +152,13 @@ processors:
- key: k8s.cluster
action: insert
value: ${env:K8S_CLUSTER}
- action: insert
key: loki.resource.labels
value: >-
module, landscape, platform, service, cluster
k8s.cluster, k8s.landscape, k8s.namespace.name, k8s.node.name,
k8s.deployment.name, k8s.statefulset.name, k8s.daemonset.name,
k8s.cronjob.name
filter:
logs:
log_record:
Expand Down
7 changes: 7 additions & 0 deletions chart/collectors/k8s-events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ processors:
- key: otel.source
action: insert
value: k8s-events
- action: insert
key: loki.attribute.labels
value: otel.source, k8s.namespace.name
resource:
attributes:
- key: k8s.landscape
Expand All @@ -32,6 +35,10 @@ processors:
- key: k8s.cluster
action: insert
value: ${env:K8S_CLUSTER}
- action: insert
key: loki.resource.labels
value: >-
k8s.cluster
service:
extensions: [ health_check, pprof, zpages, basicauth/loki ]
Expand Down
10 changes: 10 additions & 0 deletions chart/collectors/otlp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,21 @@ processors:
- key: otel.source
action: insert
value: otlp
- action: insert
key: loki.attribute.labels
value: otel.source

resource:
attributes:
- key: container.id
action: delete
- action: insert
key: loki.resource.labels
value: >-
module, landscape, platform, service, cluster
k8s.namespace.name, k8s.node.name,
k8s.deployment.name, k8s.statefulset.name, k8s.daemonset.name,
k8s.cronjob.name
exporters:
otlphttp/openobserve:
Expand Down

0 comments on commit 6541ddc

Please sign in to comment.