Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
Update Application Insights tracking for custom events by adding user-specific properties such as UserId, TenantId, Local, UserRole, and IsAuthenticated. These properties are prefixed with user_ (e.g., user_Local, user_IsAuthenticated) by convention, ensuring consistency and enhancing the clarity of user-related data in telemetry.
The creation of telemetry events has also been simplified to reduce errors. Event names are now derived using GetType().Name instead of nameof(EventName), avoiding issues from copy-pasting, such as when UserUpdated events were incorrectly named as UserCreated.
Additionally, telemetry tracking is now updated to collect UserId and TenantId specifically in unauthenticated login flows and admin role changes, ensuring precise event data collection for critical user actions.
Checklist
[x] I have added a Label to the pull-request
[x] I have added tests, and done manual regression tests
[x] I have updated the documentation, if necessary
Summary & Motivation
Update Application Insights tracking for custom events by adding user-specific properties such as
UserId
,TenantId
,Local
,UserRole
, andIsAuthenticated
. These properties are prefixed withuser_
(e.g.,user_Local
,user_IsAuthenticated
) by convention, ensuring consistency and enhancing the clarity of user-related data in telemetry.The creation of telemetry events has also been simplified to reduce errors. Event names are now derived using
GetType().Name
instead ofnameof(EventName)
, avoiding issues from copy-pasting, such as whenUserUpdated
events were incorrectly named asUserCreated
.Additionally, telemetry tracking is now updated to collect
UserId
andTenantId
specifically in unauthenticated login flows and admin role changes, ensuring precise event data collection for critical user actions.Checklist