Skip to content

Commit acd9018

Browse files
authored
Merge pull request #92484 from openshift-cherrypick-robot/cherry-pick-89092-to-enterprise-4.14
[enterprise-4.14] OBSDOCS-1676: Tempo-OTel Multitenancy documentation improvements
2 parents 8bb3a48 + 1741dbe commit acd9018

29 files changed

+454
-392
lines changed

modules/distr-tracing-tempo-config-multitenancy.adoc

-179
This file was deleted.

modules/distr-tracing-tempo-config-spanmetrics.adoc

+46-36
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@
22
//
33
// * observability/distr_tracing/distr_tracing_tempo/distr-tracing-tempo-configuring.adoc
44

5-
:_mod-docs-content-type: REFERENCE
5+
:_mod-docs-content-type: PROCEDURE
66
[id="distr-tracing-tempo-config-spanmetrics_{context}"]
7-
= Configuration of the monitor tab in Jaeger UI
7+
= Configuring the Monitor tab in Jaeger UI
88

9-
Trace data contains rich information, and the data is normalized across instrumented languages and frameworks.
10-
Therefore, request rate, error, and duration (RED) metrics can be extracted from traces.
11-
The metrics can be visualized in Jaeger console in the *Monitor* tab.
9+
You can have the request rate, error, and duration (RED) metrics extracted from traces and visualized through the Jaeger Console in the *Monitor* tab of the {product-title} web console. The metrics are derived from spans in the OpenTelemetry Collector that are scraped from the Collector by Prometheus, which you can deploy in your user-workload monitoring stack. The Jaeger UI queries these metrics from the Prometheus endpoint and visualizes them.
1210

13-
The metrics are derived from spans in the OpenTelemetry Collector that are scraped from the Collector by the Prometheus deployed in the user-workload monitoring stack.
14-
The Jaeger UI queries these metrics from the Prometheus endpoint and visualizes them.
11+
.Prerequisites
1512

16-
[id="distr-tracing-tempo-config-spanmetrics_opentelemetry-collector-configuration_{context}"]
17-
== OpenTelemetry Collector configuration
13+
* You have configured the permissions and tenants for the {TempoShortName}. For more information, see "Configuring the permissions and tenants".
1814
19-
The OpenTelemetry Collector requires configuration of the `spanmetrics` connector that derives metrics from traces and exports the metrics in the Prometheus format.
15+
.Procedure
2016

21-
.OpenTelemetry Collector custom resource for span RED
17+
. In the `OpenTelemetryCollector` custom resource of the OpenTelemetry Collector, enable the Spanmetrics Connector (`spanmetrics`), which derives metrics from traces and exports the metrics in the Prometheus format.
18+
+
19+
.Example `OpenTelemetryCollector` custom resource for span RED
2220
[source,yaml]
2321
----
22+
apiVersion: opentelemetry.io/v1beta1
2423
kind: OpenTelemetryCollector
25-
apiVersion: opentelemetry.io/v1alpha1
2624
metadata:
2725
name: otel
2826
spec:
@@ -46,35 +44,46 @@ spec:
4644
endpoint: 0.0.0.0:8889
4745
add_metric_suffixes: false
4846
resource_to_telemetry_conversion:
49-
enabled: true # by default resource attributes are dropped
47+
enabled: true # <5>
5048

5149
otlp:
52-
endpoint: "tempo-simplest-distributor:4317"
50+
auth:
51+
authenticator: bearertokenauth
52+
endpoint: tempo-redmetrics-gateway.mynamespace.svc.cluster.local:8090
53+
headers:
54+
X-Scope-OrgID: dev
5355
tls:
54-
insecure: true
56+
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
57+
insecure: false
58+
59+
extensions:
60+
bearertokenauth:
61+
filename: /var/run/secrets/kubernetes.io/serviceaccount/token
5562

5663
service:
64+
extensions:
65+
- bearertokenauth
5766
pipelines:
5867
traces:
5968
receivers: [otlp]
60-
exporters: [otlp, spanmetrics] # <5>
69+
exporters: [otlp, spanmetrics] # <6>
6170
metrics:
62-
receivers: [spanmetrics] # <6>
71+
receivers: [spanmetrics] # <7>
6372
exporters: [prometheus]
73+
74+
# ...
6475
----
6576
<1> Creates the `ServiceMonitor` custom resource to enable scraping of the Prometheus exporter.
6677
<2> The Spanmetrics connector receives traces and exports metrics.
6778
<3> The OTLP receiver to receive spans in the OpenTelemetry protocol.
6879
<4> The Prometheus exporter is used to export metrics in the Prometheus format.
69-
<5> The Spanmetrics connector is configured as exporter in traces pipeline.
70-
<6> The Spanmetrics connector is configured as receiver in metrics pipeline.
71-
72-
[id="distr-tracing-tempo-config-spanmetrics_tempo-configuration_{context}"]
73-
== Tempo configuration
74-
75-
The `TempoStack` custom resource must specify the following: the *Monitor* tab is enabled, and the Prometheus endpoint is set to the Thanos querier service to query the data from the user-defined monitoring stack.
80+
<5> The resource attributes are dropped by default.
81+
<6> The Spanmetrics connector is configured as exporter in traces pipeline.
82+
<7> The Spanmetrics connector is configured as receiver in metrics pipeline.
7683
77-
.TempoStack custom resource with the enabled Monitor tab
84+
. In the `TempoStack` custom resource, enable the *Monitor* tab and set the Prometheus endpoint to the Thanos querier service to query the data from your user-defined monitoring stack.
85+
+
86+
.Example `TempoStack` custom resource with the enabled Monitor tab
7887
[source,yaml]
7988
----
8089
apiVersion: tempo.grafana.com/v1alpha1
@@ -87,28 +96,29 @@ spec:
8796
name: minio-test
8897
type: s3
8998
storageSize: 1Gi
99+
tenants:
100+
mode: openshift
101+
authentication:
102+
- tenantName: dev
103+
tenantId: "1610b0c3-c509-4592-a256-a1871353dbfa"
90104
template:
91105
gateway:
92-
enabled: false
106+
enabled: true
93107
queryFrontend:
94108
jaegerQuery:
95-
enabled: true
96109
monitorTab:
97110
enabled: true # <1>
98111
prometheusEndpoint: https://thanos-querier.openshift-monitoring.svc.cluster.local:9092 # <2>
99112
redMetricsNamespace: "" <3>
100-
ingress:
101-
type: route
113+
114+
# ...
102115
----
103116
<1> Enables the monitoring tab in the Jaeger console.
104117
<2> The service name for Thanos Querier from user-workload monitoring.
105118
<3> Optional: The metrics namespace on which the Jaeger query retrieves the Prometheus metrics. Include this line only if you are using an OpenTelemetry Collector version earlier than 0.109.0. If you are using an OpenTelemetry Collector version 0.109.0 or later, omit this line.
106119
107-
[id="distr-tracing-tempo-config-spanmetrics_span-red-metrics-and-alerting-rules_{context}"]
108-
== Span RED metrics and alerting rules
109-
110-
The metrics generated by the `spanmetrics` connector are usable with alerting rules. For example, for alerts about a slow service or to define service level objectives (SLOs), the connector creates a `duration_bucket` histogram and the `calls` counter metric. These metrics have labels that identify the service, API name, operation type, and other attributes.
111-
120+
. Optional: Use the span RED metrics generated by the `spanmetrics` connector with alerting rules. For example, for alerts about a slow service or to define service level objectives (SLOs), the connector creates a `duration_bucket` histogram and the `calls` counter metric. These metrics have labels that identify the service, API name, operation type, and other attributes.
121+
+
112122
.Labels of the metrics created in the `spanmetrics` connector
113123
[options="header"]
114124
[cols="a, a, a"]
@@ -135,8 +145,8 @@ The metrics generated by the `spanmetrics` connector are usable with alerting ru
135145
* `SPAN_KIND_INTERNAL`
136146
137147
|===
138-
139-
.Example `PrometheusRule` CR that defines an alerting rule for SLO when not serving 95% of requests within 2000ms on the front-end service
148+
+
149+
.Example `PrometheusRule` custom resource that defines an alerting rule for SLO when not serving 95% of requests within 2000ms on the front-end service
140150
[source,yaml]
141151
----
142152
apiVersion: monitoring.coreos.com/v1

0 commit comments

Comments
 (0)