github-actions[bot] commited on
Commit
b0ec2bd
·
1 Parent(s): 2951010

Automated deployment from GitHub Actions: 435b14fdc3096553a4ee0fb75c2e2784102943a5

Browse files
Files changed (1) hide show
  1. src/main.py +6 -5
src/main.py CHANGED
@@ -103,11 +103,12 @@ def create_app() -> FastAPI:
103
  app.include_router(admin.router, prefix="/api/v1/admin", tags=["admin"])
104
 
105
  # ── Prometheus metrics (optional) ────────────────────────────
106
- if Instrumentator is not None:
107
- Instrumentator(
108
- should_group_status_codes=True,
109
- should_ignore_untemplated=True,
110
- ).instrument(app).expose(app, endpoint="/metrics")
 
111
 
112
  # ── OpenTelemetry (optional) ─────────────────────────────────
113
  if settings.OTEL_ENABLED and FastAPIInstrumentor is not None:
 
103
  app.include_router(admin.router, prefix="/api/v1/admin", tags=["admin"])
104
 
105
  # ── Prometheus metrics (optional) ────────────────────────────
106
+ # Disabled for HF Spaces deployment due to middleware crash on _IncludedRouter
107
+ # if Instrumentator is not None:
108
+ # Instrumentator(
109
+ # should_group_status_codes=True,
110
+ # should_ignore_untemplated=True,
111
+ # ).instrument(app).expose(app, endpoint="/metrics")
112
 
113
  # ── OpenTelemetry (optional) ─────────────────────────────────
114
  if settings.OTEL_ENABLED and FastAPIInstrumentor is not None: