|
2 | 2 |
|
3 | 3 | Follow this README to configure an observability stack in OpenShift to visualize Llamastack telemetry and vLLM metrics. |
4 | 4 |
|
| 5 | +## Generate telemetry from Llamastack and vLLM |
| 6 | + |
| 7 | +### vLLM |
| 8 | + |
| 9 | +For vLLM, metrics are generated by default and are exposed at `vllm-endpoint:port/metrics`. For a list of metrics, |
| 10 | +you can `curl localhost:8000/metrics` from within a vLLM container. |
| 11 | + |
| 12 | +### Llamastack |
| 13 | + |
| 14 | +With Llamastack, you need to specify in the run-config.yaml to enable telemetry collection with an opentelemetry receiver. |
| 15 | +Here's how to do that: |
| 16 | + |
| 17 | +#### Updated manifests for telemetry trace collection with opentelemetry receiver endpoint |
| 18 | + |
| 19 | +This is for traces only. There is a similar `otel_metric` sink and `otel_metric_endpoint`, however, there are currently |
| 20 | +only 4 metrics generated within Llamastack, and these are duplicates of what vLLM provides. |
| 21 | + |
| 22 | +[kubernetes/llama-stack/configmap.yaml](../llama-stack/configmap.yaml) |
| 23 | + |
| 24 | +```yaml |
| 25 | +--- |
| 26 | + telemetry: |
| 27 | + - provider_id: meta-reference |
| 28 | + provider_type: inline::meta-reference |
| 29 | + config: |
| 30 | + service_name: ${env.OTEL_SERVICE_NAME:llama-stack} |
| 31 | + sinks: ${env.TELEMETRY_SINKS:console, otel_trace, sqlite} <-add otel_trace and/or otel_metric |
| 32 | + otel_trace_endpoint: ${env.OTEL_TRACE_ENDPOINT:} <-add ONLY if opentelemetry receiver endpoint is available. |
| 33 | +--- |
| 34 | +``` |
| 35 | +And, in [kubernetes/llama-stack/deployment.yaml](../llama-stack/deployment.yaml) |
| 36 | + |
| 37 | +```yaml |
| 38 | +--- |
| 39 | + env: |
| 40 | + - name: OTEL_SERVICE_NAME |
| 41 | + value: llamastack |
| 42 | + - name: OTEL_TRACE_ENDPOINT |
| 43 | + value: http://otel-collector-collector.observability-hub.svc.cluster.local:4318/v1/traces |
| 44 | + #- name: OTEL_METRIC_ENDPOINT |
| 45 | + #- value: http://otel-collector-collector.observability-hub.svc.cluster.local:4318/v1/metrics |
| 46 | +--- |
| 47 | +``` |
| 48 | + |
| 49 | +The otel-endpoint is `http://service-name-otc.namespace-of-otc.svc.cluster.local:4318/v1/traces,metrics` if exporting to |
| 50 | +central otel-collector. If using otel-collector sidecar, this would be `http://localhost:4318/v1/traces`. |
| 51 | + |
5 | 52 | ## OpenShift Observability Operators |
6 | 53 |
|
7 | 54 | Operators are available from OperatorHub |
|
0 commit comments