Skip to content

Commit 208b79e

Browse files
committed
OBSDOCS-3174: Document Review default set of stream labels for "openshift-logging" tenant
1 parent 289f30b commit 208b79e

2 files changed

Lines changed: 62 additions & 21 deletions

File tree

configuring/configuring-lokistack-otlp.adoc

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,29 @@ Attributes that are not explicitly set as stream labels or dropped from the entr
107107
[id="customizing-openshift-defaults_{context}"]
108108
=== Customizing OpenShift defaults
109109

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`
111127

112128
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.
113129

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].
116131

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.
134-
====
132+
include::modules/enabling-console-labels-for-openshift-web-console.adoc[leveloffset=+2]
135133

136134
[role="_additional-resources"]
137135
[id="additional-resources_{context}"]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:_newdoc-version: 2.18.4
2+
:_template-generated: 2026-03-03
3+
:_mod-docs-content-type: PROCEDURE
4+
5+
[id="enabling-console-labels-for-openshift-web-console_{context}"]
6+
= 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:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc apply -f <file-name>.yaml
43+
----

0 commit comments

Comments
 (0)