Class RaygunFeatureUsageTrackingSession
- Namespace
- Splat
- Assembly
- Splat.Raygun.dll
Represents a feature usage tracking session that reports feature usage events to Raygun.
public sealed class RaygunFeatureUsageTrackingSession : IFeatureUsageTrackingSession<Guid>, IFeatureUsageTrackingSession, IDisposable
- Inheritance
-
RaygunFeatureUsageTrackingSession
- Implements
- Extension Methods
Remarks
This class is used to track the usage of a specific feature within an application and send usage events to Raygun for monitoring and analytics. Each session is associated with a unique feature reference and can be used to create sub-feature tracking sessions. Instances of this class are intended to be short-lived and disposed of when tracking is complete.
Constructors
RaygunFeatureUsageTrackingSession(string, RaygunClient, RaygunSettings)
Initializes a new instance of the RaygunFeatureUsageTrackingSession class for tracking usage of a specific feature as a root-level session.
public RaygunFeatureUsageTrackingSession(string featureName, RaygunClient raygunClient, RaygunSettings raygunSettings)
Parameters
featureNamestringThe name of the feature to be tracked. Cannot be null or empty.
raygunClientRaygunClientThe RaygunClient instance used to send feature usage data. Cannot be null.
raygunSettingsRaygunSettingsThe RaygunSettings instance that configures feature usage tracking. Cannot be null.
Properties
FeatureName
Gets the name of the Feature being tracked.
public string FeatureName { get; }
Property Value
FeatureReference
Gets the current Feature Usage Unique Reference.
public Guid FeatureReference { get; }
Property Value
ParentReference
Gets the unique reference for the Parent Tracking Session, if any.
public Guid ParentReference { get; }
Property Value
Methods
Dispose()
public void Dispose()
OnException(Exception)
Notify the APM toolset an exception has occurred in the current tracking session.
public void OnException(Exception exception)
Parameters
exceptionExceptionThe exception that occurred.
SubFeature(string)
Creates a new sub-feature tracking session with the specified description.
public IFeatureUsageTrackingSession SubFeature(string description)
Parameters
descriptionstringA string that describes the sub-feature to be tracked. Cannot be null or empty.
Returns
- IFeatureUsageTrackingSession
An IFeatureUsageTrackingSession instance for tracking usage of the specified sub-feature.
Remarks
Use sub-feature tracking sessions to record usage metrics for distinct operations or components within a larger feature. Each sub-feature session is independent and should be disposed when tracking is complete.