Questo contenuto non è disponibile nella lingua selezionata.
Chapter 1. Configuring the OpenTelemetry Collector metrics
1.1. OpenTelemetry Collector metrics overview Copia collegamentoCollegamento copiato negli appunti!
The Red Hat build of OpenTelemetry Operator automatically creates a service named <instance_name>-collector-monitoring that exposes the Collector’s internal metrics. This service listens on port 8888 by default.
The following are some of these metrics:
- Collector memory usage
- CPU usage
- Number of active traces and spans processed
- Dropped spans, logs, or metrics
- Exporter and receiver statistics
1.2. Enabling OpenTelemetry Collector metrics Copia collegamentoCollegamento copiato negli appunti!
You can use the Collector’s internal metrics for monitoring the Collector’s performance, resource consumption, and other internal behaviors. You can also use a Prometheus instance or another monitoring tool to scrape these metrics from the mentioned <instance_name>-collector-monitoring service.
Prerequisites
- Monitoring for user-defined projects is enabled in the cluster.
When the spec.observability.metrics.enableMetrics field in the OpenTelemetryCollector custom resource (CR) is set to true, the OpenTelemetryCollector CR automatically creates a Prometheus ServiceMonitor or PodMonitor CR to enable Prometheus to scrape your metrics.
Procedure
To enable metrics of an OpenTelemetry Collector instance, set the
spec.observability.metrics.enableMetricsfield totrue:apiVersion: opentelemetry.io/v1beta1 kind: OpenTelemetryCollector metadata: name: <name> spec: observability: metrics: enableMetrics: true
Verification
You can use the Administrator view of the web console to verify successful configuration:
-
Go to Observe
Targets. - Filter by Source: User.
-
Check that the ServiceMonitors or PodMonitors in the
opentelemetry-collector-<instance_name>format have the Up status.