fix(smart-proxy): start metrics polling before certificate provisioning to avoid blocking metrics collection
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-02-14 - 25.2.2 - fix(smart-proxy)
|
||||||
|
start metrics polling before certificate provisioning to avoid blocking metrics collection
|
||||||
|
|
||||||
|
- Start metrics polling immediately after Rust engine startup so metrics are available without waiting for certificate provisioning.
|
||||||
|
- Run certProvisionFunction after startup because ACME/DNS-01 provisioning can hang or be slow and must not block observability.
|
||||||
|
- Code change in ts/proxies/smart-proxy/smart-proxy.ts: metricsAdapter.startPolling() moved to run before provisionCertificatesViaCallback().
|
||||||
|
|
||||||
## 2026-02-14 - 25.2.1 - fix(smartproxy)
|
## 2026-02-14 - 25.2.1 - fix(smartproxy)
|
||||||
no changes detected in git diff
|
no changes detected in git diff
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartproxy',
|
name: '@push.rocks/smartproxy',
|
||||||
version: '25.2.1',
|
version: '25.2.2',
|
||||||
description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.'
|
description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,13 +191,16 @@ export class SmartProxy extends plugins.EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle certProvisionFunction
|
// Start metrics polling BEFORE cert provisioning — the Rust engine is already
|
||||||
await this.provisionCertificatesViaCallback(preloadedDomains);
|
// running and accepting connections, so metrics should be available immediately.
|
||||||
|
// Cert provisioning can hang indefinitely (e.g. DNS-01 ACME timeouts) and must
|
||||||
// Start metrics polling
|
// not block metrics collection.
|
||||||
this.metricsAdapter.startPolling();
|
this.metricsAdapter.startPolling();
|
||||||
|
|
||||||
logger.log('info', 'SmartProxy started (Rust engine)', { component: 'smart-proxy' });
|
logger.log('info', 'SmartProxy started (Rust engine)', { component: 'smart-proxy' });
|
||||||
|
|
||||||
|
// Handle certProvisionFunction (may be slow — runs after startup is complete)
|
||||||
|
await this.provisionCertificatesViaCallback(preloadedDomains);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user