prometheus/web
Ben Blackmore 31f046f416
feat: add destroy() method to PromQLExtension for memory leak prevention
When React components mount/unmount repeatedly, each creating a new
PromQLExtension, memory leaks occur due to LRU caches with ttlAutopurge
timers keeping references alive and in-flight HTTP requests holding
closure references. This adds destroy() methods throughout the class
hierarchy to properly release resources on unmount.

Changes:
- Add destroy() to PrometheusClient interface (optional)
- HTTPPrometheusClient: track AbortControllers and abort pending requests
- Cache: clear all LRU caches and reset cached data
- CachedPrometheusClient: delegate to cache and underlying client
- HybridComplete: delegate to prometheusClient
- CompleteStrategy: add optional destroy() method
- PromQLExtension: delegate to complete strategy

Signed-off-by: Ben Blackmore <ben.blackmore@dash0.com>
2025-12-29 08:27:56 +01:00
..
api/v1 Merge pull request #17427 from roidelapluie/roidelapluie/ffapi 2025-12-10 10:14:03 +01:00
ui feat: add destroy() method to PromQLExtension for memory leak prevention 2025-12-29 08:27:56 +01:00
federate.go web: Add NHCB support to federation 2025-09-25 15:54:27 +02:00
federate_test.go Phase out native histogram feature flag 2025-10-15 14:50:52 +02:00
web.go API: Add a /api/v1/features endpoint 2025-12-09 16:13:14 +01:00
web_test.go Update modernize (#17471) 2025-11-04 05:13:49 +00:00