ApplicationInsightsFeatureUsageTrackingSession class¶
Defined in
Namespace: Splat.ApplicationInsights
Assembly: Splat.ApplicationInsights.dll
Full name: Splat.ApplicationInsights.ApplicationInsightsFeatureUsageTrackingSession
Modifiers: public sealed
Summary¶
Provides a feature usage tracking session that records feature usage events and exceptions to Azure Application
Insights using a specified telemetry client.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481, net471
Class hierarchy
classDiagram
class ApplicationInsightsFeatureUsageTrackingSession
class IFeatureUsageTrackingSession~Guid~ {
<>
}
IFeatureUsageTrackingSession~Guid~ <|.. ApplicationInsightsFeatureUsageTrackingSession
class IFeatureUsageTrackingSession {
<>
}
IFeatureUsageTrackingSession <|.. ApplicationInsightsFeatureUsageTrackingSession
class IDisposable {
<>
}
IDisposable <|.. ApplicationInsightsFeatureUsageTrackingSession
Implements: IFeatureUsageTrackingSession
Remarks¶
This class is typically used to track the start and end of feature usage, as well as any exceptions that occur during the session. Feature usage events are sent to Application Insights when the session is created and disposed. Sub-features can be tracked by creating nested sessions. This class is not thread-safe; each instance should be used on a single thread.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ApplicationInsightsFeatureUsageTrackingSession](# class. |
Properties¶
| Name | Summary |
|---|---|
| FeatureReference | Gets the current Feature Usage Unique Reference. |
| ParentReference | Gets the unique reference for the Parent Tracking Session, if any. |
| FeatureName | Gets the name of the Feature being tracked. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | |
| SubFeature | Creates a new sub-feature tracking session with the specified description. |
| OnException | Notify the APM toolset an exception has occurred in the current tracking session. |