@@ -6,7 +6,7 @@ let logClient: LogClient | undefined;
66let isInitializing = false ;
77let initPromise : Promise < LogClient > | undefined = undefined ;
88
9- export async function getLogClient ( account : string , workspace : string ) : Promise < LogClient > {
9+ export async function getLogClient ( account : string , workspace : string , appName : string ) : Promise < LogClient > {
1010
1111 if ( logClient ) {
1212 return logClient ;
@@ -17,12 +17,12 @@ export async function getLogClient(account: string, workspace: string): Promise<
1717 }
1818
1919 isInitializing = true ;
20- initPromise = initializeClient ( account , workspace ) ;
20+ initPromise = initializeClient ( account , workspace , appName ) ;
2121
2222 return initPromise ;
2323}
2424
25- async function initializeClient ( account : string , workspace : string ) : Promise < LogClient > {
25+ async function initializeClient ( account : string , workspace : string , appName : string ) : Promise < LogClient > {
2626 try {
2727 const telemetryClient = await getTelemetryClient ( ) ;
2828
@@ -38,7 +38,7 @@ async function initializeClient(account: string, workspace: string): Promise<Log
3838 const logsExporter = Exporters . CreateExporter ( logsConfig , 'otlp' ) ;
3939 await logsExporter . initialize ( ) ;
4040
41- const clientKey = `${ account } -${ workspace } ` ;
41+ const clientKey = `${ account } -${ workspace } - ${ appName } ` ;
4242 logClient = await telemetryClient . newLogsClient ( {
4343 exporter : logsExporter ,
4444 loggerName : `node-vtex-api-${ clientKey } ` ,
0 commit comments