Skip to content

Commit e8c2033

Browse files
samikshya-dbclaude
andcommitted
Update DatabricksTelemetryExporter to use authenticated export
- Use getAuthHeaders() method for authenticated endpoint requests - Remove TODO comments about missing authentication - Add auth headers when telemetryAuthenticatedExport is true Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e357588 commit e8c2033

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/telemetry/DatabricksTelemetryExporter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,16 @@ export default class DatabricksTelemetryExporter {
203203
`Exporting ${metrics.length} telemetry metrics to ${authenticatedExport ? 'authenticated' : 'unauthenticated'} endpoint`
204204
);
205205

206+
// Get authentication headers if using authenticated endpoint
207+
const authHeaders = authenticatedExport ? await this.context.getAuthHeaders() : {};
208+
206209
// Make HTTP POST request
207-
// Note: In production, auth headers would be added via connectionProvider
208210
const response: Response = await this.fetchFn(endpoint, {
209211
method: 'POST',
210212
headers: {
213+
...authHeaders,
211214
'Content-Type': 'application/json',
212215
'User-Agent': this.userAgent,
213-
// Note: ConnectionProvider may add auth headers automatically
214-
// via getThriftConnection, but for telemetry we use direct fetch
215-
// In production, we'd need to extract auth headers from connectionProvider
216216
},
217217
body: JSON.stringify(payload),
218218
});

0 commit comments

Comments
 (0)