1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00

feat: connection id counting fallback ()

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; req.query.appName;
} }
const connectionId = req.headers['x-unleash-connection-id']; if (flagResolver.isEnabled('uniqueSdkTracking')) {
if (connectionId && flagResolver.isEnabled('uniqueSdkTracking')) { const connectionId =
req.headers['x-unleash-connection-id'] ||
`${req.headers['unleash-instanceid']}${req.ip}`;
eventBus.emit(SDK_CONNECTION_ID_RECEIVED, connectionId); eventBus.emit(SDK_CONNECTION_ID_RECEIVED, connectionId);
} }