MetricTracker Class
Definition
Tracker which handles all Metric Telemetry to Application Insights.
[Obsolete("Telemetry is deprecated. See the upgrade guide at https://sqtechdocs.azurewebsites.net/docs/tooltelemetry/index.html")]public sealed class MetricTracker : DynamicTracker, IDynamicMetaObjectProviderInheritance object → DynamicObject → DynamicTracker
Implements IDynamicMetaObjectProvider
Constructors
MetricTracker(TelemetryClient, ConfigurationData, SessionData)
Initializes a new instance of the MetricTracker class.
public MetricTracker(TelemetryClient telemetryClient, ConfigurationData configuration, SessionData session)Parameters
telemetryClient TelemetryClient
The underlying Telemetry Client that handles all telemetry events to Application Insights.
configuration ConfigurationData
A structure that contains all configuration settings for telemetry.
session SessionData
A structure that contains session specific information.
Methods
AdditionalDataValidation(IList)
This method is run once at the start of a TryInvokeMethod call and may be implemented by any classes extending DynamicTracker to perform implementation specific data validation of the parameters passed in.
protected override void AdditionalDataValidation(IList<TelemetryProperty> properties)Parameters
properties IList<TelemetryProperty>
A list of properties from TryInvokeMethod.
Track()
Preforms implementation specific tracking for classes that extend DynamicTracker.
protected override bool Track()Returns
bool
true if tracking was successful, false otherwise.
CollectCustomData()
Performs implementation specific custom data collection for classes that extend DynamicTracker.
protected override void CollectCustomData()