Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Loading Analytics #11366

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/DynamoPackages/DynamoPackages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
<Name>DynamoUtilities</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\NodeServices\DynamoServices.csproj">
<Project>{ef879a10-041d-4c68-83e7-3192685f1bae}</Project>
<Name>DynamoServices</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
9 changes: 9 additions & 0 deletions src/DynamoPackages/PackageManagerExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ private void OnPackageLoaded(Package package)
}
CustomNodePackageDictionary[cn.FunctionId].Add(new PackageInfo(package.Name, new Version(package.VersionName)));
}
Dynamo.Logging.Analytics.TrackEvent(
Actions.Load,
Categories.PackageManagerOperations,
package.Name);
}

private void OnPackageRemoved(Package package)
Expand Down Expand Up @@ -328,6 +332,11 @@ private void OnPackageRemoved(Package package)
CustomNodePackageDictionary.Remove(cn.FunctionId);
}
}

Dynamo.Logging.Analytics.TrackEvent(
Actions.Delete,
Categories.PackageManagerOperations,
package.Name);
}

#endregion
Expand Down
7 changes: 6 additions & 1 deletion src/NodeServices/IAnalyticsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public enum Categories
/// Events Category related to View Extensions operations
/// </summary>
ViewExtensionOperations,

/// <summary>
/// Events Category related to package manager operations
/// </summary>
PackageManagerOperations,
}

/// <summary>
Expand Down Expand Up @@ -199,7 +204,7 @@ public enum Actions
Run,

/// <summary>
/// Load event, such as extensions loaded
/// Load event, such as extensions loaded, package loaded
/// </summary>
Load,

Expand Down