Skip to content

Commit 11590f3

Browse files
samikshya-dbclaude
andcommitted
Add proxy support to feature flag fetching
Feature flag fetching was also missing proxy support like telemetry exporter was. Applied the same fix: - Get HTTP agent from connection provider - Pass agent to fetch call for proxy support - Follows same pattern as CloudFetchResultHandler and DBSQLSession - Supports http/https/socks proxies with authentication This completes proxy support for all HTTP operations in the telemetry system (both telemetry export and feature flag fetching). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 42540bc commit 11590f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/telemetry/FeatureFlagCache.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,19 @@ export default class FeatureFlagCache {
127127

128128
logger.log(LogLevel.debug, `Fetching feature flags from ${endpoint}`);
129129

130-
// Make HTTP GET request with authentication
130+
// Get agent with proxy settings (same pattern as CloudFetchResultHandler and DBSQLSession)
131+
const connectionProvider = await this.context.getConnectionProvider();
132+
const agent = await connectionProvider.getAgent();
133+
134+
// Make HTTP GET request with authentication and proxy support
131135
const response = await fetch(endpoint, {
132136
method: 'GET',
133137
headers: {
134138
...authHeaders,
135139
'Content-Type': 'application/json',
136140
'User-Agent': `databricks-sql-nodejs/${driverVersion}`,
137141
},
142+
agent, // Include agent for proxy support
138143
});
139144

140145
if (!response.ok) {

0 commit comments

Comments
 (0)