1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: connection id counting fallback (#9115)

This commit is contained in:
Mateusz Kwasniewski 2025-01-20 09:18:31 +01:00 committed by GitHub
parent 7757012b25
commit 54aebe7b5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,8 +66,10 @@ export function responseTimeMetrics(
req.query.appName;
}
const connectionId = req.headers['x-unleash-connection-id'];
if (connectionId && flagResolver.isEnabled('uniqueSdkTracking')) {
if (flagResolver.isEnabled('uniqueSdkTracking')) {
const connectionId =
req.headers['x-unleash-connection-id'] ||
`${req.headers['unleash-instanceid']}${req.ip}`;
eventBus.emit(SDK_CONNECTION_ID_RECEIVED, connectionId);
}