You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuring/configuring-lokistack-otlp.adoc
+19-21Lines changed: 19 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,31 +107,29 @@ Attributes that are not explicitly set as stream labels or dropped from the entr
107
107
[id="customizing-openshift-defaults_{context}"]
108
108
=== Customizing OpenShift defaults
109
109
110
-
In the `openshift-logging` mode, certain attributes are required and cannot be removed from the configuration due to their role in OpenShift functions. Other attributes, labeled *recommended*, might be dropped if performance is impacted. For information about the attributes, see xref:../configuring/opentelemetry-data-model.adoc#attributes_opentelemetry-data-model[OpenTelemetry data model attributes].
110
+
In the `openshift-logging` mode, the configuration requires certain attributes that you must not remove due to their role in OpenShift functions.
111
+
Other attributes, called console labels, need to be enabled.
112
+
The {ocp-product-title} web console uses console labels to provide a simplified UI for querying logs.
113
+
Enabling console labels adds the following attributes to stream labels:
114
+
115
+
* `k8s.container.name`
116
+
* `k8s.cronjob.name`
117
+
* `k8s.daemonset.name`
118
+
* `k8s.deployment.name`
119
+
* `k8s.job.name`
120
+
* `k8s.node.name`
121
+
* `k8s.pod.name`
122
+
* `k8s.statefulset.name`
123
+
* `kubernetes.container_name`
124
+
* `kubernetes.host`
125
+
* `kubernetes.pod_name`
126
+
* `service.name`
111
127
112
128
When using the `openshift-logging` mode without custom attributes, you can achieve immediate compatibility with OpenShift tools. If additional attributes are needed as stream labels or some attributes need to be dropped, use custom configuration. Custom configurations can merge with default configurations.
113
129
114
-
[id="removing-recommended-attributes_{context}"]
115
-
=== Removing recommended attributes
130
+
For information about the attributes, see xref:../configuring/opentelemetry-data-model.adoc#attributes_opentelemetry-data-model[OpenTelemetry data model attributes].
116
131
117
-
To reduce default attributes in the `openshift-logging` mode, disable recommended attributes:
118
-
119
-
[source,yaml]
120
-
----
121
-
# ...
122
-
spec:
123
-
tenants:
124
-
mode: openshift-logging
125
-
openshift:
126
-
otlp:
127
-
disableRecommendedAttributes: true # <1>
128
-
----
129
-
<1> Set `disableRecommendedAttributes: true` to remove recommended attributes, which limits default attributes to the required attributes or stream labels.
130
-
+
131
-
[NOTE]
132
-
====
133
-
This setting might negatively impact query performance, as it removes default stream labels. You must pair this option with a custom attribute configuration to retain attributes essential for queries.
= Enabling console labels for OpenShift web console
7
+
8
+
You can enable stream labels for OpenShift web console, called console labels, for a simplified UI for querying logs.
9
+
The log viewer in the {ocp-product-title} web console uses the console labels for its integrated filters.
10
+
11
+
[IMPORTANT]
12
+
=====
13
+
Currently, the OpenShift web console only supports filtering on attributes by using stream labels.
14
+
Therefore, if you do not enable all the console labels, the filters in the log viewer might not function correctly.
15
+
However, including all the console labels might lead to performance issues.
16
+
If you know that only a subset of the filters are used, it is recommended to only add those stream labels to the configuration instead of using the full set.
17
+
This behavior might change in the future.
18
+
=====
19
+
20
+
.Prerequisites
21
+
* You have created a `ClusterLogForwarder` custom resource (CR) with an OpenTelemetry Protocol (OTLP) output.
22
+
23
+
.Procedure
24
+
25
+
. Update the ClusterLogForwarder custom resource (CR):
26
+
+
27
+
[source,yaml]
28
+
----
29
+
# ...
30
+
spec:
31
+
tenants:
32
+
mode: openshift-logging
33
+
openshift:
34
+
otlp:
35
+
enableConsoleLabels: true
36
+
----
37
+
38
+
. Apply the CR object by using the following command:
0 commit comments