Skip to content
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

Refactor Prometheus Metrics Logic and Added to Docs #127

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions docs/observability-prometheus-metrics-in-jetstream-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ jetstream_prefill_backlog_size{id="SOME-HOSTNAME-HERE>"} 0.0
jetstream_slots_used_percentage{id="<SOME-HOSTNAME-HERE>",idx="0"} 0.04166666666666663
```

Currently the following metrics are supported:
- `jetstream_prefill_backlog_size`: Size of prefill queue
- `jetstream_transfer_backlog_size`: Size of transfer queue
- `jetstream_generate_backlog_size`: Size of generate queue
- `jetstream_queue_duration`: The total time each request spends enqueued in seconds
- `jetstream_slots_used_percentage`: The percentage of decode slots currently being used
- `jetstream_server_startup_latency`: Total time taken to start the Jetstream server
- `jetstream_request_input_length`: Number of input tokens per request
- `jetstream_request_output_length`: Number of output tokens per request
- `jetstream_request_success_count`: Number of requests successfully completed
- `jetstream_time_to_first_token`: Time to first token per request in seconds
- `jetstream_time_per_output_token`: Average time per output token per request in seconds
- `jetstream_time_per_prefill_token`: Prefill time per token per request in seconds
- `jetstream_time_per_request`: End to end request latency in seconds
- `jetstream_wait_time_per_request`: Time each request is not being prefilled or decoded

## Observe metrics on GKE clusters

The following applies only for Jetstream deployed on a GKE cluster. Currently [Google Cloud Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus) is enabled by default on all GKE clusters, it determines scrape targets via the [PodMonitoring](https://github.com/GoogleCloudPlatform/prometheus-engine/blob/v0.10.0/doc/api.md#podmonitoring) custom resource. After you deployed the JetStream GKE workload, you need to apply the PodMonitoring resource to your cluster as follows:
Expand Down
Loading
Loading