()
| 27 | * Returns the current User-Agent value for instrumentation |
| 28 | */ |
| 29 | export function getUserAgent(): string { |
| 30 | const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' '); |
| 31 | // only prepend the appIdentifier when its not empty |
| 32 | return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent; |
| 33 | } |