TelemetryClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Send events, metrics and other telemetry to the Application Insights service.
public ref class TelemetryClient sealed
public sealed class TelemetryClient
type TelemetryClient = class
Public NotInheritable Class TelemetryClient
- Inheritance
-
TelemetryClient
Constructors
TelemetryClient() |
Initializes a new instance of the TelemetryClient class. Send telemetry with the active configuration, usually loaded from ApplicationInsights.config. |
TelemetryClient(TelemetryConfiguration) |
Initializes a new instance of the TelemetryClient class. Send telemetry with the specified |
Properties
Context |
Gets the current context that will be used to augment telemetry you send. |
InstrumentationKey |
Gets or sets the default instrumentation key for all ITelemetry objects logged in this TelemetryClient. |
Methods
Flush() |
Flushes channel. |
FlushAndTransmitAsync(CancellationToken) |
Flushes channel and wait until transmit is fully completed. Wait can be cancelled by using CancellationToken. |
IsEnabled() |
Check to determine if the tracking is enabled. |
TrackEvent(EventTelemetry) |
Send an EventTelemetry for display in Diagnostic Search and aggregation in Metrics Explorer. |
TrackEvent(String, IDictionary<String,String>, IDictionary<String,Double>) |
Send an EventTelemetry for display in Diagnostic Search and aggregation in Metrics Explorer. |
TrackException(Exception, IDictionary<String,String>, IDictionary<String,Double>) |
Send an ExceptionTelemetry for display in Diagnostic Search. |
TrackException(ExceptionTelemetry) |
Send an ExceptionTelemetry for display in Diagnostic Search. |
TrackMetric(MetricTelemetry) |
Send a MetricTelemetry for aggregation in Metric Explorer. |
TrackMetric(String, Double, IDictionary<String,String>) |
Send a MetricTelemetry for aggregation in Metric Explorer. |
TrackPageView(PageViewTelemetry) |
Send information about the page viewed in the application. |
TrackPageView(String) |
Send information about the page viewed in the application. |
TrackRequest(RequestTelemetry) |
Send information about a request handled by the application. |
TrackRequest(String, DateTimeOffset, TimeSpan, String, Boolean) |
Send information about a request handled by the application. |
TrackTrace(String, IDictionary<String,String>) |
Send a trace message for display in Diagnostic Search. |
TrackTrace(String, SeverityLevel, IDictionary<String,String>) |
Send a trace message for display in Diagnostic Search. |
TrackTrace(String, SeverityLevel) |
Send a trace message for display in Diagnostic Search. |
TrackTrace(String) |
Send a trace message for display in Diagnostic Search. |
TrackTrace(TraceTelemetry) |
Send a trace message for display in Diagnostic Search. |