Requests and latency by endpoint, split by client
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #2156 de @alanpeixinho — fusionado
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
Línea de trabajo
Start by reading #2144, get_client_info, and BackendRequestMetricsMiddleware to understand the existing client label and counter. Trace the dashboard panels named in the issue and the existing Django latency histogram. Done means API requests are recorded once with endpoint and client labels, the requested count and p50/p95 panels use the new histogram, and the listed kci-dev, Chrome, curl, and /admin/ cases pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
"Total Calls by Endpoint" and "Average Response Time by Endpoint" both read django_http_requests_latency_seconds_by_view_method, labeled only by view and method. A browser session and a kci-dev call to the same view are one line. The average mixes them, and the board shows no p50 or p95. "Total Calls by Endpoint" is that histogram's _count, not a separate counter.
Ben asked for requests by endpoint, and for p50 and p95, split between the browser and kci-dev. Don asked for webpage use versus API use. Both are the same cut: the dashboard UI and the CLI call the same API.
Almost every view is already under /api/. Outside it, only /admin/ and /health/ exist, and health is already excluded. Timing those API calls again on the Django histogram would duplicate them without a client label.
Proposal
Depends on #2144, which adds client (dashboard, kci-dev, script, bot, unknown) in get_client_info and puts that label on the existing counter dashboard_backend_requests_by_client_total. No new counter.
Record latency once, in BackendRequestMetricsMiddleware, for /api/ only. On that same request, increment the existing counter and observe a histogram labeled by endpoint and client, using the same buckets as the Django latency histogram. The histogram's _count is the latency count. Stop observing django_http_requests_latency_seconds_by_view_method for /api/ requests. Leave that histogram for /admin/. Leave the Django middleware's other counters (status, exceptions) as they are.
Counts. Point "Total Calls by Endpoint" at dashboard_backend_requests_by_client_total, summed by endpoint and client. Filter with client, not a list of browser names. script, bot, and unknown stay on the panel, so the total still matches the counter.
Latency. Point "Average Response Time by Endpoint" and the latency half of "Endpoint Performance Summary" at the new histogram (_sum / _count). Add p50 and p95 from its buckets, split by client.
Tests
- A
kci-dev/<version>request and a Chrome request to the same endpoint land onclient="kci-dev"andclient="dashboard", on the existing counter and on the new histogram, and are not observed ondjango_http_requests_latency_seconds_by_view_method. - A
curl/request lands onclient="script"and stays visible on both. - An
/admin/request is still observed on the Django latency histogram.
- Lenguaje dominante
- Python
- Estrellas
- 10
- Forks
- 32
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 27
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de kernelci/dashboard
-
notifications
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Backend
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Los mantenedores suelen responder en 2 días
-
[Labs] Add a lab details API and lab filters on existing read endpointsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoBackend q4-plan
Dificultad 4/5 3-5 días Aptitud para principiantes 24/100
kernelci/dashboard#2169 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Labs] Design the lab details pagePosiblemente ocupada @alanpeixinho la tomó hace 11 días. AbiertoFrontend q4-plan
Dificultad 5/5 3-5 días Aptitud para principiantes 30/100
kernelci/dashboard#2168 · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de kernelci/dashboard
Issues similares
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freePosiblemente ocupada @Aaqibhafeezkhan la tomó hoy. Abiertobeginner documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BistaDinesh03/critique#164 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug IO
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MrNeRF/LichtFeld-Studio#3824 ·
Los mantenedores suelen responder en 1 día
-
bug confirmed issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-webui/open-webui#33200 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Lychee link check failedAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog checkPosiblemente ocupada @ocelotl la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
open-telemetry/opentelemetry-python#5825 ·
Los mantenedores suelen responder en 2 días