Skip to content

Commit 42c5392

Browse files
committed
add docs for TargetAllocator example
Signed-off-by: sallyom <[email protected]>
1 parent 996cfc1 commit 42c5392

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

kubernetes/observability/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ authenticated stream to the in-cluster TempoStack. For in-cluster only, opentele
6666
metrics. Metrics are sent to the in-cluster user-workload-monitoring prometheus by creating podmonitors and/or servicemonitors.
6767
However, if exporting off-cluster to a 3rd party observability vendor, the collector is necessary for all signals,
6868
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.
7074
7175
#### Central OpenTelemetry Collector
7276

@@ -77,17 +81,27 @@ To create a central opentelemetry-collector, update the
7781
oc apply --kustomize ./otel-collector -n observability-hub
7882
```
7983

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
8195

8296
You can add individual metrics endpoints to the central otel-collector in observability-hub, but
8397
another way is to add otel-collector sidecar containers to individual deployments throughout the
8498
cluster. Paired with an annotation on the deployment, telemetry will be exported as configured.
8599

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`
87101
will receive and export telemetry as configured in the
88102
[otel-collector-vllm-sidecar example](./otel-collector/otel-collector-vllm-sidecar.yaml).
89103

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`
91105
will receive and export telemetry as configured in the
92106
[otel-collector-llamstack-sidecar example](./otel-collector/otel-collector-llamastack-sidecar.yaml).
93107

0 commit comments

Comments
 (0)