Align observability with OpenTelemetry conventions and isolate telemetry failures
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
Línea de trabajo
Comienza con el issue relacionado #18 y, después, haz un inventario del middleware HTTP, las métricas, el logging, la instrumentación HTTP saliente, los exporters y los consumidores del paquete. Traza los flujos de FastAPI, Flask, CORS, streaming y shutdown antes de decidir qué debe formar parte de las integraciones estándar de OpenTelemetry. Se considera terminado cuando la telemetría no se duplica, los fallos recuperables de telemetría no hacen fallar las solicitudes de la aplicación y los comportamientos solicitados están cubiertos por pruebas y documentación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
This package combines custom request middleware and metrics with OpenTelemetry's HTTP instrumentation. The overlapping paths make request telemetry harder to reason about, can produce duplicate or inconsistent measurements, and leave application availability dependent on instrumentation behavior. In #18, an incompatibility in OpenTelemetry's FastAPI instrumentation caused CORS preflight requests in PolicyEngine/policyengine-uk-chat#167 to return 500; catching errors only when instrumentation is installed did not protect requests afterward.
Proposed work
- Inventory the package's HTTP request spans, metrics, logging, outbound HTTP instrumentation, exporters, and their consumers. Decide which functionality belongs in standard OpenTelemetry instrumentation and which PolicyEngine-specific measurements still need custom code. Avoid duplicate request instrumentation and align retained metrics and attributes with OpenTelemetry conventions.
- Simplify the package around standard OpenTelemetry APIs and supported framework integrations. Preserve useful application-specific logging and timing without duplicating generic HTTP telemetry; make the enabled integrations and dependency compatibility explicit.
- Ensure recoverable telemetry failures during setup, request processing, export, and shutdown cannot turn an otherwise successful application operation into a failure. Do not suppress exceptions raised by the application itself or run a request a second time. Address the active-request metric's mismatched increment/decrement attributes as part of the redesign.
- Add tests for successful and failing application requests when telemetry fails, plus relevant FastAPI (including CORS), Flask, outbound HTTP, streaming, and shutdown behavior. Verify the resulting metrics and spans are not duplicated and document any changes that consumers need to make.
Outcome
Services retain useful request and application telemetry through a simpler, conventional OpenTelemetry integration, while a telemetry defect cannot by itself make an otherwise healthy service fail.
Related: #18, #27, PolicyEngine/policyengine-uk-chat#167.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 7 h 49 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni 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 PolicyEngine/policyengine-observability
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de PolicyEngine/policyengine-observability
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitPosiblemente ocupada @MohabMohie la tomó hoy. Abiertoagentic
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
huggingface/smolagents#3045 ·
Los mantenedores suelen responder en 1 día