Chapter 1. Configuring distributed tracing
The Tempo Operator uses a custom resource definition (CRD) file that defines the architecture and configuration settings for creating and deploying distributed tracing resources. You can install the default configuration or modify the file.
1.1. Configuring the Tempo Operator Copy linkLink copied to clipboard!
You can configure the Tempo Operator by using the Operator Lifecycle Manager (OLM) Subscription custom resource (CR) to override default settings. This configuration method uses environment variables that take precedence over any ConfigMap-based configuration.
The following Subscription CR example shows Operator configuration:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: tempo-product
namespace: openshift-tempo-operator
spec:
channel: stable
name: tempo-product
source: redhat-operators
sourceNamespace: openshift-marketplace
config:
env:
- name: FEATURE_GATES
value: "openshift.route,openshift.servingCertsService"
- name: TLS_PROFILE
value: "Modern"
where:
FEATURE_GATES-
Specifies a comma-separated list of feature gates to enable or disable. Prefix a gate with
-to disable it. TLS_PROFILE- Specifies the TLS security profile for the Operator.
You can also configure these values from the OpenShift Container Platform web console by editing the Subscription object under Operators > Installed Operators > Tempo Operator > Subscription.
You can configure the Tempo Operator by using the environment variables from the following tables.
The following table shows the feature gates:
| Feature gate | Description |
|---|---|
|
| Enables OpenShift Container Platform route creation for Tempo components. |
|
| Enables OpenShift Container Platform service serving certificates. |
|
| Enables OpenShift Container Platform OAuth proxy integration. |
|
| Enables HTTP encryption for Tempo components. |
|
| Enables gRPC encryption for Tempo components. |
|
| Enables Prometheus Operator integration for metrics. |
|
| Enables Grafana Operator integration. |
|
| Enables built-in certificate management. |
|
|
Enables creation of |
|
|
Enables creation of |
|
|
Enables creation of |
The following table shows the general configuration environment variables:
| Environment variable | Description | Example value |
|---|---|---|
|
|
Lists comma-separated feature gates to enable or disable. Prefix a gate with |
|
|
| Sets TLS security profile type. |
|
|
| Sets the OpenShift Container Platform base domain for route generation. |
|
|
|
Sets the default |
|
The following table shows the built-in certificate management environment variables:
| Environment variable | Description | Example value |
|---|---|---|
|
| CA certificate validity duration. |
|
|
| CA certificate refresh interval. |
|
|
| Certificate validity duration. |
|
|
| Certificate refresh interval. |
|
The following table shows the controller manager environment variables:
| Environment variable | Description | Example value |
|---|---|---|
|
| Metrics server bind address. |
|
|
| Enables secure metrics serving. |
|
|
| Health probe bind address. |
|
|
| Webhook server port. |
|
1.2. Configuring back-end storage Copy linkLink copied to clipboard!
For information about configuring the back-end storage, see Understanding persistent storage and the configuration section for your chosen storage option.
1.3. Introduction to TempoStack configuration parameters Copy linkLink copied to clipboard!
The TempoStack custom resource (CR) defines the architecture and settings for creating distributed tracing resources. You can modify these parameters to customize your implementation to your business needs.
The following TempoStack CR is an example:
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: <name>
spec:
storage: {}
resources: {}
replicationFactor: 1
retention:
global:
traces: 48h
perTenant: {}
template:
distributor: {}
ingester: {}
compactor: {}
querier: {}
queryFrontend: {}
gateway: {}
limits:
global:
ingestion: {}
query: {}
observability:
grafana: {}
metrics: {}
tracing: {}
search: {}
managementState: managed
where:
apiVersion- API version to use when creating the object.
kind- The kind of Kubernetes object to create.
metadata-
Data that uniquely identifies the object, including a
namestring,UID, and optionalnamespace. OpenShift Container Platform automatically generates theUIDand completes thenamespacewith the name of the project where the object is created. name- Name of the TempoStack instance.
spec-
Configuration parameters of the TempoStack instance. When a common definition for all Tempo components is required, define it in the
specsection. When the definition relates to an individual component, place it in thespec.template.<component>section. storage- Storage is configured at instance deployment. See the installation page for information about storage options for the instance.
resources- Compute resources for the Tempo container.
replicationFactor- Integer value for the number of ingesters that must acknowledge the data from the distributors before accepting a span.
retention-
Configuration options for retention of traces. The default value is
48h. distributor-
Configuration options for the Tempo
distributorcomponent. ingester-
Configuration options for the Tempo
ingestercomponent. compactor-
Configuration options for the Tempo
compactorcomponent. querier-
Configuration options for the Tempo
queriercomponent. queryFrontend-
Configuration options for the Tempo
query-frontendcomponent. gateway-
Configuration options for the Tempo
gatewaycomponent. limits- Limits for ingestion and query rates.
ingestion- Ingestion rate limits.
query- Query rate limits.
observability- Configuration of Operands to handle telemetry data.
search- Search capabilities.
managementState-
Whether or not this CR is managed by the Operator. The default value is
managed.
| Parameter | Description | Values | Default value |
|---|---|---|---|
|
| API version to use when creating the object. |
|
|
|
| Defines the kind of Kubernetes object to create. |
| |
|
|
Data that uniquely identifies the object, including a |
OpenShift Container Platform automatically generates the | |
|
| Name for the object. | Name of your TempoStack instance. |
|
|
| Specification for the object to be created. |
Contains all of the configuration parameters for your TempoStack instance. When a common definition for all Tempo components is required, it is defined under the | N/A |
|
| Resources assigned to the TempoStack instance. | ||
|
| Storage size for ingester PVCs. | ||
|
| Configuration for the replication factor. | ||
|
| Configuration options for retention of traces. | ||
|
| Configuration options that define the storage. | ||
|
| Configuration options for the Tempo distributor. | ||
|
| Configuration options for the Tempo ingester. | ||
|
| Configuration options for the Tempo compactor. | ||
|
| Configuration options for the Tempo querier. | ||
|
| Configuration options for the Tempo query frontend. | ||
|
| Configuration options for the Tempo gateway. |
1.4. TempoStack deployment sizing Copy linkLink copied to clipboard!
Deployment size configuration uses the spec.size field in the TempoStack custom resource (CR) as follows.
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: example
namespace: tracing-system
spec:
size: 1x.pico
storageSize: 1Gi
storage:
secret:
name: object-storage-secret
type: s3
template:
queryFrontend:
jaegerQuery:
enabled: true
where:
size-
Specifies the deployment size. Valid values are
1x.demo,1x.pico,1x.extra-small,1x.small, and1x.medium. Do not change the number1xfor the deployment size.
The TempoStack instance size format is 1x.<size>, where 1x is the only supported value and <size> specifies the performance tier, as the following table shows:
1x.demo | 1x.pico | 1x.extra-small | 1x.small | 1x.medium | |
|---|---|---|---|---|---|
| Ingestion rate | Demo use only | Small workloads | 100 GB/day | 500 GB/day | 2 TB/day |
| Replication factor | 1 | 2 | 2 | 2 | 2 |
| Total CPU requests | None | 3.25 vCPUs | 4.6 vCPUs | 7.9 vCPUs | 24 vCPUs |
| Total CPU requests if using the gateway | None | 3.4 vCPUs | 5.1 vCPUs | 8.8 vCPUs | 28.1 vCPUs |
| Total CPU requests if using the Jaeger UI | None | 3.4 vCPUs | 5.1 vCPUs | 8.8 vCPUs | 28.1 vCPUs |
| Total memory requests | None | 8.8 Gi | 22.1 Gi | 30.1 Gi | 47.1 Gi |
| Total memory requests if using the gateway | None | 8.9 Gi | 22.3 Gi | 30.4 Gi | 47.4 Gi |
| Total memory requests if using the Jaeger UI | None | 8.9 Gi | 22.3 Gi | 30.4 Gi | 47.4 Gi |
For production deployments, use 1x.pico or larger sizes that provide high availability with a replication factor of 2.
The 1x.demo size is for demonstration and development purposes only. It has no resource constraints and a replication factor of 1, so it does not provide high availability.
The Operator automatically configures the resource requests for all TempoStack components and sets the appropriate replication factor. You do not need to manually configure individual component resources. The base resource totals include the following components: distributor, ingester, compactor, querier, and query front end. The gateway component is optional but required if you need multitenant authentication. When enabled, it also deploys the gateway Open Policy Agent (OPA) sidecar. The Jaeger UI component is optional and provides the Jaeger query interface for trace visualization. When enabled, it also deploys the OAuth proxy for authentication.
The following table shows the CPU and memory resource requests for each TempoStack component at each deployment size:
| Component | 1x.pico | 1x.extra-small | 1x.small | 1x.medium | ||||
|---|---|---|---|---|---|---|---|---|
| CPU | Memory | CPU | Memory | CPU | Memory | CPU | Memory | |
| Distributor | 500m | 500 Mi | 200m | 128 Mi | 600m | 128 Mi | 1500m | 128 Mi |
| Ingester | 500m | 3 Gi | 1500m | 8 Gi | 2000m | 10 Gi | 8000m | 16 Gi |
| Compactor | 500m | 500 Mi | 200m | 4 Gi | 400m | 6 Gi | 600m | 10 Gi |
| Querier | 750m | 1536 Mi | 1000m | 1 Gi | 2500m | 3 Gi | 5000m | 4 Gi |
| Query front end | 500m | 500 Mi | 200m | 1 Gi | 400m | 1 Gi | 800m | 1 Gi |
| Gateway | 100m | 64 Mi | 400m | 128 Mi | 800m | 192 Mi | 4000m | 192 Mi |
| Gateway OPA | 50m | 64 Mi | 100m | 64 Mi | 100m | 64 Mi | 200m | 128 Mi |
| Jaeger UI | 100m | 64 Mi | 400m | 128 Mi | 800m | 192 Mi | 4000m | 192 Mi |
| OAuth proxy | 50m | 64 Mi | 100m | 64 Mi | 100m | 64 Mi | 200m | 128 Mi |
- The resource values listed are requests only. The Operator does not apply resource limits.
- The replication factor determines the number of ingester replicas. For sizes with a replication factor of 2, multiply the ingester resources by 2 to calculate the total ingester resource consumption.
- The Operator automatically deploys the gateway OPA sidecar when the gateway is enabled.
- The Operator automatically deploys the OAuth proxy when the Jaeger UI is enabled.
When determining resources for a component, the Operator uses the following priority order:
-
Component override: If you set
spec.template.<component>.resources, the Operator uses these values. -
Size profile: If you set
spec.size, the Operator uses the t-shirt size profile values. -
Total resources: If you set
spec.resources.total, the Operator uses the percentage-based split. - No resources: If you do not set any of the previous options, the Operator does not apply resource requests.
Component-level overrides always take precedence. You can do any of the following actions:
- Customize specific components when using a t-shirt size as the baseline for the remaining components.
- Override resource requests for specific components when using a t-shirt size as the baseline.
- Override resource requests when a particular component in your deployment requires more or fewer resources than the default size profile provides.
The following example shows a TempoStack custom resource with component resource overrides:
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: example
namespace: tracing-system
spec:
size: 1x.small
storageSize: 1Gi
storage:
secret:
name: object-storage-secret
type: s3
template:
ingester:
resources:
requests:
cpu: 4
memory: 20Gi
querier:
replicas: 4
queryFrontend:
jaegerQuery:
enabled: true
where:
example-
In this example, the following settings apply: The ingester component uses the explicitly defined resources, 4 CPU and 20 Gi memory, instead of the
1x.smalldefaults. The querier component uses four replicas with resources from the1x.smallprofile. All the other components, such as the distributor, compactor, and query front end, use the1x.smalldefault resources. size- Specifies the base size profile for all components.
resources-
Overrides the ingester resources. The ingester component uses these explicit values instead of the
1x.smalldefaults. replicas- Specifies the number of querier replicas. The replica counts are independent of the size profile.
1.5. Query configuration options Copy linkLink copied to clipboard!
Two components of distributed tracing, the querier and query frontend, manage queries. You can configure both of these components.
The querier component finds the requested trace ID in the ingesters or back-end storage. Depending on the set parameters, the querier component can query both the ingesters and pull bloom or indexes from the back end to search blocks in object storage. The querier component exposes an HTTP endpoint at GET /querier/api/traces/<trace_id>, but it is not expected to be used directly. Queries must be sent to the query frontend.
The following table shows the configuration parameters for the querier component:
| Parameter | Description | Values |
|---|---|---|
|
| The simple form of the node-selection constraint. | type: object |
|
| The number of replicas to be created for the component. | type: integer; format: int32 |
|
| Component-specific pod tolerations. | type: array |
The query frontend component is responsible for sharding the search space for an incoming query. The query frontend exposes traces via a simple HTTP endpoint: GET /api/traces/<trace_id>. Internally, the query frontend component splits the blockID space into a configurable number of shards and then queues these requests. The querier component connects to the query frontend component via a streaming gRPC connection to process these sharded queries.
The following table shows the configuration parameters for the query frontend component:
| Parameter | Description | Values |
|---|---|---|
|
| Configuration of the query frontend component. | type: object |
|
| The simple form of the node selection constraint. | type: object |
|
| The number of replicas to be created for the query frontend component. | type: integer; format: int32 |
|
| Pod tolerations specific to the query frontend component. | type: array |
|
| The options specific to the Jaeger Query component. | type: object |
|
|
When | type: boolean |
|
| The options for the Jaeger Query ingress. | type: object |
|
| The annotations of the ingress object. | type: object |
|
| The hostname of the ingress object. | type: string |
|
| The name of an IngressClass cluster resource. Defines which ingress controller serves this ingress resource. | type: string |
|
| The options for the OpenShift route. | type: object |
|
|
The termination type. The default is | type: string (enum: insecure, edge, passthrough, reencrypt) |
|
|
The type of ingress for the Jaeger Query UI. The supported types are | type: string (enum: ingress, route) |
|
| The monitor tab configuration. | type: object |
|
|
Enables the monitor tab in the Jaeger console. The | type: boolean |
|
|
The endpoint to the Prometheus instance that contains the span rate, error, and duration (RED) metrics. For example, | type: string |
The following TempoStack CR example shows configuration of the query frontend component:
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: simplest
spec:
storage:
secret:
name: minio
type: s3
storageSize: 200M
resources:
total:
limits:
memory: 2Gi
cpu: 2000m
template:
queryFrontend:
jaegerQuery:
enabled: true
ingress:
route:
termination: edge
type: route
1.6. Configuring the UI plugin Copy linkLink copied to clipboard!
You can use the distributed tracing UI plugin of the Cluster Observability Operator (COO) as the user interface (UI) for distributed tracing. For more information about installing and using the distributed tracing UI plugin, see "Distributed tracing UI plugin" in Cluster Observability Operator.
1.7. Grafana data source integration Copy linkLink copied to clipboard!
When you enable the gateway, it uses the OpenShift Container Platform authentication and authorization mechanisms. As a result, you can query different tenants. The gateway prevents the data source from communicating directly with the distributed tracing back end and requires authentication through the gateway.
Due to architectural constraints or operational limitations, you might not be able to directly integrate Grafana with OpenShift Container Platform authentication, such as when using an external Grafana instance. In this case, you can use a ServiceAccount token configured with an extended lifespan for gateway authentication. All users who are authenticated this way share the same access privileges. This shared access model limits the granularity of access control, preventing the implementation of highly detailed, user-specific permissions. If your organization requires robust, fine-grained access management, this approach is less suitable.
1.8. Configuring the Monitor tab in Jaeger UI Copy linkLink copied to clipboard!
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 OpenShift Container Platform web console.
Prerequisites
- You have configured the permissions and tenants for distributed tracing. For more information, see "Configuring the permissions and tenants".
Prometheus that you deploy in your user-workload monitoring stack scrapes metrics from spans in the OpenTelemetry Collector. The Jaeger UI queries these metrics from the Prometheus endpoint and visualizes them.
Procedure
In the
OpenTelemetryCollectorcustom 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
OpenTelemetryCollectorcustom resource example configures span RED:apiVersion: opentelemetry.io/v1beta1 kind: OpenTelemetryCollector metadata: name: otel spec: mode: deployment observability: metrics: enableMetrics: true config: | connectors: spanmetrics: metrics_flush_interval: 15s receivers: otlp: protocols: grpc: http: exporters: prometheus: endpoint: 0.0.0.0:8889 add_metric_suffixes: false resource_to_telemetry_conversion: enabled: true otlp/traces: auth: authenticator: bearertokenauth endpoint: tempo-redmetrics-gateway.mynamespace.svc.cluster.local:8090 headers: X-Scope-OrgID: dev tls: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt insecure: false extensions: bearertokenauth: filename: /var/run/secrets/kubernetes.io/serviceaccount/token service: extensions: - bearertokenauth pipelines: traces: receivers: [otlp] exporters: [otlp/traces, spanmetrics] metrics: receivers: [spanmetrics] exporters: [prometheus] # ...where:
enableMetrics-
Creates the
ServiceMonitorcustom resource to enable scraping of the Prometheus exporter. 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.
enabled- Resource attributes are dropped by default.
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
TempoStackcustom 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.The following
TempoStackcustom resource example enables the Monitor tab:apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack metadata: name: redmetrics spec: storage: secret: name: minio-test type: s3 storageSize: 1Gi tenants: mode: openshift authentication: - tenantName: dev tenantId: "1610b0c3-c509-4592-a256-a1871353dbfa" template: gateway: enabled: true queryFrontend: jaegerQuery: monitorTab: enabled: true prometheusEndpoint: https://thanos-querier.openshift-monitoring.svc.cluster.local:9092 redMetricsNamespace: "" # ...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 that the Span Metrics Connector generates with alerting rules.
For example, for alerts about a slow service or to define service level objectives (SLOs), the connector creates a
traces_span_metrics_duration_buckethistogram and thetraces_span_metrics_callscounter metric. The following examplePrometheusRulecustom resource defines an alerting rule for SLO when not serving 95% of requests within 2000 ms on the front-end service:apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: span-red spec: groups: - name: server-side-latency rules: - alert: SpanREDFrontendAPIRequestLatency expr: histogram_quantile(0.95, sum(rate(traces_span_metrics_duration_bucket{service_name="frontend", span_kind="SPAN_KIND_SERVER"}[5m])) by (le, service_name, span_name)) > 2000 labels: severity: Warning annotations: summary: "High request latency on {{$labels.service_name}} and {{$labels.span_name}}" description: "{{$labels.instance}} has 95th request latency above 2s (current value: {{$value}}s)"where:
expr-
Expression for checking if 95% of the front-end server response time values are below 2000 ms. The time range (
[5m]) must be at least four times the scrape interval and long enough to accommodate a change in the metric.
1.9. Configuring the receiver TLS Copy linkLink copied to clipboard!
The custom resource of a TempoStack or TempoMonolithic instance supports configuring the TLS for receivers by using user-provided certificates or OpenShift’s service-serving certificates.
1.9.1. Receiver TLS configuration for a TempoStack instance Copy linkLink copied to clipboard!
You can provide a TLS certificate in a secret or use the service serving certificates that are generated by OpenShift Container Platform.
To provide a TLS certificate in a secret, configure it in the
TempoStackcustom resource.NoteThis feature is not supported with the enabled Tempo Gateway.
The following example shows TLS for receivers by using a user-provided certificate in a secret:
apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack # ... spec: # ... template: distributor: tls: enabled: true certName: <tls_secret> caName: <ca_name> # ...where:
enabled- Enables TLS at the Tempo Distributor.
certName-
Secret containing a
tls.keykey andtls.crtcertificate that you apply in advance. caName- Optional CA in a config map to enable mutual TLS authentication (mTLS).
Alternatively, you can use the service serving certificates that are generated by OpenShift Container Platform.
NoteMutual TLS authentication (mTLS) is not supported with this feature.
The following example shows TLS for receivers by using the service serving certificates that are generated by OpenShift Container Platform:
apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack # ... spec: # ... template: distributor: tls: enabled: true # ...where:
enabled- Sufficient TLS configuration at the Tempo Distributor.
1.9.2. Receiver TLS configuration for a TempoMonolithic instance Copy linkLink copied to clipboard!
You can provide a TLS certificate in a secret or use the service serving certificates that are generated by OpenShift Container Platform.
To provide a TLS certificate in a secret, configure it in the
TempoMonolithiccustom resource.NoteThis feature is not supported with the enabled Tempo Gateway.
The following example shows TLS for receivers by using a user-provided certificate in a secret:
apiVersion: tempo.grafana.com/v1alpha1 kind: TempoMonolithic # ... spec: # ... ingestion: otlp: grpc: tls: enabled: true certName: <tls_secret> caName: <ca_name> # ...where:
enabled- Enables TLS at the Tempo Distributor.
certName-
Secret containing a
tls.keykey andtls.crtcertificate that you apply in advance. caName- Optional CA in a config map to enable mutual TLS authentication (mTLS).
Alternatively, you can use the service serving certificates that are generated by OpenShift Container Platform.
NoteMutual TLS authentication (mTLS) is not supported with this feature.
The following example shows TLS for receivers by using the service serving certificates that are generated by OpenShift Container Platform:
apiVersion: tempo.grafana.com/v1alpha1 kind: TempoMonolithic # ... spec: # ... ingestion: otlp: grpc: tls: enabled: true http: tls: enabled: true # ...where:
enabled- Minimal configuration for TLS at the Tempo Distributor.
1.10. Configuring query RBAC Copy linkLink copied to clipboard!
As an administrator, you can set up the query role-based access control (RBAC) to filter the span attributes for your users by the namespaces for which you granted them permissions.
When you enable the query RBAC, users can still access traces from all namespaces, and the service.name and k8s.namespace.name attributes are also visible to all users.
Prerequisites
You are logged in to the cluster as a user with the
cluster-adminrole.TipEnsure that your OpenShift CLI (
oc) version is up to date and matches your OpenShift Container Platform version.You can verify your login by running the following command:
$ oc whoami
Procedure
Enable multitenancy and query RBAC in the
TempoStackcustom resource (CR), for example:apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack metadata: name: simplest namespace: chainsaw-multitenancy spec: storage: secret: name: minio type: s3 storageSize: 1Gi resources: total: limits: memory: 2Gi cpu: 2000m tenants: mode: openshift authentication: - tenantName: dev tenantId: "1610b0c3-c509-4592-a256-a1871353dbfb" template: gateway: enabled: true rbac: enabled: true queryFrontend: jaegerQuery: enabled: falsewhere:
gateway.enabled-
Always set to
true. rbac.enabled-
Always set to
true. jaegerQuery.enabled-
Always set to
false.
Create a cluster role and cluster role binding to grant the target users the permissions to access the tenant that you specified in the
TempoStackCR, for example:apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: tempo-dev-read rules: - apiGroups: [tempo.grafana.com] resources: [dev] resourceNames: [traces] verbs: [get] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: tempo-dev-read roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: tempo-dev-read subjects: - kind: Group apiGroup: rbac.authorization.k8s.io name: system:authenticatedwhere:
resources-
Tenant name in the
TempoStackCR. name- All authenticated OpenShift users.
Grant the target users the permissions to read attributes for the project. You can do this by running the following command:
$ oc adm policy add-role-to-user view <username> -n <project>
1.11. Using taints and tolerations Copy linkLink copied to clipboard!
To schedule TempoStack pods on dedicated nodes, see How to deploy the different TempoStack components on infra nodes by using nodeSelector and tolerations in OpenShift 4.
1.12. Configuring monitoring and alerts Copy linkLink copied to clipboard!
The Tempo Operator supports monitoring and alerts about each TempoStack component such as the distributor or ingester, and exposes upgrade and operational metrics about the Operator itself.
1.12.1. Configuring the TempoStack metrics and alerts Copy linkLink copied to clipboard!
You can enable metrics and alerts of TempoStack instances.
Prerequisites
- Monitoring for user-defined projects is enabled in the cluster.
Procedure
To enable metrics of a TempoStack instance, set the
spec.observability.metrics.createServiceMonitorsfield totrue:apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack metadata: name: <name> spec: observability: metrics: createServiceMonitors: trueTo enable alerts for a TempoStack instance, set the
spec.observability.metrics.createPrometheusRulesfield totrue:apiVersion: tempo.grafana.com/v1alpha1 kind: TempoStack metadata: name: <name> spec: observability: metrics: createPrometheusRules: true
Verification
You can use the Administrator view of the web console to verify successful configuration:
-
Go to Observe
Targets, filter for Source: User, and check that ServiceMonitors in the format tempo-<instance_name>-<component>have the Up status. -
To verify that alerts are set up correctly, go to Observe
Alerting Alerting rules, filter for Source: User, and check that the Alert rules for the TempoStack instance components are available.
1.12.2. Configuring the Tempo Operator metrics and alerts Copy linkLink copied to clipboard!
When installing the Tempo Operator from the web console, you can select the Enable Operator recommended cluster monitoring on this Namespace checkbox, which enables the creation of metrics and alerts for the Tempo Operator.
If the checkbox was not selected during installation, you can manually enable metrics and alerts even after installing the Tempo Operator.
Procedure
-
Add the
openshift.io/cluster-monitoring: "true"label in the project where the Tempo Operator is installed, which isopenshift-tempo-operatorby default.
Verification
You can use the Administrator view of the web console to verify successful configuration:
-
Go to Observe
Targets, filter for Source: Platform, and search for tempo-operator, which must have the Up status. -
To verify that alerts are set up correctly, go to Observe
Alerting Alerting rules, filter for Source: Platform, and locate the Alert rules for the Tempo Operator.