chore: Added appId and orgId parameters to git analytics events (#23891)

## Description
This PR adds two additional parameters to the analytics events for git -
`appId` and `orgId`

#### PR fixes following issue(s)
Fixes #23347
This commit is contained in:
Nayan 2023-05-31 17:07:27 +06:00 committed by GitHub
parent a08b525007
commit a2df9bc29a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2499,6 +2499,7 @@ public class GitServiceCEImpl implements GitServiceCE {
Map<String, Object> analyticsProps = new HashMap<>();
if (gitData != null) {
analyticsProps.put(FieldName.APPLICATION_ID, gitData.getDefaultApplicationId());
analyticsProps.put("appId", gitData.getDefaultApplicationId());
analyticsProps.put(FieldName.BRANCH_NAME, gitData.getBranchName());
analyticsProps.put("gitHostingProvider", GitUtils.getGitProviderName(gitData.getRemoteUrl()));
}
@ -2509,6 +2510,7 @@ public class GitServiceCEImpl implements GitServiceCE {
}
analyticsProps.putAll(Map.of(
FieldName.ORGANIZATION_ID, defaultIfNull(application.getWorkspaceId(), ""),
"orgId", defaultIfNull(application.getWorkspaceId(), ""),
"branchApplicationId", defaultIfNull(application.getId(), ""),
"isRepoPrivate", defaultIfNull(isRepoPrivate, ""),
"isSystemGenerated", defaultIfNull(isSystemGenerated, "")