From 9dccd07ea860efa9bf4ba6bdd50698ef88838df6 Mon Sep 17 00:00:00 2001 From: Kasim Necdet Percinel Date: Wed, 27 May 2026 19:10:17 +0000 Subject: [PATCH] use proxy squid to send sentry errors --- src/Sentry/Client.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Sentry/Client.php b/src/Sentry/Client.php index e7e39c7ba..0e8a3143e 100644 --- a/src/Sentry/Client.php +++ b/src/Sentry/Client.php @@ -18,11 +18,18 @@ class Client implements ClientInterface */ public function __construct(array $config) { - \Sentry\init([ - 'dsn' => $config['dsn'], + $init = [ + 'dsn' => $config['dsn'], 'sample_rate' => (float)$config['sample_rate'], 'environment' => $config['environment'], - ]); + ]; + // Route the SDK's HTTP transport through the same egress proxy other + // outbound clients use (e.g. EventsApi). Without this the SDK goes + // direct and the events POST silently fails behind NDC firewalls. + if (defined('HV_PROXY_HOST') && HV_PROXY_HOST !== '') { + $init['http_proxy'] = HV_PROXY_HOST; + } + \Sentry\init($init); } /**