Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Align observability with OpenTelemetry conventions and isolate telemetry failures

Abierto
#20 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
fastapi, flask, python

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

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 PolicyEngine/policyengine-observability

Todos los issues de PolicyEngine/policyengine-observability

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.