-
Notifications
You must be signed in to change notification settings - Fork 2
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
RUM Support for Raygun4Maui #16
Conversation
Implemented: Page tracking/load times Sessions User tracking Custom timings Network tracking - Attempted Packages added: Newtonsoft (for serialization) Todo: Review architecture Clean-up implementation
Added Android app lifecycle events and fixed the RaygunAppEventPublisher where multiple listeners were added to pages because of duplicate AppStarted events.
Requires testing
Disabled networking as it does not work on iOS and Android
The library was previously compiled for iPhoneOS arm64, and iPhoneSimulator x64 as it was compiled before Apple Silicon. This would prevent the project form being compiled as it would try linking the arm64 iPhoneSimulator to the x64 library. The library has now been compiled for iPhoneOS arm64, and iPhoneSimulator arm64/x64.
Also fixes issue where requests to api.raygun.com/entries and /events were not being ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkpoint, submitting my comments so far while I review the remaining files
Raygun4Maui/MauiRUM/EventTrackers/Apple/RaygunAppleNativeNetworkMonitor.cs
Outdated
Show resolved
Hide resolved
Raygun4Maui/MauiRUM/EventTrackers/Android/RaygunAndroidNativeNetworkTracker.cs
Outdated
Show resolved
Hide resolved
Fixes spelling issues and removes dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, thanks for changing the default EnableRealUserMonitoring
value!
Just a list of minor stuff pretty much 🙂
Raygun4Maui/MauiRUM/EventTrackers/Windows/RaygunWindowsNetworkMonitor.cs
Show resolved
Hide resolved
Raygun4Maui/MauiRUM/EventTrackers/Apple/RaygunAppleNativeNetworkMonitor.cs
Outdated
Show resolved
Hide resolved
Raygun4Maui/RaygunMauiClient.cs
Outdated
} | ||
|
||
public RaygunMauiClient(string apiKey) : base(apiKey) | ||
// TODO: Will this actually be used, and how does it work with IRaygunUserProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have these questions been answered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, @phillip-haydon any thoughts on if we should be using an IOptions instantiation of the Raygun4MauiClient? Currently, through our extension methods, we do not hit this code path so it likely does not need to be supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, got a couple of questions and some OCD kicking off.
CHANGE-LOG.md
Outdated
- Native iOS Timings | ||
- iOS/MacCatalyst specific | ||
- Network Timings | ||
- See README.md for support information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a link to the readme.
Raygun4Maui/MauiRUM/EventTrackers/Windows/RaygunWindowsNetworkMonitor.cs
Show resolved
Hide resolved
mauiAppBuilder.Services.AddSingleton<IRaygunMauiUserProvider, RaygunMauiUserProvider>(); | ||
|
||
mauiAppBuilder.Services.AddSingleton<IRaygunUserProvider>(sp => sp.GetRequiredService<IRaygunMauiUserProvider>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done so when we inject the IRaygunUserProvider or IRaygunMauiUserProvider and receive the same instance.
This allows the RaygunClient to get an instance of IRaygunUserProvider that will have the same user as available to RUM. Aliasing like this also allows for injection of the IRaygunMauiUserProvider so we do not have to cast to IRaygunMauiUserProvider to call SetUser.
public static MauiAppBuilder AddRaygunUserProvider<T>(this MauiAppBuilder mauiAppBuilder) where T : class, IRaygunMauiUserProvider | ||
{ | ||
mauiAppBuilder.Services.AddSingleton<IRaygunMauiUserProvider, T>(); | ||
return mauiAppBuilder; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only need to add an implementation for the IRaygunMauiUserProvider when setting a custom user provider due to the way it was implemented as mentioned above
Raygun4Maui v2.0.0
Adds support for Real User Monitoring (RUM) for Windows, Android, iOS, and MacCatalyst
Implemented RUM Features:
Provider Changes
Raygun4MauiSettings
no longer inherits fromRaygunLoggerConfiguration
RaygunSettings
andRaygunLoggerConfiguration
are now child elementsRaygunLoggerConfiguration
no longer inheritsRaygunSettings
.AddRaygun4Maui
to.AddRaygun
appsettings.json
style configuration optionsappsettings.json
configuration method with anAction<Raygun4MauiSettings>
to change settings at runtime.AddRaygun(Raygun4MauiSettings)
- other two are more recommendedIgnoredViews
a list of views to ignore when trackingIgnoredUrls
a list of url's to ignore when trackingRumApiEndpoint
endpoint to where the RUM data is sentEnableRealUserMonitoring
to enable RUM - defaults totrue
RumFeatureFlags
a enum flag to enable specific RUM features, (e.g. RumFeatures.Page | RumFeatures.Network)Raygun4MauiSettings
to service provider for DI dependent services to edit itThrottledBackgroundMessageProcessor
User
andUserInfo
in the Raygun clientUser
andUserInfo
are no longer supported in Raygun4MauiRaygunSettings
object