From a9a088af847e5124812ab54f7869104bbf018103 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 23 Apr 2026 14:36:27 +0200 Subject: [PATCH] OBSDOCS-3341: Fix spanmetrics procedure --- ...istr-tracing-tempo-config-spanmetrics.adoc | 43 ++++--------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/modules/distr-tracing-tempo-config-spanmetrics.adoc b/modules/distr-tracing-tempo-config-spanmetrics.adoc index 6763e9895817..70d3f4d226fd 100644 --- a/modules/distr-tracing-tempo-config-spanmetrics.adoc +++ b/modules/distr-tracing-tempo-config-spanmetrics.adoc @@ -20,7 +20,7 @@ Prometheus that you deploy in your user-workload monitoring stack scrapes metric .Procedure -. 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. +. In the `OpenTelemetryCollector` custom resource of the OpenTelemetry Collector, enable the Span Metrics Connector, which derives metrics from traces and exports the metrics in the Prometheus format. + The following is an example `OpenTelemetryCollector` custom resource for span RED: + @@ -83,12 +83,12 @@ spec: where: `enableMetrics`:: Creates the `ServiceMonitor` custom resource to enable scraping of the Prometheus exporter. -`spanmetrics`:: The Spanmetrics connector receives traces and exports metrics. +`spanmetrics`:: The Span Metrics Connector receives traces and exports metrics. `otlp`:: The OTLP receiver receives spans in the OpenTelemetry protocol. -`prometheus`:: The Prometheus exporter exports metrics in the Prometheus format. +`prometheus`:: The Prometheus Exporter exports metrics in the Prometheus format. `enabled`:: Resource attributes are dropped by default. -`exporters`:: The Spanmetrics connector is configured as an exporter in the traces pipeline. -`receivers`:: The Spanmetrics connector is configured as a receiver in the metrics pipeline. +`exporters`:: The Span Metrics Connector is configured as an exporter in the traces pipeline. +`receivers`:: The Span Metrics Connector is configured as a receiver in the metrics pipeline. . 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. + @@ -128,37 +128,9 @@ where: `enabled`:: Enables the monitoring tab in the Jaeger console. `prometheusEndpoint`:: Service name for Thanos Querier from user-workload monitoring. -. 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. +. Optional: Use the span RED metrics that the Span Metrics Connector generates with alerting rules. + -The following are the labels of the metrics created in the `spanmetrics` connector: -+ -[options="header"] -[cols="a, a, a"] -|=== -|Label |Description |Values - -|`service_name` -|Service name set by the `otel_service_name` environment variable. -|`frontend` - -|`span_name` -| Name of the operation. -| -* `/` -* `/customer` - -|`span_kind` -|Identifies the server, client, messaging, or internal operation. -| -* `SPAN_KIND_SERVER` -* `SPAN_KIND_CLIENT` -* `SPAN_KIND_PRODUCER` -* `SPAN_KIND_CONSUMER` -* `SPAN_KIND_INTERNAL` - -|=== -+ -The following example `PrometheusRule` custom resource defines an alerting rule for SLO when not serving 95% of requests within 2000 ms on the front-end service: +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. The following example `PrometheusRule` custom resource defines an alerting rule for SLO when not serving 95% of requests within 2000 ms on the front-end service: + [source,yaml] ---- @@ -185,3 +157,4 @@ where: [role="_additional-resources"] .Additional resources * link:https://docs.redhat.com/en/documentation/red_hat_openshift_distributed_tracing_platform/latest/html-single/installing_the_distributed_tracing_platform/index#configuring-permissions-and-tenants_distr-tracing-tempo-installing[Configuring the permissions and tenants] +* link:https://docs.redhat.com/en/documentation/red_hat_build_of_opentelemetry/latest/html/configuring_the_collector/otel-collector-connectors#otel-connectors-spanmetrics-connector_otel-collector-connectors[Span Metrics Connector]