@@ -66,7 +66,11 @@ authenticated stream to the in-cluster TempoStack. For in-cluster only, opentele
66
66
metrics. Metrics are sent to the in-cluster user-workload-monitoring prometheus by creating podmonitors and/or servicemonitors.
67
67
However, if exporting off-cluster to a 3rd party observability vendor, the collector is necessary for all signals,
68
68
and can provide a single place with which to receive telemetry from various workloads and export as a single authenticated and
69
- secure OTLP stream.
69
+ secure OTLP stream. OpenTelemetryCollector Sidecars and TargetAllocators are also explained below.
70
+
71
+ > ** 📝 NOTE:** If you are only concerned with metrics, and only want to view them within the cluster with Grafana or
72
+ > in the OpenShift console, you do not need to use the OpenTelemetryCollector. PodMonitors and ServiceMonitors
73
+ > paired with OpenShift's user workload monitoring Prometheus instance is all that's necessary.
70
74
71
75
#### Central OpenTelemetry Collector
72
76
@@ -77,17 +81,27 @@ To create a central opentelemetry-collector, update the
77
81
oc apply --kustomize ./otel-collector -n observability-hub
78
82
```
79
83
80
- #### OpenTelemetryCollector Sidecars deployment
84
+ #### OpenTelemetryCollector TargetAllocators
85
+
86
+ You can add individual metrics endpoints to the central otel-collector in observability-hub, but
87
+ a simpler way is to create a TargetAllocator to utilize already-existing PodMonitors and ServiceMonitors to configure
88
+ an OpenTelemetryCollector's Prometheus receiver scrape targets. A TargetAllocator within an OpenTelemetryCollector will
89
+ specify with PodMonitors and ServiceMonitors to gather Prometheus scrape target endpoints from.
90
+ An example of an OpenTelemetryCollector with a TargetAllocator is
91
+ [ otel-collector target-allocator] ( ./otel-collector/otel-collector-target-allocator.yaml ) . Note that when using TargetAllocators,
92
+ the OpenTelemetryCollector must be set to ` StatefulSet ` mode.
93
+
94
+ #### OpenTelemetryCollector Sidecars
81
95
82
96
You can add individual metrics endpoints to the central otel-collector in observability-hub, but
83
97
another way is to add otel-collector sidecar containers to individual deployments throughout the
84
98
cluster. Paired with an annotation on the deployment, telemetry will be exported as configured.
85
99
86
- Any deployment with the ` template.metadata.annotations ` ` sidecar.opentelemetry.io/inject: vllm-otelsidecar `
100
+ For an example, any deployment with the ` template.metadata.annotations ` ` sidecar.opentelemetry.io/inject: vllm-otelsidecar `
87
101
will receive and export telemetry as configured in the
88
102
[ otel-collector-vllm-sidecar example] ( ./otel-collector/otel-collector-vllm-sidecar.yaml ) .
89
103
90
- Any deployment with the ` template.metadata.annotations ` ` sidecar.opentelemetry.io/inject: llamastack-otelsidecar `
104
+ Similarly, any deployment with the ` template.metadata.annotations ` ` sidecar.opentelemetry.io/inject: llamastack-otelsidecar `
91
105
will receive and export telemetry as configured in the
92
106
[ otel-collector-llamstack-sidecar example] ( ./otel-collector/otel-collector-llamastack-sidecar.yaml ) .
93
107
0 commit comments