Microsoft.VisualStudio.Telemetry Namespace



A class that stores information for asset event. Asset is the target of user task or operation, e.g., Solution, Project, File, Extension, License, Designer.


A class to provide help methods for both asset consumer and providers. Consumers can use this class to get correlation via method GetCorrelation. Providers can register existing correlation in this service via method RegisterCorrelation, or(and) register themselves via method RegisterProvider to send asset events and return correlation per consumers' request.


A helper class to validate if event name conforms to data model event name schema, and set properties based on the name. Here's the data model event name schema, It requires that event name is a unique, not null or empty string. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples, vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror;


A telemetry event representing a Fault, such as an exception We have 2 back ends to send data: the Telemetry back end and the Watson (back end). Cross platform, (as on Mac, Linux), we can use the same architecture. For example, on Mac, there's Merp, the Max implementation of Windows Error Reporting. FaultEvent inherits from TelemetryEvent User can create an instance of this class directly and can add custom properties directly on the class without using call back. After creating one of these, call Session.PostFault(faultEvent) which will call the callback, post the event to Watson (if sampled) and Post as a normal telemetry event Or you can use TelemetrySession.PostFault() rather than this class directly.


Abstract base class, serves as a base class for the object creators during deserialize objects from the Json using Newtonsoft.Json


A class that stores information for operation data model event. An operation performs some work in application and comes with result (e.g., Success, Failure). If the operation is invoked by user directly, please use UserTaskEvent or related methods. A few examples of operations are, license check, package load, windows layout loading.

For long-time running or async operation, in order to understand what else happened during the time or track if it partially completes because of an error, use method StartOperation(TelemetrySession, String) which tracks both start and end points.


[OBSOLETE] Please use data model TelemetryScope<T> to track performance in dev15 and above releases. More details is at


This class represents a complex value support, such as arrays, dictionaries. Processor will convert it to the JSON string. Also for such types we relax restrictions of the 1K for the property value.


Telemetry Context is a concept of a unit of work. More details here


This class represents a data model property.


Helper base class to provide virtual method for releasing managed resources and preventing from calling Dispose several times.


The class represents a telemetry event that can be posted to a server. Class is NOT thread-safe


This class is used to represent a telemetry filter by telemetry event name.


This class represents a data model metric property. The property name will be updated with a suffix ".DataModelMetric" when the event is posted. A metric is a value or aggregated count collected as a measurement of a particular characteristic of the system. E.g., usage metrics like file size, project count, upload size; performance metric like duration.


This class represents a personally identifiable information property. During processing the raw value contained will be turned into a hashed value by a cryptology algorithm.


TelemetryPropertyBag is intended for the add properties to the subscibed events


Collections of the property bags


Concurrent property bag


A class that defines the strings used for property Result.


This class is used to send data model events for an application work with duration and result. The event could be either UserTaskEvent or OperationEvent It sends one event at the beginning and the other one at the end of work.


This class is to wrap up settings used to control TelemetryScope behavior when create an instance of it.


Core Telemetry class. It has default session object.


Represents one telemetry session that can post telemetry events and session properties. The API makes the best effort to deliver telemetry data to the server. The requests are queued and sent in batches. The events will be saved locally if they cannot be sent before the process exits. Sending will resume when the next application instance calls the telemetry API. Telemetry may be lost in case of process hang or fatal crash or no Internet connection for 30 days. All methods are thread-safe and return immediately.


Extension methods for TelemetrySession to post command line arguments.


A class to contain all data model extension methods to existing class TelemetrySession.


This class represents a data model setting property. The property name will be updated with a suffix ".DataModelSetting" when the event is posted. A setting is something that user can customize the value to change how the app looks/feels/behaves. E.g., all settings in VS tools options dialog. Machine-level or environmental properties are NOT settings. They should posted as regular properties. E.g., CPU count, OS locale.


Test channel arguments


A class that stores information for user task data model event. A user task is an application operation that is INVOKED BY USER directly and comes with result (e.g., Success, Failure). It is used for user behavior/intent analysis. User is aware of the operation and be able to execute. e.g. Open project and Show tool windows are user tasks; instead load VS package and Design time build are operations.

For long-time running or async user task, in order to understand what else happened during the time or track if it partially completes because of an error, use method StartUserTask(TelemetrySession, String) which tracks both start and end points.



A struct to define correlation information.



An interface implemented by asset provider to offer asset correlate id on-demand.


Interface for FaultCallback used for native code callers too


TelemetryNotificationService.Default and TelemetryService.DefaultSession


Implementation for host specific ETW provider for telemetry events.


Represents a telemetry event filter.


ITelemetryManifestRouteArgs interface for the providing arguments to the router


ITelemetryPropertyBag interface for the generic PropertyBag


Interface for the test channels to receive events



Supported Data model event type


An indicator of the severity of a given fault based on anticipated importance or impact. More severe faults will be promoted higher in reports, and less severe faults will be de-emphasized.


An enum to define operation stage type. Please don't change the enum name because it is part of client-server contract.


An enum to define the result from user task or operation.


An enum to define the severity of the telemetry event. It is used for any data consumer who wants to categorize data based on severity.


Dump type