Local evaluation: a failed background flag config poll is logged at debug only
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nodejs, typescript
- Área
- observability
Línea de trabajo
La corrección está en FlagConfigPoller.start() en packages/node/src/local/poller.ts, donde el bloque catch del update() periódico registra en debug. Compáralo con el log de error [Experiment] cohort poll failed en packages/node/src/local/cohort/poller.ts. Está terminado cuando un sondeo periódico fallido de la configuración de flags se registra a nivel de error, de modo que se muestre con el valor predeterminado LogLevel.Error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected Behavior
When the local evaluation client's background poll for flag configs fails, the failure is logged at a level that reaches the application's logs under the default logLevel (LogLevel.Error), the same way CohortPoller already reports a failed cohort poll:
Current Behavior
FlagConfigPoller.start() catches the periodic update() failure and logs it at debug:
} catch (e) {
this.logger.debug('[Experiment] flag config update failed', e);
}
With the default LogLevel.Error the line never appears, so a client that stopped receiving flag updates keeps serving its last configs silently. Only the initial poll in start() is logged at error. The only way to see the periodic failure today is logLevel: LogLevel.Debug, which also emits a line per poll and per evaluateV2 call.
This matters because for local evaluation the poll is the only path a dashboard change (including turning a flag off) reaches the process.
Possible Solution
Log the periodic poll failure at error, matching [Experiment] cohort poll failed in the same package. One-line change in packages/node/src/local/poller.ts; PR to follow.
Steps to Reproduce
Experiment.initializeLocal(key)with default config,await client.start().- Make
https://flag.lab.amplitude.comunreachable (e.g. block it or drop the network). - Wait past
flagConfigPollingIntervalMillis(30s). - Nothing is logged;
evaluateV2keeps returning results from the last successful poll.
Environment
- JS Server SDK Version: 1.13.6 (same on
main) - Installation Method: npm / pnpm
- Runtime: Node 24
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 9
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 amplitude/experiment-node-server
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
user_properties from ExperimentUser are not forwarded to exposure/assignment eventsPosiblemente ocupada @FabricioFFC la tomó hace 266 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
amplitude/experiment-node-server#72 · 3 comentarios ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
amplitude/experiment-node-server#69 · 1 comentario ·
-
NextJS Amplitude Cookie ExampleAbiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
amplitude/experiment-node-server#38 · 2 comentarios · 3 reacciones ·
-
ssr-demo needs react 18Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Todos los issues de amplitude/experiment-node-server
Issues similares
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Export the Hemi Earn Router address and the Router and Agent ABIs from `@vetro-protocol/earn`Abiertohemi-earn
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vetro-protocol/vetro-monorepo#1043 ·
Los mantenedores suelen responder en 1 día
-
stage 2: bare names resolve against PATH differently from the shell (empty and relative entries)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
STRML/omp-classifier#206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
atlassian-labs/mermaid-diagrams-viewer#188 ·
Los mantenedores suelen responder en 1 día
-
dashboard enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Olanetsoft/agent-lookout#225 ·
Los mantenedores suelen responder en 1 día