17
17
- apiGroups : [""]
18
18
resources : ["pods", "namespaces", "nodes"]
19
19
verbs : ["get", "watch", "list"]
20
+ - apiGroups : ["apps"]
21
+ resources : ["replicasets"]
22
+ verbs : ["get", "list", "watch"]
20
23
21
24
---
22
25
apiVersion : rbac.authorization.k8s.io/v1
@@ -39,7 +42,7 @@ metadata:
39
42
name : otel
40
43
namespace : openshift-logging
41
44
spec :
42
- image : ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.107.0
45
+ image : ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.116.1
43
46
serviceAccount : otel-collector-deployment
44
47
config :
45
48
extensions :
@@ -51,66 +54,44 @@ spec:
51
54
grpc : {}
52
55
http : {}
53
56
processors :
54
- k8sattributes :
55
- auth_type : " serviceAccount"
56
- passthrough : false
57
- extract :
58
- metadata :
59
- - k8s.pod.name
60
- - k8s.container.name
61
- - k8s.namespace.name
62
- labels :
63
- - tag_name : app.label.component
64
- key : app.kubernetes.io/component
65
- from : pod
66
- pod_association :
67
- - sources :
68
- - from : resource_attribute
69
- name : k8s.pod.name
70
- - from : resource_attribute
71
- name : k8s.container.name
72
- - from : resource_attribute
73
- name : k8s.namespace.name
74
- - sources :
75
- - from : connection
57
+ k8sattributes : {}
76
58
resource :
77
59
attributes :
78
- - key : loki.format
79
- action : insert
80
- value : json
81
- - key : kubernetes_namespace_name
60
+ - key : kubernetes.namespace_name
82
61
from_attribute : k8s.namespace.name
83
62
action : upsert
84
- - key : kubernetes_pod_name
63
+ - key : kubernetes.pod_name
85
64
from_attribute : k8s.pod.name
86
65
action : upsert
87
- - key : kubernetes_container_name
66
+ - key : kubernetes.container_name
88
67
from_attribute : k8s.container.name
89
68
action : upsert
90
69
- key : log_type
91
70
value : application
92
71
action : upsert
93
- - key : loki.resource.labels
94
- value : log_type, kubernetes_namespace_name, kubernetes_pod_name, kubernetes_container_name
95
- action : insert
96
72
transform :
97
73
log_statements :
98
74
- context : log
99
75
statements :
100
76
- set(attributes["level"], ConvertCase(severity_text, "lower"))
101
-
102
77
exporters :
103
- loki :
104
- endpoint : https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/application/loki/api/v1/push
78
+ otlphttp :
79
+ endpoint : https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/application/otlp
80
+ encoding : json
105
81
tls :
106
82
ca_file : " /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
107
83
auth :
108
84
authenticator : bearertokenauth
109
-
85
+ debug :
86
+ verbosity : detailed
110
87
service :
111
88
extensions : [bearertokenauth]
112
89
pipelines :
113
90
logs :
114
91
receivers : [otlp]
115
92
processors : [k8sattributes, transform, resource]
116
- exporters : [loki]
93
+ exporters : [otlphttp]
94
+ logs/test :
95
+ receivers : [otlp]
96
+ processors : []
97
+ exporters : [debug]
0 commit comments