Skip to content

Commit

Permalink
feat: add oid to ai logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Dec 12, 2023
1 parent 1c01e7e commit e7608e1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/shared/src/packages/fusion-framework/createRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export function createRender(
config: {
connectionString: connectionString,
enableResponseHeaderTracking: true,
accountId: tryGetAccountId(args),
enableAjaxPerfTracking: true,
},
});
appInsights.loadAppInsights();
Expand Down Expand Up @@ -77,6 +79,14 @@ export function createRender(
};
}

function tryGetAccountId(args: ComponentRenderArgs) {
try {
return args.fusion.modules.auth.defaultAccount?.localAccountId;
} catch (e) {
return '';
}
}

const queryClient = new QueryClient();
function createPrLabel(prNumber: string, el: HTMLElement): VoidFunction {
const child = document.createElement('div');
Expand Down

0 comments on commit e7608e1

Please sign in to comment.