-
Notifications
You must be signed in to change notification settings - Fork 54
LCORE-380: regenerated schema #275
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
LCORE-380: regenerated schema #275
Conversation
WalkthroughThe OpenAPI specification was updated to add a new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
Client->>API: GET /metrics
API-->>Client: 200 OK (plain text metrics)
Estimated code review effort1 (~2 minutes) Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/openapi.json(4 hunks)
🔇 Additional comments (3)
docs/openapi.json (3)
1096-1114: Schema insertion looks correct
LivenessResponseis now defined before it’s referenced, its title/description are consistent with the other health probes, and no required/optional fields changed.
No issues spotted.
1163-1164: Title typo fixed
LlamaStackConfigurationtitle casing is now consistent with the filename and$refs.
740-741: All$refreferences correctly updatedI ran a search for the old
#/components/schemas/LLamaStackConfigurationstring in docs/openapi.json and found no matches. The schema reference now uses the correct casing throughout. Approving these changes.
| }, | ||
| "/metrics": { | ||
| "get": { | ||
| "tags": [ | ||
| "metrics" | ||
| ], | ||
| "summary": "Metrics Endpoint Handler", | ||
| "description": "Handle request to the /metrics endpoint.", | ||
| "operationId": "metrics_endpoint_handler_metrics_get", | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful Response", | ||
| "content": { | ||
| "text/plain": { | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Clarify metrics response format & hard-code the correct media type
Prometheus/OpenMetrics scrapers expect the response to be served under the text/plain; version=0.0.4 (or application/openmetrics-text) content-type.
Keeping it as a generic text/plain can break auto-discovery and disables content-negotiation.
Consider also specifying a 503 error response for parity with the other health endpoints.
- "text/plain": {
+ "text/plain; version=0.0.4": {
"schema": {
"type": "string"
}
}and optionally append:
"responses": {
"200": { … },
+ "503": {
+ "description": "Service Unavailable"
+ }
}Clarify metrics response media type & add 503 response
Prometheus/OpenMetrics scrapers require the exposition format to be served under text/plain; version=0.0.4 (or application/openmetrics-text) rather than a generic text/plain. Without this, auto-discovery and content-negotiation may break. Also, for consistency with other health endpoints, add a 503 Service Unavailable response.
• File: docs/openapi.json
• Lines: ~596–618
"/metrics": {
"get": {
"tags": [
"metrics"
],
"summary": "Metrics Endpoint Handler",
"description": "Handle request to the /metrics endpoint.",
"operationId": "metrics_endpoint_handler_metrics_get",
"responses": {
- "200": {
- "description": "Successful Response",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
- }
+ "200": {
+ "description": "Successful Response",
+ "content": {
+ "text/plain; version=0.0.4": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Service Unavailable"
+ }
}
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| }, | |
| "/metrics": { | |
| "get": { | |
| "tags": [ | |
| "metrics" | |
| ], | |
| "summary": "Metrics Endpoint Handler", | |
| "description": "Handle request to the /metrics endpoint.", | |
| "operationId": "metrics_endpoint_handler_metrics_get", | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/metrics": { | |
| "get": { | |
| "tags": [ | |
| "metrics" | |
| ], | |
| "summary": "Metrics Endpoint Handler", | |
| "description": "Handle request to the /metrics endpoint.", | |
| "operationId": "metrics_endpoint_handler_metrics_get", | |
| "responses": { | |
| "200": { | |
| "description": "Successful Response", | |
| "content": { | |
| "text/plain; version=0.0.4": { | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| }, | |
| "503": { | |
| "description": "Service Unavailable" | |
| } | |
| } | |
| } | |
| } |
🤖 Prompt for AI Agents
In docs/openapi.json around lines 596 to 618, update the response media type for
the /metrics GET endpoint from "text/plain" to "text/plain; version=0.0.4" or
"application/openmetrics-text" to comply with Prometheus/OpenMetrics
requirements. Additionally, add a 503 Service Unavailable response with an
appropriate description to match other health endpoints for consistency.
Description
LCORE-380: regenerated schema
Type of change
Related Tickets & Documents
Summary by CodeRabbit
New Features
/metricsendpoint for retrieving metrics in plain text format.Documentation