Show guardrail metrics on the experiment page

Abierto
#9,153 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, python, react

Línea de trabajo

Start in frontend/web/components/experiments/results/ and trace how getPrimaryMetric(experiment) and results.metrics[0] feed the Analysis page. Check the experiment metric configuration for expected_direction and the results API shape described in the issue. Done means the page presents every metric, primary first, with lift, interval, win probability, and guardrail direction and breach status.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Is your feature request related to a problem?

An experiment can have more than one metric, each with an expected_direction, for example a guardrail with not_increase. Flagsmith analyses all of them: GET /api/v1/environments/{key}/experiments/{id}/results/ returns the lift, interval and chance to win for every metric.

But the experiment page only shows the primary metric. The results components use getPrimaryMetric(experiment) and results.metrics[0] (frontend/web/components/experiments/results/). So a guardrail's result, which tells you a winning variant isn't hurting something else, can only be seen through the API.

Example (self-hosted 2.295.2): an experiment with "Subscribe clicks" (increase) and a guardrail, "Help requests" (not_increase). For the guardrail, the API returns a lift of +25.4% with an interval from −22.4% to +73.2%. The page shows only Subscribe clicks.

Describe the solution you'd like.

Show every metric on the experiment page, primary first, each with its lift, credible interval and win probability. Guardrails would be labelled with their expected direction ("should not increase") and with whether their interval suggests a breach. A row or tab per metric under Analysis would do.

Describe alternatives you've considered

Reading the results API directly (we print it from a script), or running one experiment per metric.

Additional context

Experimentation on self-hosted Flagsmith is great: it uses Flagsmith's own Postgres, with no extra infrastructure. The data model already supports guardrails (the configuration card even has a "should not increase" label), so showing them would make them usable from the dashboard.

Found while building flagsmith-toolbar.

Lenguaje dominante
Python
Estrellas
9.9k
Forks
658
Merge medio
1 d 15 h
PR fusionados (30 d)
171

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Flagsmith/flagsmith

Todos los issues de Flagsmith/flagsmith

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.