Skip to content

Commit 3b02b75

Browse files
authored
Merge pull request #79110 from max-cx/OBSDOCS-1144
OBSDOCS-1144: Document the OTEL Collector dashboards
2 parents daedd13 + 56bf857 commit 3b02b75

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

modules/otel-troubleshoot-metrics.adoc

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,60 @@ The Operator creates a `<cr_name>-collector-monitoring` telemetry service that y
1919

2020
.Procedure
2121

22-
. Enable the telemetry service by adding the following lines in the `OpenTelemetryCollector` custom resource:
22+
. Enable the telemetry service by adding the following lines in the `OpenTelemetryCollector` custom resource (CR):
2323

2424
+
2525
[source,yaml]
2626
----
27+
# ...
2728
config: |
2829
service:
2930
telemetry:
3031
metrics:
3132
address: ":8888" # <1>
33+
# ...
3234
----
3335
<1> The address at which the internal collector metrics are exposed. Defaults to `:8888`.
3436

35-
// TODO Operator 0.82.0 has spec.observability.metrics.enableMetrics config that creates ServiceMonitors for users
36-
3737
. Retrieve the metrics by running the following command, which uses the port-forwarding Collector pod:
3838
+
3939
[source,terminal]
4040
----
4141
$ oc port-forward <collector_pod>
4242
----
4343

44-
. Access the metrics endpoint at `+http://localhost:8888/metrics+`.
44+
. In the `OpenTelemetryCollector` CR, set the `enableMetrics` field to `true` to scrape internal metrics:
45+
+
46+
[source,yaml]
47+
----
48+
apiVersion: opentelemetry.io/v1alpha1
49+
kind: OpenTelemetryCollector
50+
spec:
51+
# ...
52+
mode: deployment
53+
observability:
54+
metrics:
55+
enableMetrics: true
56+
# ...
57+
----
58+
+
59+
Depending on the deployment mode of the OpenTelemetry Collector, the internal metrics are scraped by using `PodMonitors` or `ServiceMonitors`.
60+
+
61+
[NOTE]
62+
====
63+
Alternatively, if you do not set the `enableMetrics` field to `true`, you can access the metrics endpoint at `+http://localhost:8888/metrics+`.
64+
====
65+
66+
. On the *Observe* page in the web console, enable *User Workload Monitoring* to visualize the scraped metrics.
67+
+
68+
[NOTE]
69+
====
70+
Not all processors expose the required metrics.
71+
====
72+
73+
. In the web console, go to *Observe* -> *Dashboards* and select the *OpenTelemetry Collector* dashboard from the drop-down list to view it.
74+
+
75+
[TIP]
76+
====
77+
You can filter the visualized data such as spans or metrics by the Collector instance, namespace, or OpenTelemetry components such as processors, receivers, or exporters.
78+
====

0 commit comments

Comments
 (0)