Skip to content

OSDOCS-14344: adds OTEL for AI model-server metrics MicroShift #92392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions microshift_ai/microshift-rhoai.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ include::modules/microshift-rhoai-servingruntimes-ex.adoc[leveloffset=+1]

include::modules/microshift-rhoai-inferenceservice-ex.adoc[leveloffset=+1]

include::modules/microshift-rhoai-export-metrics-otel.adoc[leveloffset=+2]

include::modules/microshift-inferenceservice-more-options.adoc[leveloffset=+2]

include::modules/microshift-rhoai-model-serving-rt-verify.adoc[leveloffset=+1]
Expand Down
4 changes: 2 additions & 2 deletions modules/microshift-inferenceservice-more-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//
// * microshift_ai/microshift-rhoai.adoc

:_mod-docs-content-type: CONCEPT
:_mod-docs-content-type: REFERENCE
[id="microshift-rhoai-inferenceservice-more-options_{context}"]
= More InferenceService CRD options
= More InferenceService CR options

The inference service YAML file can include many different options. For example, you can include a `resources` section that is passed first to the deployment and then to the pod, so that the model server gets access to your hardware through the device plugin.

Expand Down
39 changes: 39 additions & 0 deletions modules/microshift-rhoai-export-metrics-otel.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Module included in the following assemblies:
//
// * microshift_ai/microshift-rhoai.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-rhoai-export-metrics-otel_{context}"]
= Exporting model-server metrics by using Open Telemetry

You can export model-server metrics by using Open Telemetry if you installed the `microshift-observability` RPM for {microshift-short}.

[NOTE]
====
You can alternatively get the Prometheus-format metrics of the model server by making a request on the `/metrics` endpoint. See "Getting the model-server metrics" for more information.
====

.Prerequisites

* You configured the `ServingRuntimes` CR.
* You have root user access to your machine.
* The {oc-first} is installed.
* You installed the `microshift-observability` RPM.
* Your {microshift-short} Open Telemetry configuration includes the Prometheus Receiver. For more information, see link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/red_hat_build_of_opentelemetry/configuring-the-collector#prometheus-receiver_otel-collector-receivers[Prometheus Receiver].

.Procedure

* Add the following Open Telemetry annotation to your `InferenceService` custom resource:
+
.Example `InferenceService` object with Open Telemetry
[source,yaml]
----
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: ovms-resnet50
#...
annotations:
prometheus.io/scrape: "true"
#...
----
5 changes: 5 additions & 0 deletions modules/microshift-rhoai-get-model-server-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

After making a query, you can get the model server's metrics to identify bottlenecks, optimize resource allocation, and ensure efficient infrastructure utilization.

[NOTE]
====
You can alternatively configure Open Telemetry for {microshift-short} to get model-server metrics. See "Adding Open Telemetry to an InferenceService custom resource" for more information.
====

.Prerequisites

* The {microshift-short} cluster is running.
Expand Down