Class ApplicationInsightsFeatureUsageTrackingSession
- Namespace
- Splat.ApplicationInsights
- Assembly
- Splat.ApplicationInsights.dll
Feature Usage Tracking Client for Application Insights.
public sealed class ApplicationInsightsFeatureUsageTrackingSession : IFeatureUsageTrackingSession<Guid>, IFeatureUsageTrackingSession, IDisposable
- Inheritance
-
ApplicationInsightsFeatureUsageTrackingSession
- Implements
- Extension Methods
Constructors
ApplicationInsightsFeatureUsageTrackingSession(string, TelemetryClient)
Initializes a new instance of the ApplicationInsightsFeatureUsageTrackingSession class.
public ApplicationInsightsFeatureUsageTrackingSession(string featureName, TelemetryClient telemetryClient)
Parameters
featureName
stringThe name of the feature.
telemetryClient
TelemetryClientThe Application Insights telemetry client instance to use.
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 occured in the current tracking session.
public void OnException(Exception exception)
Parameters
exception
ExceptionThe exception that occurred.
SubFeature(string)
Starts a sub-feature usage tracking session on the current session.
public IFeatureUsageTrackingSession SubFeature(string description)
Parameters
description
stringDescription of the sub-feature.
Returns
- IFeatureUsageTrackingSession
The sub-feature usage tracking session.