Table of Contents

Class ExceptionlessFeatureUsageTrackingSession

Namespace
Splat
Assembly
Splat.Exceptionless.dll

Represents a feature usage tracking session that reports usage and exceptions to Exceptionless using unique identifiers for each feature instance.

public sealed class ExceptionlessFeatureUsageTrackingSession : IFeatureUsageTrackingSession<Guid>, IFeatureUsageTrackingSession, IDisposable
Inheritance
ExceptionlessFeatureUsageTrackingSession
Implements
Extension Methods

Remarks

This class is used to track the usage of a specific feature within an application and to report exceptions that occur during the session. Each session is associated with a unique feature reference and can create sub-feature sessions for hierarchical tracking. Feature usage and exceptions are automatically submitted to Exceptionless upon session creation and when exceptions are reported. This class is not thread-safe and is intended for use within a single logical operation or request.

Constructors

ExceptionlessFeatureUsageTrackingSession(string)

Initializes a new instance of the ExceptionlessFeatureUsageTrackingSession class.

public ExceptionlessFeatureUsageTrackingSession(string featureName)

Parameters

featureName string

Name of the feature.

Properties

FeatureName

Gets the name of the Feature being tracked.

public string FeatureName { get; }

Property Value

string

FeatureReference

Gets the current Feature Usage Unique Reference.

public Guid FeatureReference { get; }

Property Value

Guid

ParentReference

Gets the unique reference for the Parent Tracking Session, if any.

public Guid ParentReference { get; }

Property Value

Guid

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

exception Exception

The exception that occurred.

SubFeature(string)

Creates a new sub-feature tracking session with the specified description.

public IFeatureUsageTrackingSession SubFeature(string description)

Parameters

description string

A 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.