Metrics endpoint recursion prevented by skipping self-instrumentation
infoperformanceUpdated Mar 7, 2026(via Exa)
Technologies:
How to detect:
The HTTP middleware automatically excludes the /metrics endpoint from metrics collection to prevent infinite recursion when Prometheus scrapes metrics.
Recommended action:
This is handled automatically by BentoML. If implementing custom metrics middleware, ensure /metrics endpoint is excluded from instrumentation to avoid recursion loops.