Microsoft.VisualStudio.Telemetry Namespace

Classes

AssetEvent

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.

AssetService

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.

DataModelEventNameHelper

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;

FaultEvent

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.

JsonCreationConverter<T>

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

OperationEvent

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.

TelemetryActivity

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

TelemetryComplexProperty

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.

TelemetryContext

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

TelemetryDataModelProperty

This class represents a data model property.

TelemetryDisposableObject

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

TelemetryEvent

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

TelemetryEventMatchByName

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

TelemetryMetricProperty

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.

TelemetryPiiProperty

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

TelemetryPropertyBag is intended for the add properties to the subscibed events

TelemetryPropertyBags

Collections of the property bags

TelemetryPropertyBags.Concurrent<TValue>

Concurrent property bag

TelemetryResultStrings

A class that defines the strings used for property Result.

TelemetryScope<T>

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.

TelemetryScopeSettings

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

TelemetryService

Core Telemetry class. It has default session object.

TelemetrySession

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.

TelemetrySessionCommandLineExtensions

Extension methods for TelemetrySession to post command line arguments.

TelemetrySessionExtensions

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

TelemetrySettingProperty

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.

TelemetryTestChannelEventArgs

Test channel arguments

UserTaskEvent

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.

Structs

TelemetryEventCorrelation

A struct to define correlation information.

Interfaces

IAssetProvider

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

IFaultUtility

Interface for FaultCallback used for native code callers too

ISetTelemetrySession

TelemetryNotificationService.Default and TelemetryService.DefaultSession

ITelemetryEtwProvider

Implementation for host specific ETW provider for telemetry events.

ITelemetryEventMatch

Represents a telemetry event filter.

ITelemetryManifestRouteArgs

ITelemetryManifestRouteArgs interface for the providing arguments to the router

ITelemetryPropertyBag<TValue>

ITelemetryPropertyBag interface for the generic PropertyBag

ITelemetryTestChannel

Interface for the test channels to receive events

Enums

DataModelEventType

Supported Data model event type

FaultSeverity

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.

OperationStageType

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

TelemetryResult

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

TelemetrySeverity

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.

WER_DUMP_TYPE

Dump type https://msdn.microsoft.com/en-us/library/windows/desktop/bb513622(v=vs.85).aspx