Microsoft.VisualStudio.Telemetry Represents a communication channel for sending telemetry to Application Insights via HTTPS. There will be a buffer that will not be persisted, to enforce the queued telemetry items to be sent, should be caller. Initializes a new instance of the class. Initializes a new instance of the class. Used in unit tests for constructor injection. The telemetry buffer that will be used to enqueue new events. The in memory transmitter that will send the events queued in the buffer. Gets or sets a value indicating whether developer mode of telemetry transmission is enabled. Gets or sets the sending interval. Once the interval expires, serializes the accumulated telemetry items for transmission and sends it over the wire. Gets or sets the HTTP address where the telemetry is sent. Gets or sets the maximum telemetry batching interval. Once the interval expires, serializes the accumulated telemetry items for transmission. Gets or sets the maximum number of telemetry items will accumulate in a memory before the serializing them for transmission to Application Insights. Sends an instance of ITelemetry through the channel. Will send all the telemetry items stored in the memory. Flushes the in-memory buffer and transmit data asynchronously. Disposing the channel. Disposes managed and unmanaged resources held by this object. if this object is being disposed; otherwise . A transmitter that will immediately send telemetry over HTTP. Telemetry items are being sent when Flush is called, or when the buffer is full (An OnFull "event" is raised) or every 30 seconds. A lock object to serialize the sending calls from Flush, OnFull event and the Runner. The number of times this object was disposed. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Flushes the in-memory buffer and sends it. Flushes the in-memory buffer and sends the telemetry items in intervals or when is set. Happens when the in-memory buffer is full. Flushes the in-memory buffer and sends the telemetry items. Flushes the in-memory buffer and send it. Serializes a list of telemetry items and sends them. A representing the asynchronous operation. The base telemetry type for application insights. Gets or sets date and time when telemetry was recorded. Gets the context associated with this telemetry instance. Gets or sets the value that defines absolute order of the telemetry item. The sequence is used to track absolute order of uploaded telemetry items. It is a two-part value that includes a stable identifier for the current boot session and an incrementing identifier for each event added to the upload queue: For UTC this would increment for all events across the system. For Persistence this would increment for all events emitted from the hosting process. The Sequence helps track how many events were fired and how many events were uploaded and enables identification of data lost during upload and de-duplication of events on the ingress server. From . Sanitizes the properties of the telemetry item based on DP constraints. Represents a communication channel for sending telemetry to application insights. Gets or sets a value indicating whether this channel is in developer mode. Gets or sets the endpoint address of the channel. Sends an instance of ITelemetry through the channel. Flushes the in-memory buffer. Flushes the in-memory buffer and transmit data asynchronously. Serializes and compress the telemetry items into a JSON string. Compression will be done using GZIP, for Windows Phone 8 compression will be disabled because there is API support for it. Serializes and compress the telemetry items into a JSON string. Each JSON object is separated by a new line. The list of telemetry items to serialize. Should serialization also perform compression. The compressed and serialized telemetry items. Serialize and compress a telemetry item. A telemetry item. Should serialization also perform compression. The compressed and serialized telemetry item. Serializes into a JSON string. Each JSON object is separated by a new line. The list of telemetry items to serialize. A JSON string of all the serialized items. Serializes a into a JSON string. The telemetry to serialize. A JSON string of the serialized telemetry. Creates a GZIP compression stream that wraps . For windows phone 8.0 it returns . Serializes and write the response to . Serializes this object in JSON format. Accumulates items for efficient transmission. Delegate that is raised when the buffer is full. Gets or sets the maximum number of telemetry items that can be buffered before transmission. The value is zero or less. Implements an asynchronous transmission of data to an HTTP POST endpoint. Initializes a new instance of the class. Initializes a new instance of the class. The 68 char ingestion key from aria used for Collector Used to set the timeout period for the transmission. The timeout to set. Initializes a new instance of the class. This overload is for Test purposes. Gets the Address of the endpoint to which transmission will be sent. Gets the content of the transmission. Gets content hash, which should be unique per content. For perf reason it is calculated only when requested for the first time. Gets the content's type of the transmission. Gets the encoding method of the transmission. Gets a timeout value for the transmission. Gets an internal object that contains the details of the transmission. Gets or sets the telemetry level classification of the events in the Transmission Gets the ApiKey for transmission. Executes the request that the current transmission represents. The task to await. Returns the NoResponseBody environment variable. For testing collector++ connectivity and schema validity, if set to true, then CollectorPP will return a json of why events failed to consume, will not tell which ones failed. set environment variable VSTelemetryAPI_NoResponseBody = true Response documentation can be found here https://microsoft.sharepoint.com/:w:/t/ObservabilityPipelineCore/EcrBD12KNmpBtGWwVVC1tEABBWMEPjaC0AsmnFLlm2nD6g?e=N2skDr "true" if VSTelemetryAPI_NoResponseBody env var is set to true Build string out of object Creates a post web request. The Address in the web request. A web request pointing to the Address. Provides a simple synchronization mechanism using a file instead of a Mutex since Mutexes are not supported on Mono (Mac/Linux) This class handles all the logic for flushing the In Memory buffer to the persistent storage. The memory buffer. A wait handle that signals when a flush is required. The storage that is used to persist all the transmissions. The number of times this object was disposed. A boolean value that determines if the long running thread that runs flush in a loop will stay alive. Initializes a new instance of the class. The storage that persists the telemetries. In memory buffer that holds telemetries. Key used for Collector backend A boolean value that determines if flush will happen automatically. Used by unit tests. Initializes a new instance of the class. The storage that persists the telemetries. In memory buffer that holds telemetries. A boolean value that determines if flush will happen automatically. Used by unit tests. Gets or sets the maximum telemetry batching interval. Once the interval expires, persists the accumulated telemetry items. Gets or sets the service endpoint. Q: Why flushManager knows about the endpoint? A: Storage stores objects and Transmission objects contain the endpoint address. Gets the apiKey used for Collector endpoint. Needed here because it needs to be added to the transmission file. Disposes the object. Persist the in-memory telemetry items. Flushes in intervals set by . Handles the full event coming from the TelemetryBuffer. Acquires the lock and performs the given action unless cancelled The action to perform when the lock is acquired Cancellation token Enum for the type of storage method to use. Default persistence version. This is the legacy persistence version where: * file contains key value pairs written line by line and then the payload * file extension is .trn This is the json persistence version added for C# Dev Kit. It contains: * Json representation of TransmissionFile object * file extension is .jtrn Creates a StorageBase Initializes a new instance of the class. A folder name. Under this folder all the transmissions will be saved. The version of persistence to use. Simple method to detect if current user has permission to delete the file. true Initializes a new instance of the class. A folder name. Under this folder all the transmissions will be saved. The version of persistence to use. Simple method to detect if current user has permission to delete the file. true Represents a communication channel for sending telemetry to Application Insights via HTTPS. Initializes a new instance of the class. The host telemetry session. A persistent storage that will store all transmissions. Setting this value groups channels, even from different processes. If 2 (or more) channels has the same storage that share the same underlying folder only one channel will perform the sending even if the channel is in a different process/AppDomain/Thread. IProcessLockFactory that creates an IProcessLock to sync transmission between processes 68 char ingestion key obtained from aria for Collector ingress. For other channels, the apiKey will not be used in creating the tranmission file Defines the number of senders. A sender is a long-running thread that sends telemetry batches in intervals defined by . So the amount of senders also defined the maximum amount of http channels opened at the same time. By default we have 1 sending thread which should be more than enough for our purposes. Gets the storage unique folder. Gets or sets a value indicating whether developer mode of telemetry transmission is enabled. When developer mode is True, sends telemetry to Application Insights immediately during the entire lifetime of the application. When developer mode is False, respects production sending policies defined by other properties. Gets or sets an interval between each successful sending. On error scenario this value is ignored and the interval will be defined using an exponential back-off algorithm. Gets or sets the interval between each flush to disk. Gets or sets the HTTP address where the telemetry is sent. Gets or sets the maximum number of telemetry items that will accumulate in a memory before persists them to disk. Gets or sets the maximum amount of disk space, in bytes, that will use for storage. Gets or sets the maximum amount of files allowed in storage. When the limit is reached telemetries will be dropped. Gets or sets the amount of time, in seconds, after application is started when the will send telemetry to ApplicationInsights. Once the specified amount of time runs out, telemetry will be stored on disk until the application is started again. Gets or sets the maximum telemetry batching interval. Once the interval expires, persists the accumulated telemetry items. Gets or sets the maximum amount of memory, in bytes, that will use to buffer transmissions before sending them to Application Insights. Gets or sets the maximum number of telemetry transmissions that will send to Application Insights at the same time. Releases unmanaged and - optionally - managed resources. Sends an instance of ITelemetry through the channel. Flushes the in-memory buffer to disk. Flushes the in-memory buffer to disk and tries to transmit all pending telemetry. Cancellation token in the case when consumer abandon waiting Task so consumer can wait on it Initialize method is called after all configuration properties have been loaded from the configuration. Implements throttled and persisted transmission of telemetry to Application Insights. A locker that will be used as a name mutex to synchronize transmitters from different channels and different processes. A list of senders that sends transmissions. The storage that is used to persist all the transmissions. Cancels the sending. The number of times this object was disposed. Mutex is released once the thread that acquired it is ended. This event keeps the long running thread that acquire the mutex alive until dispose is called. Initializes a new instance of the class. The transmissions storage. The number of senders to create. A boolean value that indicates if this class should try and create senders. This is a workaround for unit tests purposes only. Initializes a new instance of the class. The transmissions storage. The number of senders to create. IProcessLockBuilder that will create an IProcessLock to sync transmission between processes A boolean value that indicates if this class should try and create senders. This is the case in CS Dev Kit as well as test cases. Gets a unique folder name. This folder will be used to store the transmission files. Gets or sets the interval between each successful sending. Disposes the object. Make sure that happens only once even if it is executed on different processes. On every given time only one channel will acquire the mutex, even if the channel is on a different process. This method is using a named mutex to achieve that. Once the mutex is acquired will be executed. The action to perform once the mutex is acquired. Create senders to send telemetries. Stops the senders. As long as there is no Start implementation, this method should only be called from Dispose. Needs to track files to delete. Use ConcurrentDictionary which is the best option for tracking set of items in a thread-safe manner. See: https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework Initializes a new instance of the class. A folder name. Under this folder all the transmissions will be saved. The version of persistence to use. Gets the storage's folder name. This is not the final full path on disk. The final path can be determined via the StorageFolder property instead. Gets or sets a value indicating whether storage folder was already tried to be created. Only used for UTs. Once this value is true, StorageFolder will always return null, which mocks scenario that storage's folder couldn't be created. Gets the storage folder. If storage folder couldn't be created, null will be returned. Peek all transmissions at once. Cancellation token List of transmissions or empty array Reads an item from the storage. Order is Last-In-First-Out. When the Transmission is no longer needed (it was either sent or failed with a non-retriable error) it should be disposed. Attempts to delete the file in a try/catch logger block. Full path to the file to delete. True if succeeded, else false. Builds transmission from the file object. In the case of success adds new transmission to the processing queue. No exceptions are thrown. Valid FileInfo object StorageTransmission object in case of success or null in case of fail Gets list of the files in the order of Last-In-First-Out. Validate that files are not in the queue for processing or deleting and that it is possible to delete file. Gets all files for the specified in the StorageFolder that can be deleted. the file extension with a prefix period. For example: ".txt". An IEnumerable of files with the file extension in the storage folder that can be deleted. Build file name for the new file without extension. Generate new file name keeping first part (date) as is. We need it to not change file order which is used when file is peeked. Helper method to generate a string hash. Value to be returned if hashing fails, or null to propagate any exception. Get files from . Enqueue is saving a transmission to a tmp file and after a successful write operation it renames it to a trn file. A file without a trn extension is ignored by Storage.Peek(), so if a process is taken down before rename happens it will stay on the disk forever. This method deletes files with the tmp extension that exists on disk for more than 5 minutes. In StorageTransmission, if a file isn't able to be deleted, it is renamed with a .broken file extension. This method cleans up all those files that were marked (renamed) so that they aren't left on the machine. Simple method to detect if current user has permission to delete the file. Helper method to calculate either iKey or generate a hash based on iKey and globalStorageUri. Used in both session channel and in TelemetryCollector code. The storage version to use when determining folder suffix convention. Endpoint iKey for transmitting. Can be null. Storage Uri if available. If the globalStorageUri is set, then it will return a hash of iKey and globalStorageUri, otherwise it will return the iKey value. Process lock exception indicates an error that happened within the ProcessLock. Gets a value indicating whether consumer should retry acquiring the process lock or just give up. Fetch transmissions from the storage and sends it. We need to keep number of stored transmission hashes limited. So once per TriggerCountStaleHashCheck sent transmission we start cleanup procedure and remove stale hashes which is in memory for more than StaleHashPeriod of time. Each hash is 64 characters long, so string is 128 bytes long. We keep it twice: in linked list + dictionary. It is approximately 128 + 128 + 32 (additional expenses) ~ 288 bytes per hash. 50 * 288 = 14K seems reasonable amount of memory to allocate for 50 hashes. A wait handle that flags the sender when to start sending again. The type is protected for unit test. When storage is empty it will be queried again after this interval. Holds the maximum time for the exponential back-off algorithm. The sending interval will grow on every HTTP Exception until this max value. A wait handle that is being set when Sender is no longer sending. Keep list of transmission hashes in order of most recent at the end. This allows us faster find all stale hashes. Keeps list of transmission hashes in set, to be able to fast O(1) check whether hash in the set. All operations on list and set of the transmission hash should be guarded by this lock, because we allow to work with Sender on a multiple threads. Have this counter to understand whether start cleanup procedure. A boolean value that indicates if the sender should be stopped. The sender's while loop is checking this boolean value. The amount of time to wait, in the stop method, until the last transmission is sent. If time expires, the stop method will return even if the transmission hasn't been sent. The transmissions storage. The number of times this object was disposed. Holds the transmitter. Initializes a new instance of the class. The storage that holds the transmissions to send. The persistence transmitter that manages this Sender. The transmitter will be used as a configuration class, it exposes properties like SendingInterval that will be read by Sender. A boolean value that determines if Sender should start sending immediately. This is only used for unit tests. Gets the interval between each successful sending. Disposes the managed objects. Stops the sender. A representing the asynchronous operation. Try to upload all pending telemetry we have in the temporary folder. Send transmissions in a loop. Sends a transmission and handle errors. The transmission to send. When this value returns it will hold a recommendation for when to start the next sending iteration. A boolean value that indicates if there was a retriable error. Sends a transmission asynchronously and handle errors. The transmission to send. Cancellation token Previous send interval duration Cleanup stale transmission hash based on the data hash is added. We need it to keep transmission hash set size not grow indefinitely to not waste memory. Log next interval. Only log the interval when it changes by more then a minute. So if interval grow by 1 minute or decreased by 1 minute it will be logged. Logging every interval will just make the log noisy. Return the status code from the web exception or null if no such code exists. Returns true if or are retriable. Calculates the next interval using exponential back-off algorithm (with the exceptions of few error codes that reset the interval to . Peeked transmissions dictionary (maps file name to its full path). Holds all the transmissions that were peeked. Note: The value (=file's full path) is not required in the Storage implementation. If there was a concurrent Abstract Data Type Set it would have been used instead. However, since there is no concurrent Set, dictionary is used and the second value is ignored. Gets or sets the maximum size of the storage in bytes. When limit is reached, the Enqueue method will drop new transmissions. Gets or sets the maximum number of files. When limit is reached, the Enqueue method will drop new transmissions. Disposing the storage transmission. Creates a new transmission from the specified . Return transmission loaded from file; return null if the file is corrupted. Saves the transmission to the specified . A representing the asynchronous operation. Chunk size in bytes to convert to base64 string. Final size of the string should be less than or equal 85000 bytes. Final string length in bytes is: (30000 / 3) * 4 * 2 = 80000 Gets or sets the Content Type used in the request header when sent to the telemetry endpoint. Gets or sets the Content Encoding used in the request header when sent to the telemetry endpoint. Gets or sets the deserialized version of the endpoint for TransmissionFile. This is backed by the where the value is stored. Gets or sets the Base64 encoded content string for a set of events. This is backed by the property. Gets or sets the EndpointApiKey is the Collector required endpoint key that needs to be in the header of the request. Gets or sets the Telemetry level for all the events in this transmission file. Gets or sets the TransmissionEndpoint string in Uri format. This is not serialized. Gets or sets the content in raw bytes (before Base64 encoding) of the telemetry events. This is not serialized. Serializes a TransmissionFile into Json The stream writer. The transmission file to serialize. The async Task. Deserialize from the text from the reader into a . The stream reader for the stream to deserialize. The that was deserialized. Serialize the into the in the classic .trn format. Location to serialize to. The to serialize. Async Task Deserializes the data from into a new . This deserializer follows the old .trn format. The stream to serialize data from. A new with the deserialized data. If the file is not in the correct order or is missing values, a Format Exception is thrown.. Initializes a new instance of the class. This is the default Storage class for Windows A folder name. Under this folder all the transmissions will be saved. The version of persistence storage method. Simple method to detect if current user has permission to delete the file. Encapsulates logic for sending a telemetry as a Common Schema 2.0 event. Gets the underlying EventSource (ETW) ID. Exposed for Unit Tests purposes. Gets the underlying EventSource (ETW) Name. Exposed for Unit Tests purposes. Gets the instrumentation key for this writer. Exposed for Unit Tests purposes. Releases resources. Represents a communication channel for sending telemetry to Application Insights via UTC (Windows Universal Telemetry Client). Initializes a new instance of the class. Gets or sets a value indicating whether developer mode of telemetry transmission is enabled. When developer mode is True, sends telemetry to Application Insights immediately during the entire lifetime of the application. When developer mode is False, respects production sending policies defined by other properties. Gets or sets a value indicating the endpoint address. This property is ignored. Returns true if the channel is available to use. Releases unmanaged and - optionally - managed resources. Sends an instance of ITelemetry through the channel. No-op because every method is immediately calling UTC. So every call is immediately "flushed" to the UTC agent. Flushes the in-memory buffer and transmit data asynchronously. The mutex prefix used to lock on Storage v2 (used by the legacy Sender). Bug 248019: VS Telemetry: Visual Studio can freeze if another instance of ApplicationInsights is loaded This prefix is added to avoid collisions with mutex objects from other AI apps. The mutex prefix used to lock on Storage v2 (used by the Collector). Bug 248019: VS Telemetry: Visual Studio can freeze if another instance of ApplicationInsights is loaded This prefix is added to avoid collisions with mutex objects from other AI apps. Telemetry type used to track events. Initializes a new instance of the class. Initializes a new instance of the class with the given . The event is null or empty string. Gets or sets date and time when event was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the name of the event. Gets or sets the Common Schema version for this event which is used for determining data shape and tranmission endpoint Gets a dictionary of application-defined event metrics. Gets a dictionary of application-defined property names and values providing additional information about this event. Sanitizes the properties based on constraints. This enumeration is used by ExceptionTelemetry to identify if and where exception was handled. Exception was not handled. Application crashed. Exception was handled in user code. Exception was handled by some platform handlers. Telemetry type used to track exceptions. Initializes a new instance of the class with empty properties. Initializes a new instance of the class with empty properties. Exception instance. Gets or sets date and time when telemetry was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the value indicated where the exception was handled. Gets or sets the original exception tracked by this . Gets a dictionary of application-defined exception metrics. Gets a dictionary of application-defined property names and values providing additional information about this exception. Gets or sets Exception severity level. Sanitizes the properties based on constraints. Represents objects that support serialization to JSON. Writes JSON representation of the object to the specified . Encapsulates logic for serializing objects to JSON. . Writes opening/left square bracket. Writes opening/left curly brace. Writes closing/right square bracket. Writes closing/right curly brace. Writes comma. Writes a property. Writes a property. Writes a property. Writes a property. Writes a property. Writes a property. Writes a property. Writes a property. Writes an object property. Writes a property name in double quotation marks, followed by a colon. Writes as raw value directly. This exception is used to notify the user that the set of inner exceptions has been trimmed because it exceeded our allowed send limit. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The message that describes the error. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Initializes a new instance of the class with serialized data. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). Represents an object that supports application-defined properties. Gets a dictionary of application-defined property names and values providing additional information about telemetry. Telemetry type used to track metrics. Initializes a new instance of the class with empty properties. Initializes a new instance of the class with the specified and . The is null or empty string. Gets or sets date and time when event was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the name of the metric. Gets or sets the value of this metric. Gets or sets the number of samples for this metric. Gets or sets the min value of this metric. Gets or sets the max value of this metric. Gets or sets the standard deviation of this metric. Gets a dictionary of application-defined property names and values providing additional information about this metric. Sanitizes the properties based on constraints. Telemetry type used to track page views. You can send information about pages viewed by your application to Application Insights by passing an instance of the class to the method. Initializes a new instance of the class. Initializes a new instance of the class with the specified . The is null or empty string. Gets or sets date and time when event was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the name of the metric. Gets or sets the page view Uri. Gets or sets the page view duration. Gets a dictionary of custom defined metrics. Gets a dictionary of application-defined property names and values providing additional information about this page view. Sanitizes the properties based on constraints. The class that represents information about performance counters. Gets or sets date and time when telemetry was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the counter value. Gets or sets the category name. Gets or sets the counter name. Gets or sets the instance name. Gets a dictionary of application-defined property names and values providing additional information about this exception. Sanitizes the properties based on constraints. The class that represents information about collected RDD. Gets or sets date and time when telemetry was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets resource name. Gets or sets text of SQL command or empty it not applicable. Gets or sets the dependency kind, like SQL, HTTP, Azure, etc. Gets or sets request duration. Gets or sets request count. Gets or sets a value indicating whether the dependency call was successful or not. Gets or sets a value indicating whether the dependency call was made asynchronously or not. Gets or sets a value identifying the source of RDD. Gets a dictionary of application-defined property names and values providing additional information about this remote dependency. Sanitizes the properties based on constraints. Encapsulates information about a web request handled by the application. You can send information about requests processed by your web application to Application Insights by passing an instance of the class to the method. Initializes a new instance of the class. Initializes a new instance of the class with the given , , , and property values. Gets or sets the date and time when request was processed by the application. Gets or sets the value that defines absolute order of the telemetry item. Gets the object that contains contextual information about the application at the time when it handled the request. Gets or sets the unique identifier of the request. Gets or sets human-readable name of the requested page. Gets or sets response code returned by the application after handling the request. Gets or sets a value indicating whether application handled the request successfully. Gets or sets the amount of time it took the application to handle the request. Gets a dictionary of application-defined property names and values providing additional information about this request. Gets or sets request url (optional). Gets a dictionary of application-defined request metrics. Gets or sets the HTTP method of the request. Sanitizes the properties based on constraints. Contains values that identify state of a user session. Indicates that a user session started. Indicates that a user session ended. Telemetry type used to track user sessions. Initializes a new instance of the class. Initializes a new instance of the class with the specified . A value indicating state of the user session. Gets or sets the date and time the session state was recorded. Gets the of the application when the session state was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets or sets the value describing state of the user session. Sanitizes this telemetry instance to ensure it can be accepted by the Application Insights. This enumeration is used by ExceptionTelemetry and TraceTelemetry to identify severity level. Verbose severity level. Information severity level. Warning severity level. Error severity level. Critical severity level. Represents a context for sending telemetry to the Application Insights service. Initializes a new instance of the class. Gets or sets the default instrumentation key for all objects logged in this . By default, this property is initialized with the value of the instance of . You can specify it for all telemetry tracked via a particular or for a specific instance. Gets the object describing the component tracked by this . Gets the object describing the device tracked by this . Gets the object describing a user session tracked by this . Gets the object describing a user tracked by this . Gets the object describing a operation tracked by this . Gets the object describing a location tracked by this . Gets a dictionary of application-defined property values. Gets a dictionary of context tags. Serializes this object in JSON format. This is used by Common Schema 2.0 data flow. Common Schema 4 does not use tags, and writes the iKey in TelemetryHelper:WriteEnvelopeProperties as it uses a different format Telemetry type used for log messages. Contains a time and message and optionally some additional metadata. Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. Gets or sets date and time when event was recorded. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets or sets the message text. For example, the text that would normally be written to a log file line. Gets or sets Trace severity level. Gets a dictionary of application-defined property names and values providing additional information about this trace. Sanitizes the properties based on constraints. This class represents a platform agnostic management interface to application lifecycle events. The current platform specific application lifecycle provider. We have this additional level of indirection so that we can replace the provider on the fly without having to unhook all consumers of the events if provides. Initializes a new instance of the class. Occurs when a new instance of the application is started or an existing instance is activated. Occurs when the application is suspending or closing. Gets the singleton instance for our management object. Initializes the current management interface with a platform specific provider. Encapsulates arguments of the event. Initializes a new instance of the class with the specified runner of asynchronous methods. Runs the specified asynchronous method while preventing the application from exiting. A telemetry context initializer that will set component context version on the base of BuildInfo.config information. The version for this component. Initializes a component context version on the base of BuildInfo.config information. The telemetry context to initialize. Loads BuildInfo.config and returns XElement. Gets the version for the current application. If the version cannot be found, we will return the passed in default. The extracted data. A telemetry context initializer that will gather component context information. Initializes the given . The telemetry context to initialize. The reader is platform specific and applies to .NET applications only. The default application version we will be returning if no application version is found. The singleton instance for our reader. Initializes a new instance of the class. Gets or sets the singleton instance for our application context reader. Initializes the current reader with respect to its environment. Gets the version for the current application. If the version cannot be found, we will return the passed in default. The extracted data. A telemetry context initializer that will gather device context information. Initializes the given . The telemetry context to initialize. The reader is platform specific and applies to .NET applications only. The sync root used in synchronizing access to persistent storage. The device identifier. The operating system. The device manufacturer. The device name. The network type. The cached fallback context. Initializes a new instance of the class. Gets the fallback device context. Initializes the current instance with respect to the platform specific implementation. Gets the type of the device. The type for this device as a hard-coded string. Gets the device unique ID, or uses the fallback if none is available due to application configuration. The discovered device identifier. Gets the operating system. The discovered operating system. Gets the device OEM. The discovered OEM. Gets the device model. The discovered device model. Gets the network type. The discovered network type. Gets the screen resolution. The discovered screen resolution. Reads the serialized context from persistent storage, or will create a new context if none exits. The fallback context we will be using. Runs a single WMI query for a property. The table. The property. The default value of the property if WMI fails. The value if found, Unknown otherwise. The file name used when storing persistent context. The singleton instance for our reader. Gets or sets the singleton instance for our application context reader. Gets the host system locale. The discovered locale. The fallback device context we will be using if we can't extract device information directly. Gets the device unique identifier. Initializes this instance with a set of new properties to serve as context. Serializes the current instance to the passed in root element. The root element to serialize to. Deserializes the passed in root element to the current instance. The root element to deserialize. True if deserialization was successful, false otherwise. Encapsulates application lifecycle events. Occurs when a new instance of the application is started or an existing instance is activated. Occurs when the application is suspending or closing. The component context reader interface used while reading component related information in a platform specific way. Initializes the current reader with respect to its environment. Gets the version for the current application. If the version cannot be found, we will return the passed in default. The extracted data. Represents an object that implements supporting logic for . One type of objects that support is a telemetry source. A telemetry source can supply initial property values for a object during its construction or generate objects during its lifetime. Initializes the given . The device context reader interface used while reading device related information in a platform specific way. Gets the fallback device context. Initializes the current reader with respect to its environment. Gets the type of the device. The type for this device as a hard-coded string. Gets the device unique identifier. The discovered device identifier. Gets the operating system version. The discovered operating system. Gets the device OEM. The discovered OEM. Gets the device model. The discovered device model. Gets the network type. The discovered network type. Gets the screen resolution. The discovered screen resolution. Gets the host system locale. The discovered locale. The interface for all fallback contexts. Initializes this instance with a set of new properties to serve as context. Serializes the current instance to the passed in root element. The root element to serialize to. Deserializes the passed in root element to the current instance. The root element to deserialize. True if deserialization was successful, false otherwise. A highly-accurate, precise and testable clock. Encapsulates information describing an Application Insights component. This class matches the "Application" schema concept. We are intentionally calling it "Component" for consistency with terminology used by our portal and services and to encourage standardization of terminology within our organization. Once a consensus is reached, we will change type and property names to match. Gets or sets the application version. Runs tasks synchronously, on the current thread. From . Encapsulates information about a device where an application is running. Gets or sets the type for the current device. Gets or sets a device unique ID. Gets or sets the operating system name. Gets or sets the device OEM for the current device. Gets or sets the device model for the current device. Gets or sets the IANA interface type for the internet connected network adapter. Gets or sets the current application screen resolution. Gets or sets the current display language of the operating system. Gets or sets the role name. Gets or sets the role instance. Converts a System.Exception to a Microsoft.VisualStudio.ApplicationInsights.Extensibility.Implementation.TelemetryTypes.ExceptionDetails. Sanitizing stack to 32k while selecting the initial and end stack trace. Converts a System.Diagnostics.StackFrame to a Microsoft.VisualStudio.ApplicationInsights.Extensibility.Implementation.TelemetryTypes.StackFrame. Gets the stack frame length for only the strings in the stack frame. Starts the , catches and logs any exceptions it may throw. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Additional implementation for ExceptionDetails. Creates a new instance of ExceptionDetails from a System.Exception and a parent ExceptionDetails. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Partial class to add the EventData attribute and any additional customizations to the generated type. Encapsulates information describing an Application Insights component. This class matches the "Application" schema concept. We are intentionally calling it "Component" for consistency with terminology used by our portal and services and to encourage standardization of terminology within our organization. Once a consensus is reached, we will change type and property names to match. Gets or sets the application version. Gets or sets the application version. Holds the static singleton instance of ContextTagKeys. Encapsulates information about a device where an application is running. Gets or sets the type for the current device. Gets or sets a device unique ID. Gets or sets the operating system name. Gets or sets the device OEM for the current device. Gets or sets the device model for the current device. Gets or sets the IANA interface type for the internet connected network adapter. Gets or sets the current application screen resolution. Gets or sets the current display language of the operating system. Gets or sets the role name. Gets or sets the role instance. Gets or sets the device IP address. Gets or sets the device VM name. Internal context type shared between SDK and DP. Encapsulates telemetry location information. Gets or sets the location IP. Encapsulates information about a user session. Gets or sets the application-defined operation ID. Gets or sets the application-defined operation NAME. Partial class to add the EventData attribute and any additional customizations to the generated type. Encapsulates information about a user session. Gets or sets the application-defined session ID. Gets or sets the IsFirst Session for the user. Gets or sets the IsNewSession Session. Partial class to add the EventData attribute and any additional customizations to the generated type. Base class for tags backed context. Encapsulates information about a user using an application. Gets or sets the ID of user accessing the application. Unique user ID is automatically generated in default Application Insights configuration. Gets or sets the ID of an application-defined account associated with the user. Gets or sets the UserAgent of an application-defined account associated with the user. Gets or sets the StoreRegion of an application-defined account associated with the user. Gets or sets the date when the user accessed the application for the first time. Acquisition date is automatically supplied in default Application Insights configuration. Sets values on the current context based on the default context passed in. A light fixed size queue. If Enqueue is called and queue's limit has reached the last item will be removed. This data structure is thread safe. Encapsulates Internal information. Gets or sets application insights SDK version. Gets or sets application insights agent version. Encapsulates platform-specific functionality required by the API. This type is public to enable mocking on Windows Phone. Returns a dictionary that can be used to access per-user/per-application settings shared by all application instances. Returns contents of the ApplicationInsights.config file in the application directory. Returns the platform specific object for the given Exception. Interface for random number generator capable of producing a batch of unsigned 64 bit random numbers. Writes the specified property name enclosed in double quotation marks followed by a colon. When this method is called multiple times, the second call after and all subsequent calls will write a coma before the name. Encapsulates telemetry location information. Gets or sets the location IP. Encapsulates information about a user session. Gets or sets the application-defined operation ID. Gets or sets the application-defined operation NAME. Gets or sets the application-defined operation SyntheticSource. Common logic of provider shared by all platforms. The .NET 4.0 and 4.5 implementation of the interface. Returns contents of the ApplicationInsights.config file in the application directory. Provides access to the platform. Gets or sets the current implementation. A helper class for implementing properties of telemetry and context classes. Encapsulates information about a user session. Gets or sets the application-defined session ID. Gets or sets the IsFirst Session for the user. Initializes a new instance of the class. This constructor is protected because is only meant to be instantiated by the property or by tests. Gets or sets the default instance used by . This property is a test isolation "pinch point" that allows us to test without using reflection. Extension methods for TelemetryContext. Returns TelemetryContext's Internal context. Telemetry context to get Internal context for. Internal context for TelemetryContext. Normalize instrumentation key by removing dashes ('-') and making string in the lowercase. In case no InstrumentationKey is available just return empty string. In case when InstrumentationKey is available return normalized key + dot ('.') as a separator between instrumentation key part and telemetry name part. Provides a set of extension methods for tracing. Returns a culture-independent string representation of the given object, appropriate for diagnostics tracing. Thread level resource section lock. Thread level lock object. Initializes a new instance of the class. Marks section locked. Gets a value indicating whether lock is set on the section. Release lock. Keywords for the PlatformEventSource. Key word for user actionable events. Keyword for errors that trace at Verbose level. Keyword for errors that trace at Verbose level. Keyword for errors that trace at Error level. Defines extension methods that allow coding against without conditional compilation on versions of .NET framework. Encapsulates information about a user using an application. Gets or sets the ID of user accessing the application. Unique user ID is automatically generated in default Application Insights configuration. Gets or sets the ID of an application-defined account associated with the user. Gets or sets the UserAgent of an application-defined account associated with the user. Gets or sets the date when the user accessed the application for the first time. Acquisition date is automatically supplied in default Application Insights configuration. Generator singleton. Index of the last used random number within pre-generated array. Count of segments of random numbers. Number of random numbers per segment. Number of bits used to store index of the random number within segment. Bit mask to get segment index bits. Bit mask to get index of the random number within segment. Bit mask to get index of the random number in the pre-generated array. Array of random number batch generators (one per each segment). Array of pre-generated random numbers. Initializes a new instance of the class. Initializes generator with a set of random numbers. Initializes generator with a set of random numbers. Factory used to create random number batch generators. Number of significant bits in segment index, i.e. value of 3 means 8 segments of random numbers - 0..7. Number of significant bits in random number index within segment, i.e. value of 10 means 1024 random numbers per segment. Weakly thread safe next (random) operation id generator where 'weakly' indicates that it is unlikely we'll get into collision state. Next operation id. Generates random number batch for segment which just exhausted according to value of the new index. Index in random number array of the random number we're about to return. Generates batches of random number using Xorshift algorithm Note: the base code is from http://www.codeproject.com/Articles/9187/A-fast-equivalent-for-System-Random. Initializes a new instance of the class. Random generator seed value. Generates a batch of random numbers. Buffer to put numbers in. Start index in the buffer. Count of random numbers to generate. Represents an object that supports initialization from . Initialize method is called after all configuration properties have been loaded from the configuration. Represents an object that initializes objects. The instances use objects to automatically initialize properties of the objects. Initializes properties of the specified object. Initializes SDK Properties: SDK Version and SDKMode. Adds a telemetry property for the version of SDK. An that that populates property for the Microsoft internal telemetry sent to the Vortex endpoint. Populates with unique ID and sequential number. Encapsulates the global telemetry configuration typically loaded from the ApplicationInsights.config file. All objects are initialized using the telemetry configuration provided by this class. Gets the active instance loaded from the ApplicationInsights.config file. If the configuration file does not exist, the active configuration instance is initialized with minimum defaults needed to send telemetry to Application Insights. Gets or sets the default instrumentation key for the application. The new value is null. This instrumentation key value is used by default by all instances created in the application. This value can be overwritten by setting the property of the . Gets or sets a value indicating whether sending of telemetry to Application Insights is disabled. This disable tracking setting value is used by default by all instances created in the application. Gets the list of objects that supply additional information about application. Context initializers extend Application Insights telemetry collection by supplying additional information about application environment, such as or information that remains constant during application lifetime. A invokes context initializers to obtain initial property values for object during its construction. The default list of context initializers is provided by the Application Insights NuGet packages and loaded from the ApplicationInsights.config file located in the application directory. Gets the list of objects that supply additional information about telemetry. Telemetry initializers extend Application Insights telemetry collection by supplying additional information about individual items, such as . A invokes telemetry initializers each time method is called. The default list of telemetry initializers is provided by the Application Insights NuGet packages and loaded from the ApplicationInsights.config file located in the application directory. Gets the list of modules that automatically generate application telemetry. Telemetry modules automatically send telemetry describing the application to Application Insights. For example, a telemetry module can handle application exception events and automatically send you can see on the Application Insights portal. The default list of telemetry modules is provided by the Application Insights NuGet packages and loaded from the ApplicationInsights.config file located in the application directory. Gets or sets the telemetry channel. Creates a new instance loaded from the ApplicationInsights.config file. If the configuration file does not exist, the new configuration instance is initialized with minimum defaults needed to send telemetry to Application Insights. Releases resources used by the current instance of the class. An that sets to . Sets to . Send events, metrics and other telemetry to the Application Insights service. Initializes a new instance of the class. Send telemetry with the active configuration, usually loaded from ApplicationInsights.config. Initializes a new instance of the class. Send telemetry with the specified . The is null. Gets the current context that will be used to augment telemetry you send. Gets or sets the default instrumentation key for all objects logged in this . Gets or sets the channel used by the client helper. Note that this doesn't need to be public as a customer can create a new client with a new channel via telemetry configuration. Check to determine if the tracking is enabled. Send an for display in Diagnostic Search and aggregation in Metrics Explorer. A name for the event. Named string values you can use to search and classify events. Measurements associated with this event. Send an for display in Diagnostic Search and aggregation in Metrics Explorer. An event log item. Send a trace message for display in Diagnostic Search. Message to display. Send a trace message for display in Diagnostic Search. Message to display. Trace severity level. Send a trace message for display in Diagnostic Search. Message to display. Named string values you can use to search and classify events. Send a trace message for display in Diagnostic Search. Message to display. Trace severity level. Named string values you can use to search and classify events. Send a trace message for display in Diagnostic Search. Message with optional properties. Send a for aggregation in Metric Explorer. Metric name. Metric value. Named string values you can use to classify and filter metrics. Send a for aggregation in Metric Explorer. Send an for display in Diagnostic Search. The exception to log. Named string values you can use to classify and search for this exception. Additional values associated with this exception. Send an for display in Diagnostic Search. This method is an internal part of Application Insights infrastructure. Do not call. Send information about the page viewed in the application. Name of the page. Send information about the page viewed in the application. Send information about a request handled by the application. The request name. The time when the page was requested. The time taken by the application to handle the request. The response status code. True if the request was handled successfully by the application. Send information about a request handled by the application. Flushes channel. Flushes channel and wait until transmit is fully completed. Wait can be cancelled by using CancellationToken. Cancellation token Waitable and cancellable task Various utilities. Validates the string and if null or empty populates it with '$parameterName is a required field for $telemetryType' value. Returns default Timespan value if not a valid Timespan. The relative path to the cache for our application data. Reads the serialized context from persistent storage, or will create a new context if none exits. The file to read from storage. The fallback context we will be using. Check whether channel is valid to be added to active channel list Check whether channel is valid to be added to active channel list An exception which indicates the collector cannot safely proceed further. Typically, the correct response to such an issue is to stop the collector. An exception which indicates telemetry storage has encountered a fatal error. A component responsible for exporting events to a desired endpoint, handling retries, etc. See OpenTelemetry documentation: https://opentelemetry.io/docs/collector/configuration/#exporters. Sends the specified events to the configured endpoint. The events to send. True if all events exported successfully. Else, returns false. Takes the telemetry passed to it and sends it to the configured endpoint. Much of the code was taken from the older Sender class. Changes here should be made there as well. Sends all events to the endpoint. Each event is deleted when sent successfully. Regardless of outcome, each event is disposed. The set of events to send. The token used to determine if the run should be cancelled. True if all events sent successfully. Else, returns false. Sends a transmission asynchronously and handle errors. The transmission to send. Cancellation token. true if the send is retriable. Otherwise, false. Return the status code from the web exception or null if no such code exists. Returns the status code of the web exception (or null, if there is no response). Returns true if or are retriable. Returns true if there is an error worth retrying later. Else, returns false. Represents a telemetry event which has been emitted by a component. These transmitted events should carry enough info to delete and send to their intended destination. Gets the API key to use when sending the event to its endpoint. Gets the minimum telemetry level necessary to report this event. Deletes the file or other artifacts associated with the event. Sends the event to the configured endpoint. The token indicating cancellation status. A task indicating completion of the send. Represents a pipelines, which receives, processes, and exports telemetry. Gets the name of the pipeline (for debugging or telemetry purposes). Runs one iteration of the pipeline to receive, process, and export telemetry. Adds a receiver to the pipeline. The receiver to add. Adds a processor to the pipeline. The processor to add. Adds an exporter to the pipeline. The exporter to add. An interface indicating that this component can respond to telemetry level changes. Make any internal changes to the component necessary to respond to the new telemetry level. The new telemetry level. Filters events down to the expected API key. Initializes a new instance of the class. The API key to filter down onto. A component which processes telemetry after it is received, prior to export. See OpenTelemetry documentation: https://opentelemetry.io/docs/collector/configuration/#processors These operations can include filtering, sampling, aggregating, or modifying telemetry. Process the events as appropriate. The events to process. The set of valid events which should be passed to the next processor(s). Filters all telemetry to the configured telemetry level for the session. Any telemetry which does not align with the configured level is dropped and then deleted. Initializes a new instance of the class. The telemetry level configured for the application. A component responsible for receiving (through pull or push mechanisms) all telemetry to be processed. See OpenTelemetry documentation: https://opentelemetry.io/docs/collector/configuration/#receivers. Retrieves the events to process and export. The set of events to process and export. Deletes all incoming telemetry data. Creates a receiver to pull events from the TRN Cache for VS Code. The storage version used for the TRN cache. The instrumentation key used for the product. The globalStorageUri passed by VS Code (if it exists). The Collector for VS Telemetry, modeled after the OpenTelemetry Collector. See Documentation: https://opentelemetry.io/docs/collector/. This Collector should be configured, instantiated, and run as a single instance per application. Different applications with different policies and different storage can run in parallel as long as they don't attempt to acquire the same mutex. Much of this code is cleaned up and relocated from the older PersistenceTransmitter. Changes here should also be made there. The Collector's current status. The Collector has never been started or stopped and thus never run. The Collector is starting but not yet running. The Collector is currently running. The Collector has stopped running. Gets or sets the interval between each successful sending. A locker that will be used as a name mutex to synchronize transmitters from different channels and different processes. A wait handle that flags the collector when to start sending again. The type is protected for unit test. A wait handle that is being set when Collector is no longer sending. Mutex is released once the thread that acquired it is ended. This event keeps the long running thread that acquire the mutex alive until dispose is called. Cancels the sending. The amount of time to wait, in the stop method, until the last transmission is sent. If time expires, the stop method will return even if the transmission hasn't been sent. The number of times this object was disposed. Gets or Sets the current running status of the collector. Initializes a new instance of the class. The time which must transpire between each iteration of running the configured pipelines. The folder to lock on when acquiring a cross-process mutex. The time to wait after stopping/disposing until the last transmission is sent. Adds the configured pipeline to the collector. The pipeline to add. Starts the Collector on a background thread. All configured pipelines will run once per configured interval while active. Stops the Collector. A representing the asynchronous operation. Make sure that happens only once even if it is executed on different processes. On every given time only one channel will acquire the mutex, even if the channel is on a different process. This method is using a named mutex to achieve that. Once the mutex is acquired will be executed. The action to perform once the mutex is acquired. Disposes the object. A Telemetry Pipeline, responsible for receiving, processing, and exporting Telemetry library events. Modeled after the OpenTelemetry pipeline architecture. See documentation: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/design.md. Gets or sets the set of receivers to use to populate the set of telemetry to push through the pipeline. Gets or sets the set of processors to run to process, filter, aggregate, or modify telemetry. Gets or sets the set of exporters to run to send telemetry to the desired endpoint. Gets or sets the currently configured telemetry level. The lock used to ensure processing, purging, and other operations don't compete out-of-phase. Initializes a new instance of the class. The name of the pipeline. The initial telemetry level. Deletes all telemetry from all receivers. The telemetry collector used in VS Code instead of the legacy Senders. Initializes and starts the collector using the specific telemetry level and storage. VS Code's configured telemetry level (ex: 'all', 'error', etc.) The GlobalStorageUri passed from VS Code. Updates the collector to use the specified telemetry level. The new telemetry level. Disposes of the collector and its associated resources. True if currently disposing. Else, false. Parses a common properties bag json file into an IEnumerable of Key Value Pairs. Loads data from the json file indicated in the . If file does not exist, will return an empty dictionary. Supported types are string, bool, int, double. Will default to string for unsupported types. ReparsePointAware code does not properly support unexpanded file paths such as Windows 8.3 format. As this code uses this library, must be fully expanded. TelemetrySession used to post faults in case of error. path to json file with key/value pairs. Loads configuration key/value pairs from an external process. An IDictionary 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. Initializes a new instance of the class. An event name following data model 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; Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. Used for customized properties versioning. E.g., project asset posts event with name "vs/platform/project". If the event is updated, uses this parameter to increment the version. Initializes a new instance of the class. An event name following data model 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; Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. Used for customized properties versioning. E.g., project asset posts event with name "vs/platform/project". If the event is updated, uses this parameter to increment the version. Correlation value for this event. Gets asset id from this asset event. Gets the version of this asset event. 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. 1. All methods in this service converts Guid value to D-format string (https://msdn.microsoft.com/en-us/library/97af8hh4(v=vs.110).aspx) 2. This class is thread-safe. Gets singleton instance of Register correlation from a given asset id with specified asset type. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. correlation of the asset. Used by Asset Provider. Register correlation from a given asset id with specified asset type. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. correlation of the asset. Used by Asset Provider. Unregister correlation from this service. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. Used by Asset Provider. Call this method when previous registered asset correlation is stale. Unregister correlation from this service. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. Used by Asset Provider. Call this method when previous registered asset correlation is stale. Register asset provider which can send asset event and return correlation per consumers' request. Asset type name. It is defined by asset provider. Asset provider Unregister asset provider. Asset type name. It is defined by asset provider. Get correlation for a given asset type and asset id. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. You can get more information from asset provider. Asset correlation Get correlation for a given asset type and asset id. Asset type name. It is defined by asset provider. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. You can get more information from asset provider. Asset correlation 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; Set product name, feature name and entity name by parsing event name string. Operation event Set product name, feature name and entity name by parsing event name string. Fault event Set product name, feature name and entity name by parsing event name string. Asset event Set product name, feature name and entity name by parsing event name string. If the event name doesn't comply with data model event name schema, an exception will be thrown. 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; event name the reserved properties dictionary from event used to set data model properties. Validate the event name complies with data model event name schema. Supported Data model event type User task event Trace event Operation event Fault event Asset event A class that defines string values used in event property EventType Get event type name from event type enum. PLEASE DO NOT change the code logic. Enum name is part of contract between client and backend server. A class that defines property names shared by multiple data model entities. PLEASE DO NOT change the constant strings defined in this class, because they're part of contract between client and backend server. Property name is part of the contract between client API and backend data model process. Please email vsdmcrew@microsoft.com before changing the property names. An interface implemented by asset provider to offer asset correlate id on-demand. Post an asset event for specified asset id with given correlation. Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. The correlation for to-be-posted asset event. A bool value indicating whether provider posts event successfully. Return false if input parameters are valid or unexpected error occurs. To create AssetEvent, use constructor calls this method on background thread so please make it thread-safe. Class created to schedule actions on either caller thread or background thread. Standalone function. Schedules the action to be run. An enum to define operation stage type. Please don't change the enum name because it is part of client-server contract. Represent the full stage of an operation. Used when consumer doesn't need telemetry data for the operation duration. Represent the start point of a long-running or async operation. Represent the end point of a long-running or async operation. 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 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 which tracks both start and end points. Gets result from this operation. Gets result summary from this operation. Gets stage type from this operation. Gets pair id for start-end operation events. It is the same value as CorrelationId. return null for atomic operation event. Gets duration of the operation if the stage type is End. Return null for other stage types. Gets start time (in ticks) of current operation which stage type is End. Return null for other stage types. Gets end time (in ticks) of current operation which stage type is End. Return null for other stage types. Gets product name Gets feature name Gets entity name Initializes a new instance of the class. An event name following data model 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; the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. This example shows how to create and post . OperationEvent operation = new OperationEvent("vs/debugger/loadingAssembly", Result.Success); TelemetryService.DefaultSession.PostEvent(operation); Create an operation event with specified information. An event name following data model 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; operation stage type. the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. Initializes a new instance of the class. An event name following data model 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; The type of event. The type of operation. the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. Correlate this event with other event via with description information. The property of correlated event. A description string for this correlation information, such as name, hint, tag, category. Please don't include comma which is a reserved char. This method is not thread-safe. Set result related properties the result of this operation a summary description for the result. Default value is null. Set time properties for operation event. Set SendStartEvent property for operation event. a boolean indicating whether a start event is posted for this end event. This class represents a data model property. Gets value set for the property Creates the data model Property Object. ToString to make debugging easier: show in debug watch window A struct to define correlation information. Represents empty Gets event type of this correlation. The value is used by backend server to improve query performance. Serialize current object to string A json string to include id and event type properties. E.g., {"id":"d7149afe-632f-4278-b94e-3915a79ee60f","eventType":"Operation"} Deserialize a json string to object. A json string to include id and event type properties. E.g., {"id":"d7149afe-632f-4278-b94e-3915a79ee60f","eventType":"Operation"} A object. It would throw if parameter jsonString is an invalid Json string. It would throw if any of conditions below happen, 1. Miss properties "id" or "eventType" 2. Invalid property value. "id" value should be a guid string, and "eventType" should be enum name from . 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. Creates the Metric Property Object. An enum to define the result from user task or operation. Used for unknown or unavailable result. A result without any failure from product or user. A result to indicate the action/operation failed because of product issue (not user faults) Consider using FaultEvent to provide more details about the failure. A result to indicate the action/operation failed because of user fault (e.g., invalid input). Consider using FaultEvent to provide more details. A result to indicate the action/operation is cancelled by user. A class that defines the strings used for property Result. Get Telemetry Result string used in backend. PLEASE DO NOT change the logic. Enum name is part of contract between client and backend server. 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. Creates the Setting Property Object. 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. indicates telemetry event with high value or require attention (e.g., fault). indicates a regular telemetry event. indicates telemetry event with verbose information. 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 which tracks both start and end points. Initializes a new instance of the class. An event name following data model 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; the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. This example shows how to create and post . UserTask userTask = new UserTask("vs/debugger/stepinto", Result.Success); TelemetryService.DefaultSession.PostEvent(userTask); Initializes a new instance of the class. An event name following data model 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; The stage of User Task. the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. Provide context properties, in this case for the default context, either from Host Process, Library, OS, Machine, User, or any other property provider Adds additional property providers. Used for unit tests. Adds shared properties to the context. Post default context properties on a background thread Dispose managed resources implementation Diagnostic telemetry class is intended to gather and post internal telemetry, i.e. under "VS.TelemetryApi" namespace Log registry settings using key/value pair. settingsName - suffix for the settings property. Post diagnostic telemetry. Generates events with properties and send them. Get hashed path to the VSTelemetry dll or if its in Private Assemblies, returns PrivateAssemblies List of all priorities in order to easy maintain their order When you add new priority, please follow the ascending order. Lower number = higher priority. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using eventProcessorContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Please note that although we are throttling, the reset actually occurs when the following event is processed. This means if we sent 1k events under a second, and do not do anything for 10 minutes and then send an event, the Reset will occur then. This was done to simplify code as this feature is primarily for events under development. Indicator, whether current action is not explicitely forbid current event Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Use factory here to not load additional modules for serializer before session is Started. Execute action on event, using eventProcessorContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Indicator, whether current action is not explicitely forbid current event Execute action on event, using eventProcessorContext as a provider of the necessary information. This action add a suffix to property name which property is type T in the event. Execute action on event, using eventProcessorContext as a provider of the necessary information. This action add a suffix DataModelSetting to all Setting property names in the event. Indicator, whether current action is not explicitely forbid current event. Return true if it is allowed to execute next actions. Return false action forbids the event. This action enforce AppInsight restriction on the property. Action is check property name size/characters. Also it checks property value size. In case the property is not pass validation it is removed from the event and added to the special reserved property. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Indicator, whether current action is not explicitely forbid current event Check, whether text representation of the value is follow restriction Check, whether property name is follow restriction Interface is used to implement serializer to convert object to the string representation for the complex objects. Try to serialize object into the string Set converter for the specific type. Check whether converter for the specifc type was called. Create instance of the complex object serializer Returns type of object we can process. Returns type of object we can process. Convert object to the raw string representation. Convert object to the hashed string representation. Check whether we can add raw property value. Generates raw property name based on the existing property name. Add custom converter to convert object of the certain type to the string. Check whether converter for the specifc type was called. OptOut default action. This action is executed only when session is OptOut. In this case it checks if event name is in the list of the OptOut friendly event name. If not IsEventDropped flag is set. Also it checks every property. If property name is not in the OptOut friendly property name property is removed from the event and placed to the excluded list. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. By default OptOut set IsEventDropped to the true, and exclude all properties. Indicator, whether current action is not explicitely forbid current event Add OptOut friendly event name Add OptOut friendly properties to the action Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using eventProcessorContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Indicator, whether current action is not explicitely forbid current event The HMAC algorithm to use on this thread. There are no documented guarantees that is required to be thread-safe. Ensure thread-safety then by creating one per consuming thread. Suppress all context/postproperty events, which doesn't contain useful payload. For example, when properties were removed by other actions it doesn't make sense to post this event with default reserved and shared context properties. Validate coming event Gets or sets current manifest used to processing events Event processor constructor should be provided with session. This required for start channels. Process event, using dynamic telemetry settings. Called from the background thread. Method goes through the properties dictionary and adds the key value pair of the property in case it finds that the value contains sensitive information. The property with the offending string is then replaced with a constant such as "REDACTED". Add session channel Add custom action One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on Post diagnostic information about telemetry manifest rules and actions. Get predefined custom actions Context is passed to the every single action during execution. Context contains all neccessary information for the action to execute. Context also contain event itself. During executing action event could be updated. Gets or sets a value indicating whether event is dropped This is analyzed at the very end of the processing Reset ProcessorContext to be able to process new telemetryEvent and init all field. Remove property from the property list of the event and move it to the excluded properties list Move property from the excluded property list to the event properties list One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on Dispose all channels Router serves for route processed event to the channels. It is fullfilled by the routed arguments specified for the channels. Also it is possible to disable/enable channel for the specified event. Reset all isChannelAvailable array to false Check, whether we have scheduled routing for the specific channel. In route action we fill routing argument with the specific value Disable specific channel Check, whether channel is disabled Add session channel Post cooked event to the available channels. In case if event is dropped (isDropped == true) we still want to post this event to the DevChannel if any. Dev channel is used for the testing purposes. One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on Dispose all channels Remove all channels When channels set is updated we call this method to re-init all arrays Update the Default Channel for the processor to the defaultChannel. Currently only supports aivortex or collector++ as default channel. Structure for the keeping route information Event processor interface is used to implement processor of the incoming events using dynamic telemetry settings. Process event, using dynamic telemetry settings Add custom action One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on IEventProcessorAction is used by the EventProcessor for the process events Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Indicator, whether current action is not explicitely forbid current event Allows the action to post diagnostic information when the manifest version changes or action is being disposed. Reset ProcessorContext to be able to process new TelemetryEvent Remove property from the property list of the event and move it to the excluded properties list Move property from the excluded property list to the event properties list One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on Reset all isChannelAvailable array to false Check, whether we have scheduled routing for the specific channel. In route action we fill routing argument with the specific value Disable specific channel Check, whether channel is disabled Add session channel Post cooked event to the available channels One more way to dispose router asynchronously. In that case it asks channels to flush everything to the Network asynchronously if channel supported such method. Cancellation token Task for wait on Update the Default Channel for the processor to the defaultChannel. Currently only supports aivortex or collector++ as default channel. EventProcessorChannelBuilder serves to build a complex objects and takes care about all dependencies. There is 2 stages of the creating of all objects. 1 stage is to create Builder itself with all necessary parameters such as persistentPropertyBag. Second stage is to create objects itself when TelemetrySession object is known. Instantiate builder itself with all necessary parameters. It is done from the TelemetrySessionInitializer object, thus TelemetrySession doesn't care what external dependencies are needed for creating EventProcessorChannel and EventProcessor objects. Build EventProcessorChannel and all its dependencies Provide context properties, either from Host Process, Library, OS, Machine, User, or any other property provider Adds additional property providers. Used for unit tests. Adds shared properties to the context. Post default context properties on a background thread Diagnostic telemetry class is intended to gather and post internal telemetry, i.e. under "VS.TelemetryApi" namespace Log registry settings using key/value pair Post diagnostic telemetry. Generates events with properties and send them. Adds all properties from the persistent property bag to the event and then clears the persistent property bag. Whether flag is set, that user is forced to be external Try to get test host name for the test purposes Try to get test app id for the test purposes Get internal settings for the channel specified by its ID. There are 3 states could be: - explicitly enabled - explicitly disabled - undefined (no settings available) Returns the IP Global Config Domain Name Check whether telemetry is completely disabled Check whether local logger is enabled Returns the sample rate for FaultEvents for Watson pipeline. AI pipeline is always sent (100%) Returns the maximum # of Watson samples per session Returns the mininum # of seconds between Watson samples. Gets the name of the current host process, for example devenv, in lowercase. Gets a value indicating whether the current host process is 64 bits or not. Gets the Bitness of the OS as a string i.e. "64" for 64 bit and "32" for 32 bit. Gets the unique ID for the machine (i.e. across users). Runs the external process to get MAC Address (only if necessary). Function to call with the MAC address when the process completes Gets the hash of the MAC address of the computer. Hashed MAC address This interface is used to generate the InstallationId and the hardware ids used to discern whether the installation id should change depending if the hardware ids have changed. Gets the current InstallationId. Gets a value indicating whether the current InstallationId changed. Gets the current MachineGuid. Gets a value indicating whether the current MachineGuid is different from the cached value. Gets the current Drive Serial Number. Gets a value indicating whether the current Drive Serial Number is different from cached value. Gets the current Bios UUID. Gets a value indicating whether the current Bios UUID is different from cached value. Used to report errors during the generation of any of the identifiers. Name of the failing method. Exception object. Any additional message. Used to report errors during the generation of the identifiers. The name of the failing method. The error message. Gets the json string representation of the list of erorrs. String of errors, or null if no errors. Gets the StorageDirectoryBase to use on Linux. Uses XDG_CACHE_HOME if exists, otherwise uses a .cache folder under the User's home profile. Gets the StorageDirectoryBase folder on macOs. Uses "Library/Application Support" under the UserProfile folder. Contains common implementation of InstallationId and hardwareIds that are operating system agnostic. InstallationId is cached on disk. HardwareIds currently cached in the registry. Gets the current Bios UUID. Gets the current Machine Guid from Registry. Gets the current Drive Serial Number. Gets the current InstallationId. Gets a value indicating whether the Uuid has changed from what was generated now versus what was cached before. This value is not accurate until InstallationId has been confirmed up to date and this is the first id verified to have changed. Gets a value indicating whether the MachineGuid has changed from what was generated now versus what was cached before. This value is not accurate until InstallationId has been confirmed up to date and this is the first id verified to have changed. Gets a value indicating whether the DriveSerialNumber has changed from what was generated now versus what was cached before. This value is not accurate until InstallationId has been confirmed up to date and this is the first id verified to have changed. Gets a value indicating whether the INstallationId has changed from what was generated now versus what was cached before. Gets the list of errors obtained during generation of ids. Initializes a new instance of the class. Tracks a reported error with an Exception object. The method throwing the error. The exception object that occured. Any additional message for the error. Tracks a reported error. Method where the error occured. Any additional message to help diagnose the error. Returns a serialized string of the list errors if any are reported. Initializes the Lazy methods. Separated into its own method because they need to be reinitialized if one has changed. Gets the base folder where these files will be kept. Initialize the current Bios UUID. The UUID if it can be obtained, otherwise null. Initialize the current MachineGuid. The MachineGuid if it can be obtained, otherwise null. Initialize the current DriveSerialNumber. The DriveSerialNumber if it can be obtained, otherwise null. Saves current hardware Ids to registry. Saves installation id to file. Installation Id. Generates the file path to cache the InstallationId on disk. FilePath to store the InstallationId. Checks that the cached Ids match the current generated ones. * If a cached value is not set but a current id is found, it is set in registry. * If a current value cannot be obtained, the cache value is not checked. True if a value is changed, false if it has not changed or a change cannot be determined. Helper method to set registry values in the InstallationId registry path. Name of the value to set. Value to be set. Gets the value for the specified located in the Identifier registry path. Name of the value to get. Value if found, otherwise 'null'. Delete the entire Identifier key from Registry. Used when the InstallationId needs to be rotated so that all hardware ids used to check that the machine didn't change are also regenerated. Deletes the installation id file. Done when the id needs to be rotated.9 Writes to file at . Full file path. Should not contain Reparse Points. Installation Id to write. Thrown if the directory where the file is going to go cannot be created. Get the BIOS UUID using WMI. Limitations: The BIOS UUID is determined by the hardware BIOS. For Virtual Machines, Hyper-V will rotate this automatically when a new VM is created. BIOS Obtains the drive serial number of the drive where the Windows path is. If that cannot be obtained, falls back to Path.GetTempPath() Limitations: For virtualized drives, the drive serial number value is not set. Drive Serial Number if exists. Returns 'null' if unable to obtain the drive serial number. Attempts to obtain the MachineGuid generated by Windows from HKLM\SOFTWARE\\Microsoft\\Cryptography. Limitations: For imaging, this only changes if some generalization tool is run (such as sysprep), otherwise the guid remains the same. The Windows MachineGuid if available in the registry. Returns 'null' if it is unable to be obtained. Initializes an instance of the BiosInformation. The BiosInformation struct or default if an exception is thrown. Gets the program data folder and calculates the final path with no reparse points. Full final path to program data folder. Gets the specific firmware table. The Firmware table provider The firmware table integer identifier The firmware table as a byte array Enumerates all system firmware tables from the specified firmware table provider The Firmware table provider The table names Defines different user types Check whether user is internal microsoft employee and whether he/she logged in from the internal microsoft network. This information is neccessary for sending PII. We can send PII data only for internal users. The only exception is the Europe users. Gets a value indicating whether the current session is deemed to be a session qualified to collect private information. Gets a value indicating whether the current session is deemed to be a "Microsoft Internal" session Gets a value indicating whether the current machine is joined to the Microsoft AAD tenant Gets a value indicating a unique ID for the current user. Gets a value for the user type. Gets the unique ID for the machine (i.e. across users). INsBundleInformationProvider's GetName method. Calls through to the ProcessName implementation. The name of the process. INsBundleInformationProvider's GetVersion method. Calls through to the ProcessExeName implementation. The assembly file version of the process. Gets the name of the current host process, for example devenv, in lowercase. Gets the process id of the current host process. Gets the process exe version Gets a value indicating whether the bitness of the current process is 64 bit or not. Alternatively, we could use ``Environment.Is64BitProcess`` however, this is available >= .NET 4.0 and we don't want to take any chances. Gets the OS Bitness. Gets the process file name. If the file ends in .exe or .dll, trim the extension off. Name of the executing assembly. Gets the file version info based on the running process. For dotnet, it publishes the actual code to "ProgramName".dll while when it runs, its running an executable entry point. What that means is that we'll need to check the mainModule's FileVersion isn't null and if it is, check for the .dll file. Gets user type, which is external by default as in VsLog. Returns false as there isn't currently a way to join a non-Windows machine to AAD. false Base type for the user information provider. Platform specific implementations can use this type to calculate generic properties. Gets a value indicating whether the current session is deemed to be a session qualified to collect private information This information is necessary for sending PII. We can send PII data only for internal users. The only exception is the Europe users. Gets a value indicating whether the current session is deemed to be a "Microsoft Internal" session Check whether user is internal Microsoft employee and whether he/she logged in from the internal Microsoft network. Gets a value indicating whether the current machine is joined to the Microsoft AAD tenant Gets a value indicating a unique ID for the current user. Gets the value of whether the machine is joined to the Microsoft AAD tenant. Currently only checks on Windows machines and non-Windows machines will return false. True if joined to the Microsoft AAD tenant Gets the name of the current host process, for example devenv, in lowercase. Gets the process id of the current host process. Gets a value indicating whether gets a value indicating if the bitness of the current process is 64 bit or not. Alternatively, we could use ``Environment.Is64BitProcess`` however, this is available >= .NET 4.0. Gets the OS Bitness. "64" for 64 bit and "32" for 32 bit. For Perf reasons (in order to reduce RefSet by about 400KB during VS Start) we use the Win32 API to read the Process Exe name instead of using the .NET API. Gets a value for the user type. If joined to an AAD tenant, checks the AADTenantId fetched in GetAADTenantId() and checks whether it matches the Microsoft AAD tenantId. True of part of the Microsoft AAD tenant Main constructor that requests all required classes. Get internal settings for the channel specified by its ID. There are 3 states could be: - explicitly enabled - explicitly disabled - undefined (no settings available) Check whether user is forced set as external Try to get test AppId settings from the registry. Try to get test hostName from the registry. Returns the IP Global Config Domain Name or empty string in case of network exception. Check, whether telemetry completely disabled Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v TurnOffSwitch /t REG_DWORD /d 1 /f Check whether local logger is enabled Get the sample rate for Fault Events from registry useful for testing Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventWatsonSampleRate /t REG_DWORD /d 100 /f Get the default # of Watson reports per session from registry Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventMaximumWatsonReportsPerSession /t REG_DWORD /d 100 /f Get the default # of seconds bewtween Watson reports from registry Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventMinimumSecondsBetweenWatsonReports /t REG_DWORD /d 3600 /f Parses an object from a stream. Serializes an object to a stream. Implementation for host specific ETW provider for telemetry events. Writes start event for a TelemetryActivity Telemetry activity instance Writes stop event for a TelemetryActivity Telemetry activity instance Writes event for a TelemetryActivity that was ended with a specified duration Telemetry activity instance Writes an event for a TelemetryActivity when it is posted to a session. Telemetry activity instance Writes an event to indicate a telemetry event being posted to a session Telemetry event instance Represents a telemetry event filter. Indicates whether the specified satisfies this filter. The to check against this filter. true if this filter is satisfied; otherwise, false. Read IsOptedIn status for current product. Product version is needed to build a config path OptedIn status Calculate IsOptedIn status based on OptedIn status from all installed versions of VS. Host telemetry session OptedIn status ITelemetryPropertyBag interface for the generic PropertyBag Interface for the test channels to receive events Process incoming events Custom JSON converter. It allows to use specified handlers to convert custom objects to the string. Add new converter by type. Check whether current converter can deal with certain type. Read Json value to the object. Not implemented for this purposes. Gets a value indicating whether current converter can Read. Reset converters usage information. Check whether specific converter was used Write Json representation of the current value. Abstract base class, serves as a base class for the object creators during deserialize objects from the Json using Newtonsoft.Json Can convert input type to the desired one? Read and parse json file. Write json file. Create an instance of objectType, based properties in the JSON object type of object expected contents of JSON object that will be deserialized Does expected field exist? Parse json manifest stream and create an object Async parse manifest from the text stream Parse manifest from the string Ensure to create a new writer for each session Log event to file Dispose managed resources. Ensure to create a new writer for each session Write event to file Gets or sets the main identfiers of the file, could be a SessionId or ApplicationName/Version/BranchName Gets or sets the path of the file, usually C:\Something Gets or sets the folder within Path to save files. Gets the complete file path to actually create the file. Get and, if needed, creates the folder where the log files will exist. Gets the next (static) unique id for this log file. Used in case multiple files are created at the same second. Writes a single line of text Snapshot object of the telemetry event. This class is intended to provide plain text event for the logger purposes. We need it to create unique file across current process. It is possible to create several files with the same name if it is one process which creates several cloned sessions at the same time. Example - VsHub Initializes the internal writer Writes a single line of text Closes the writer. Read OptedIn value for the VS for Mac. For Mac we don't have separate OptinStatus for different versions. Comparer used to compare equality of data points in a SortedList. This comparer reports the normal comparison of x and y except when x == y. In that case, it reports x > y. This is done to permit duplicate keys in a sorted list while retaining a valid sort order. This comparer will produce unexpected behavior if used outside of its expected domain. Use this only in specialized cases where duplicate keys must be permitted in a SortedList. The type of data points being compared (must be a valid numeric struct). Dumps basic properties about an event into a telemetry event's properties. These include properties such as meter name, version, and metric description, unit, etc. Dumps Counter properties into a telemetry event's properties. The type of data tracked by the Counter. Dumps Histogram properties into a telemetry event's properties. The type of data tracked by the Histogram. An interface indicating a type can dump metric events into telemetry event properties. Sets properties on the specified metric event according to the provided metric's type. The event whose properties must be set. The metric associated with the event. The class represents a telemetry event for an IVSCounter that can be posted to a server. The non-VS (ICounter) type has no additional exposed properties beyond the IInstrument. So, no additional properties are needed for the ICounter event and it can be posted normally. Initializes a new instance of the class. The event, with all additional custom properties already set. The counter to track via the event. The class represents a telemetry event for a VS Histogram that can be posted to a server. Initializes a new instance of the class. The event, with all additional custom properties already set. The histogram to track via the event. The class represents a telemetry event for an IInstrument that can be posted to a server. Gets or sets the set of metrics tracked by this event. Gets the telemetry event associated with the metric. Initializes a new instance of the class. The event, with all additional custom properties already set. The metric to track via the event. Construct a telemetry event with a composited set of metrics. The event, with all additional custom properties already set. The set of metrics to track via the event. Sets properties on the metric event related to the metric Sets a property associated with a metric. The key to associated with the metric's property value. The metric property's value. The metric. Sets a property associated with a metric's parent meter. The key to associated with the meter's property value. The meter property's value. The metric attached to the meter. ToString to make debugging easier: show in debug watch window. The string value of the event to simplify debugging. TelemetryEvent representing a composite set of metric events. Initializes a new instance of the class. The base event to model the composited event from. The metrics to track with this event. Assigns deduplicated composited property values to the composite metric event. The composite set with deduplicated property values. The sequence used to separate property values. Indicates that a Histogram's bucket configuration was invalid, typically due to a sorting issue. Buckets must be specified in ascending order. Indicates an invalid or improperly formatted Meter name was specified. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument for details. Indicates a non-monotonic operation was performed. If this operation is intentional, use a non-monotonic instrument (such as an UpDownCounter instead of a Counter). See https://en.wikipedia.org/wiki/Monotonic_function for details. Indicates more registered metrics were recorded in a set than the configured limit. Check your strategy for generating keys to identify unique metrics and ensure keys are not too fragmented or unique. Alternatively, consider raising the configured limit. Indicates an unsupported struct was passed to a Metric. Unsupported structs may be non-numeric, or simply an unsupported numeric type. Meter is the class responsible for creating and tracking the Instruments. Mirrored from: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.meter?view=net-6.0. Gets the Meter name. Gets the Meter version. Create a Counter, which is an instrument that can be used to track counts/sums in monotonic scenarios (always increase/decrease). The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create an UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value). The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new up/down counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create a VS Counter, which is an instrument that can be used to track counts/sums in monotonic scenarios (always increase/decrease). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new VS counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create a VS UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new VS up/down counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The numerical type of the measurement. The instrument name. Cannot be null. /// Optional histogram configuration with bucket boundaries + statistical configuration. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. /// Optional histogram configuration with bucket boundaries + statistical configuration. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . The MeterPRovider is responsible for creating new meters with valid names + versions for the context. Initializes a new instance of Meter using the specified meter name. This Meter is suitable for measuring + reporting instruments via standard VS Telemetry. The Meter name. The new Meter. Initializes a new instance of Meter using the specified meter name and version. This Meter is suitable for measuring + reporting instruments via standard VS Telemetry. The Meter name. The optional Meter version. The new Meter. A Counter, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.counter-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . The detected direction of change (positive or negative) to maintain monotonic constraints. Initializes a new instance of the class. The meter that created the instrument. The counter name. Cannot be null. Optional counter unit of measurements. Optional counter description. Throws if the meter or name are null. Adds the value to the Count. Currently, the tags are simply ignored because we are not yet integrated with OpenTelemetry. The measurement to record. The set of OpenTelemetry tags associated with the measurement. Throws if incrementing a negative counter or decrementing a positive counter. The last recorded trajectory of a monotonic instrument. The monotonic direction is not yet established. The monotonic direction is negative (constantly decreasing). The monotonic direction is positive (constantly increasing). A Base class for Counter types, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.counter-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . Gets the Sum of measurements. Gets the Count of measurements. Responsible for generating properties when the metric is posted as an event. Static is used to ensure T is aligned across counter and generator, and cached. Initializes a new instance of the class. The meter that created the instrument. The counter name. Cannot be null. Optional counter unit of measurements. Optional counter description. Throws if the meter or name are null. Records the increment value of the measurement. The value of the increment (may not be negative). Records the increment value of the measurement. The value of the increment (may not be negative). A key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. A third key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A list of key-value pair tags associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A span of key-value pair tags associated with the measurement. Adds the value to the Count. Currently, the tags are simply ignored because we are not yet integrated with OpenTelemetry. The measurement to record. The set of OpenTelemetry tags associated with the measurement. Throws if measurement is less than 0. A Histogram, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.histogram-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . Gets the summary-level statistics for the full Histogram. Gets the buckets for the histogram with associated statistical data. Responsible for generating properties when the metric is posted as an event. Static is used to ensure T is aligned across counter and generator, and cached. Records a measurement value. The measurement value. Records a measurement value. The measurement value. A key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. A third key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A list of key-value pair tags associated with the measurement. Records a measurement value. The measurement value. A span of key-value pair tags associated with the measurement. Records the measurement, associating it with the proper buckets and updating statistics as needed. Currently, the tags are simply ignored because we are not yet integrated with OpenTelemetry. The measurement to record. The set of OpenTelemetry tags associated with the measurement. Defines a bucket within a histogram (with boundaries + statistics). The type of the overall histogram. Gets the minimum boundary of the bucket. Gets the maximum boundary of the bucket. Gets the statistical information for this bucket. Initializes a new instance of the class. The minimum boundary of the bucket. The maximum boundary of the bucket. The parent meter of the histogram. The configuration used for the histogram. Determines whether or not this bucket is the correct one for the measurement. The upper bounds are inclusive, the lower bounds are exclusive, as per OpenTelemetry spec. Spec: https://opentelemetry.io/docs/reference/specification/metrics/data-model/. The measurement being recorded. True if the measurement is within this Bucket's bounds. Else, false. The set of buckets within the histogram. The type of the histogram. Gets the ordered list of buckets within the histogram along with associated statistics. Initializes a new instance of the class. The parent meter of the histogram. The configuration used to create the histogram. Records a measurement in the correct bucket within the histogram. The measurement to record. Creates the necessary buckets within the histogram according to the configuration. The parent meter of the histogram. The configuration used to create the histogram. Specifies the configuration of a histogram - which statistics to collect and which buckets to use. Gets the explicit bucket boundaries for the histogram. Gets a value indicating whether or not to record Minimum/Maximum values. Gets a value indicating whether or not to record the Median value. The default histogram buckets according to the OpenTelemetry standard. Must be specified in increasing order. Initializes a new instance of the class. Allows specifying explicit bucket boundaries and which statistics should be collected. The histogram's bucket boundaries. True if min/max values should be recorded. True if the median value should be recorded (note: depending on datapoint volume median tracking may elevate memory usage). Validate that buckets are specified in ascending order. Throws an argument exception if buckets are not in ascending order. Tracks the statistics for a histogram for a given scope (all-up or bucketized). The base numeric type of the histogram. Gets the Counter representing the sum and count of datapoint values within the statistical set. Gets the minimum value recorded within the statistical set. If null, it's untracked. Gets the maximum value recorded within the statistical set. If null, it's untracked. Gets the average value recorded within the statistical set. Gets the median value recorded within the statistical set. If null, it's untracked. Gets the time the first event was recorded. Gets the time the last event was recorded. Initializes a new instance of the class. The parent meter for the Histogram. The configuration of the Histogram. Records the specified measurement, updating tracked statistics as appropriate. The value to record in the Histogram's statistics. Calculates the median of the collected data points. Null if no data points were collected or the instrument is not tracking the median. Otherwise, returns the median value. A Counter, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.counter-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . Records the increment value of the measurement. The value of the increment (may not be negative). Records the increment value of the measurement. The value of the increment (may not be negative). A key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. A third key-value pair tag associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A list of key-value pair tags associated with the measurement. Records the increment value of the measurement. The value of the increment (may not be negative). A span of key-value pair tags associated with the measurement. A Histogram, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.histogram-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . Records a measurement value. The measurement value. Records a measurement value. The measurement value. A key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. A third key-value pair tag associated with the measurement. Records a measurement value. The measurement value. A list of key-value pair tags associated with the measurement. Records a measurement value. The measurement value. A span of key-value pair tags associated with the measurement. The base interface for all non-observable instruments. Mirrored from: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.instrument-1?view=net-6.0. Gets the instrument name. Gets the instrument description. Gets the Meter that created the instrument. Gets the instrument unit of measurements. Gets a value indicating whether there are any listeners for this instrument. Gets a value indicating whether the instrument is an observable instrument. The base class for all non-observable instruments. Mirrored from: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.instrument-1?view=net-6.0. The type of the instrument. Gets the instrument name. Gets the instrument description. Gets the Meter that created the instrument. Gets the instrument unit of measurements. Gets a value indicating whether there are any listeners for this instrument. Always True currently, as measurements are recorded internal to the instrument. When OpenTelemetry is integrated, this will accurately describe the status of listeners. Gets a value indicating whether the instrument is an observable instrument. Always False currently, as Instruments in are non-observable by definition in .NET. Indicates an empty set of tags which can be used in substitute of user-specified tags. Gets or sets the set of tags associated with an instrument's datapoint. This set is re-used from call to call to avoid too many allocations. The backing value for tags internally. The maximum permitted number of tags (based on the .NET implementation). Initializes a new instance of the class. Internal constructor to initialize the common instrument properties like the meter, name, description, and unit. The meter that created the instrument. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. Throws if the meter or name are null. Activates the instrument to start recording measurements and to allow listeners to start listening to such measurements. This is currently a no-op as measurement implicitly begins when the first measurement is recorded. Records a measurement by notifying all MeterListener objects that are listening to this instrument. The measurement value. Records a measurement by notifying all MeterListener objects that are listening to this instrument. The measurement value. A key-value pair tag associated with the measurement. Records a measurement by notifying all MeterListener objects that are listening to this instrument. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. Records a measurement by notifying all MeterListener objects that are listening to this instrument. The measurement value. A first key-value pair tag associated with the measurement. A second key-value pair tag associated with the measurement. A third key-value pair tag associated with the measurement. Records a measurement by notifying all MeterListener objects that are listening to this instrument. The measurement value. A span of key-value pair tags associated with the measurement. A Counter with support for exposing Sum + Count, which are not supported directly by OpenTelemetry counters. Taking a dependency on this histogram allows developers to use more convenient types. The cost of taking a dependency on the VS type is that it it can require additional dev work to move to OpenTelemetry. The counter type. Supported types: , , , , , , and . Gets the Sum of measurements. Gets the Count of measurements. A Histogram with exposed Statistics + Buckets The counter type. Supported types: , , , , , , and . Gets the summary-level statistics for the full Histogram. Gets the buckets for the histogram with associated statistical data. An UpDownCounter, as defined by the OpenTelemetry standard. OpenTelemetry Spec: https://opentelemetry.io/docs/reference/specification/metrics/api/ .NET API spec: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.counter-1?view=net-6.0 This interface permits coding to the OpenTelemetry standard without upgrading our .NET Framework. Since it's the same standard, we can update implementations to a thin wrapper around OTel when ready. This also permits us to avoid re-instrumentation for developers. The counter type. Supported types: , , , , , , and . Initializes a new instance of the class. The meter that created the instrument. The counter name. Cannot be null. Optional counter unit of measurements. Optional counter description. Throws if the meter or name are null. Responsible for managing the lifetimes of "Registered" Metrics. Gets the keys and corresponding registered metrics. Gets the dictionary of CompositeProperties for the event. Gets the event to be sent when the set of metrics either expires or is closed. Gets the time when this registered metric set expires. Gets the total count of registered metrics currently being tracked by this set. Initializes a new instance of the class. The base event to send when the set is closed. Records new metric data (creating a new registered metric, if none is found). The type of data being recorded. The metric's name. The type of instrumentation type (i.e. Counter, Histogram) that is being recorded. The data to record on that metric. The timeout to use when creating new metrics or updating their expiry. The bucket boundary definitions to use for types which support buckets. The set of common properties associated with this data. Throws when an unsupported data type is recorded. Only standard numeric value types are supported. Gets the metric associated with the given key. The metric's name. The metric, if found with the associated key. If no metric is found, returns null. Closes the metric set by sending the associated event with all properties set. The session to use to post the event. The delimiter for concatenated/deduped property values. Creates a Registered Metric of the appropriate type for the set based on the data type it is receiving. The type of data received by the metric. The name of the metric. The type of data (i.e. Integer, FloatingPoint) that is being recorded. The type of instrumentation type (i.e. Counter, Histogram) that is being recorded. The unit of measurement associated with the metric's value. The description of the metric. The bucket boundary definitions of the metric. The Registered Metric of the appropriate type. Records data on the specified metric. The whole-number data type of the data. The metric to record data on. The data to record. Refreshes the expiration time of the registered metric based on the specified timeout. The timeout to use for expiring this metric. Indicates the data type associated with data recorded on a metric. The data type is an integer (whole-number). The data type is floating-point. Indicates the specific instrumentation type. Undefined instrument type. Standard counter instrument type. Standard histogram instrument type. A Registered Metric is a metric with a couple associated fields: 1. An associated name (for referencing later) 2. An associated telemetry event (for sending data about the metric) Gets the name associated with this metric. Gets the Instrument associated with this metric. Gets the Data Type associated with this metric. Gets the Instrument type associated with this metric. Initializes a new instance of the class. The instrument associated with the metric. The type of data to be recorded on the instrument. The instrument type. Responsible for managing the lifetimes of "Registered" Metrics. This is mostly useful for scenarios where there is no single good place for orchestration. Ex: The C++ compiler cl.exe runs out-of-proc and uses fire-and-forget telemetry. Only limited types are supported to intentionally narrow the accessibility of the scenario. You must either allow the configured expiry time to pass or explicitly close the manager to post events. If you know a key or unit of work is done, you may call . If you are done with the manager entirely, call . Do not use this manager outside of strictly necessary scenarios - use Metrics + MetricEvents directly instead. When using the manager in appropriate scenarios, pay close attention to memory + performance considerations. Tune the max metrics + timeout values to match your scenario's expectations. Gets mapping of keys to composite metric sets. Gets a value indicating whether the manager's timer to enforce metric expiration is active. Gets the current count of all active metrics. The default count of maximum concurrent metrics. Capped to prevent memory/performance issues. The default timeout for a given registered metric. After the timeout, the associated event is sent automatically. The default string to use as a separator between composited property values. The maximum number of concurrent metrics permitted in the current metric manager. The timeout for a given registered metric. After the timeout, the associated event is sent automatically. The string to use as a separator between composited property values. The timeout for a registered metric. When the timeout expires with no additional data, the metric should be sent. The Sync object for modifying a set, to avoid an unlikely case where a given metric is closed at the same time data is recorded on it. Tracks state of disposal. Initializes a new instance of the class. The session to use to send expired metrics. The maximum number of metrics which can be tracked by the manager. The minimum time waited after the last data is recorded on a metric before the event is automatically closed. The separator to split composited property values. Records data or creates a new counter associated with the metric associated with the key. The type of data to record. The key of the metric. The data to record. The metric's name. The event to associate with the metric, if this is a new key. The optional set of composite properties to deduplicate across datapoints. Records data or creates a new histogram associated with the metric associated with the key. The type of data to record. The key of the metric. The data to record. The metric's name. The event to associate with the metric, if this is a new key. The bucket boundaries for the histogram, if this is a new key. The optional set of composite properties to deduplicate across datapoints. Closes all counters and histograms currently managed and sends their associated events. The session to use to send outstanding events. Closes any metric(s) listed under the specified key, using the provided session to send telemetry. The session to use to send telemetry events for closed any metric(s). The key of the metric to close. Disposes the current metric manager. True if currently disposing. Meter is the class responsible for creating and tracking the Instruments. Mirrored from: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.meter?view=net-6.0. Gets the Meter name. Gets the Meter version. Initializes a new instance of the class. The Meter name. Initializes a new instance of the class. The Meter name. The optional Meter version. Create a metrics Counter object. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create an UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value). The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create a VS Counter, which is an instrument that can be used to track counts/sums in monotonic scenarios (always increase/decrease). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new VS counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Create a VS UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new VS up/down counter. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The numerical type of the measurement. The instrument name. Cannot be null. /// The histogram's configuration. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available. The numerical type of the measurement. The instrument name. Cannot be null. /// The histogram's configuration. Optional instrument unit of measurements. Optional instrument description. A new histogram. Throws if T is not a valid numeric type. For supported types, check documentation: . Validates whether or not the type is a valid numeric struct. This must be validated for runtime stability. The instrument's measurement type. Throws if T is not a valid numeric type. Supported types: , , , , , , and . Serves as a cache of standard arithmetic operator implementations. Gets the appropriate arithmetic implementation for working with a given type. The type which requires arithmetic operations. The arithmetic type which can handle arithmetic for type T. Throws when type T is not a supported numeric type. A class to support generic arithmetic operations across byte values. A class to support generic arithmetic operations across decimal values. A class to support generic arithmetic operations across double values. A class to support generic arithmetic operations across float (Single) values. Utility for performing operations with generic numeric types. This is necessary because many operations (summing, dividing, etc.) are not derived from an interface. The cache of arithmetic operators (to avoid frequent allocations during operations). Adds the two generic values together, returning them as type T. This method is unsafe at runtime unless T supports the '+' operator. This constraint should be enforced upstream. The Meter class uses the ValidateNumericType method to ensure instruments only target valid numeric types. The type of variables to be summed. First value to add. Second value to add. The sum of the two values, cast as type T. Throws when type T is not a supported numeric type. Calculates the average (mean) of the given sum + count. The type of the sum to be averaged. The total sum (numerator). The count of elements (denominator). Returns null if count is 0, otherwise returns the average (mean) value. Throws when type T is not a supported numeric type. Compare two values. The type of variables to be compared. First value to compare. Second value to compare. The result of the default IComparer comparison of a and b. Throws when type T is not a supported numeric type. Interface for types which permit various generic arithmetic operations to be performed upon them. A type which logically supports arithmetic operations. Add two values together. Implementors or overloads must add within a "checked" block to guard against overflow. The first value to add. The second value to add. The sum of a and b. A class to support generic arithmetic operations across short (Int16) values. A class to support generic arithmetic operations across int (Int32) values. A class to support generic arithmetic operations across long (Int64) values. The MeterProvider is responsible for creating new meters with valid names + versions for the VS telemetry context. Initializes a new instance of Meter using the specified meter name. This Meter is suitable for measuring + reporting instruments via standard VS Telemetry. The Meter name. The new Meter. Initializes a new instance of Meter using the specified meter name and version. This Meter is suitable for measuring + reporting instruments via standard VS Telemetry. The Meter name. The optional Meter version. The new Meter. Throws if the meter's name is invalid. Returns whether the given instrument name is valid according to the specification. See specification: . The instrument name. Boolean indicating if the instrument is valid. Internal settings implementation for Mono. Mostly this class just delegates behavour to the default windows implementation but it overrides the channel settings and Sqm policy which is not supported Class containing all PInvoke definitions we use in the Telemetry Library (other than SQM API) and some helpers related to native method calls. Returns the full path of the EXE of the current process. In case of error, a null is returned. Returns the UTC start time in Ticks of the current process or null if the start time cannot be determined. Returns the UTC start time of the current process as a FileTime or null if the start time cannot be determined. Enables dependency injection for telemetry notification service. Attaches the notification service's test channel to receive telemetry events. The notification service's test channel. Detaches the notification service's test channel to stop receiving telemetry events. The notification service's test channel. Posts a fault telemetry event. Telemetry notification service allows subscribers to be notified when telemetry event matching a specified rule is posted. Subscribes to be notified when a telemetry event matching the specified filter is posted. The representing the filter rule for telemetry events. The handler to be invoked when a telemetry event matching the specified rule is posted. Specifies whether to unsubscribe once a matching notification is raised. A subscription ID that can be used to unsubscribe from notifications. If is null, empty or white space. If is null. Unsubscribes from the notification service. The subscription ID to unsubscribe from. A pass through test channel for the notification service. Runtime , using . Telemetry notification service allows subscribers to be notified when telemetry event matching a specified rule is posted. Using a simple mutual-exclusion lock implementation and int as ID because heavy async consumptions of this service is not expected at this time. we can't have a readonly static lazy here because unit tests will just use the same instance, causing confusion and random errors, depending on the order of unit test execution Gets the default singleton instance of the telemetry notifications service. initialize the defaultLazy. Pass in Null as TelemetrySession to use which means use TelemetryService.DefaultSession Internal constructor for unit testing. We want to be very fast to post an event on the client thread, so we just add it to a queue, set an event, and return TelemetryNotificationService.Default and TelemetryService.DefaultSession set the session to be used This class is used to represent a telemetry filter by telemetry event name. Gets the name of the event that you want to filter out in the notification service. Gets a value indicating whether the name of the event provided should match the telemetry event name exactly. Create a filter for telemetry event by its name Name of the telemetry event you want to match Set to true to match the name exactly. Set to false for a startswith check Implements a 'null' ITelemetryOptinStatusReader that always returns false. On platforms other than windows we do not have access to global policy that enables opt-in for the user. We will use this for all non-Windows platforms Represents a property bag that survives process shutdown. Persists any changes Sets a new integer property value. The latest property value will be stored. Sets a new string property value. The latest property value will be stored. Sets a new object property value. The latest property value will be stored. Gets a specific property value. Removes a specific property value. Gets all properties with undefined order. Removes all properties from persistent property bag. Implements a registry property bag that uses a file base registry for use on MacOS or Unix. It used to use Mono's implementation of Win32.Registry but now uses a slimed clone so that can be run on .NET Core on non-Windows platforms. Stores a property bag in a registry. Different exe names do not override each other properties. Executes an action that manipulates registry and catches safe exceptions. A safe exception can be a result of the registry key been deleted by another process or if a user has manipulated with registry to restrict permissions. True is the action was executed and false if the action has thrown an safe registry exception. Persists any changes. This is a NoOp for this implementation Native Mac runtime methods for CoreGraphics and other classes Ported in part from: https://github.com/xamarin/xamarin-macios Native Mac runtime methods for accessing NSxxx methods and objects Ported in part from: https://github.com/xamarin/xamarin-macios Dictionary of string to TValue that internally stores keys with the given prefix string prepended. This is useful for avoiding string allocations that would otherwise be incurred by concatenating prefixes later while still maintaining the appearance of a bag that is indexed without the prefix. The raw backing IDictionary of the PrefixedPropertyBag Constructs a PrefixedPropertyBag with the given backing dictionary and string key prefix IDictionary store to use. Can be Dictionary or ConcurrentDictionary for example Adds or updates an element with the provided key and value. Key must already be prefixed with the prefixed being used by this PrefixedPropertyBag. This is useful in cases where the key is a known constant as it allows callers to avoid an extra string allocation. Removes the element with the specified key. Key must already be prefixed with the prefixed being used by this PrefixedPropertyBag. This is useful in cases where the key is a known constant as it allows callers to avoid an extra string allocation. Gets the value of the specified key. Key must already be prefixed with the prefixed being used by this PrefixedPropertyBag. This is useful in cases where the key is a known constant as it allows callers to avoid an extra string allocation. Gets an IEnumerable of the prefixed key value pairs Adds all KeyValuePairs from source to the bag. Keys in the source must already be prefixed with the prefixed being used by this PrefixedProeprtyBag. Initialize System information We get this information from Win API call to GetNativeSystemInfo OS Information Provider supply caller with necessary operating system information, such as major version, minor version, product type and so on Initialize OS Version info structure by system values We get this information from Win API call to GetVersionEx Determines if we are in a Remote Desktop Session scenario by calling GetSystemMetrics function from WinAPI True, if in remote desktop session Initialize OS Memory information We get this information from Win API call to GlobalMemoryStatusEx Initialize System information We get this information from Win API call to GetNativeSystemInfo Marked internal for tests. Because we add an additional property if its a VM (the VirtualMachineType), we need to know if we're a VM during tests. True if its running on a VM. Determines if we are in a Microsoft Dev Box scenario by validating if the W365 registry key exists and if it does, if the partner Guid is the Dev Box partner Guid. True, if its a Dev Box. Initialize the Virtual Machine type value. If its in the registry, get it from there. Otherwise access it via the WinAPI uint value for the virtual machine type Class created to schedule actions either immediately or after a specified delay. Standalone function. Schedules the action to be run by Task.Run. Standalone function. Schedules the delegate to be run by Task.Run. Initializes the timed feature of this scheduler. The specified time will be set for every subsequent call of ScheduleTimed. Schedule processing event for the background, using TaskTimer Schedule processing event for the background, using TaskTimer Function that checks whether we should execute timed delegate, in particular, prevents re-entry if used with a multi-thread lock. Function that should be called after the delegate completes operation. In case action is scheduled - cancel it In case no action is scheduled - do nothing Standalone function. Schedules the action to be run by Task.Run. Standalone function. Schedules the delegate to be run by Task.Run. Initializes the timed feature of this scheduler. The specified time will be set for every subsequent call of ScheduleTimed. Schedule processing event for the background, using TaskTimer Schedule processing event for the background, using TaskTimer Function that checks whether we should execute timed delegate, in particular, prevents re-entry if used with a multi-thread lock. Function that should be called after the delegate completes operation. In case action is scheduled - cancel it In case no action is scheduled - do nothing Interface that defines the ability to scrub sensitive data from telemetry. The propertyValue is matched on the regex and the string is redacted in the case there is a match. Implementation of the ISensitiveDataScrubber that reads in regexes and then redacts properties in case sensitive data is found. Constructor that will prospectively pull in the regexes to parse and then compiles one regex object with the said parsed regexes. The propertyValue is matched on the regex and the string is redacted in the case there is a match. Interface to read the file asynchronously. It is up to the owner of the implementation to decide which file to read and from what location. Factory interface which create new instance of the IRemoteFileReader for customers to the use it to get remote file. Converts System.IO.FileAccess to Windows API FILE_ACCESS_FLAGS flags. Supports limited conversions. System.IO.FileAccess objects to convert. The flag representation of FILE_ACCESS_FLAGS conversion. If the conversion that is being requested doesn't exist, this will be thrown. Converts System.IO.FileShare to Windows API FILE_SHARE_MODE flags. Supports limited conversions. System.IO.FileShare object to convert. The flag representation of FILE_SHARE_MODE conversion. If the conversion that is being requested doesn't exist, this will be thrown. Initialize OS Version info structure by system values We get this information from Win API call to GetVersionEx Normalize path to the Registry friendly. For example, if path is: " /microsoft/visualstudio//telemetry/experiment/shippedflights " it will be transformed to: "microsoft\visualstudio\telemetry\experiment\shippedflights". - trims all whitespace and slash characters from the beginning and end of the string; - removes multiple slashes occur in the middle; - convert all '/' slash characters to '\'. Gets the root subcollection of a path. For example, if path is: microsoft\visualstudio\telemetry, the root subcollection is microsoft Check whether character is skippable. Input character True if character can be skipped Default client wrapper - create direct AI channel Return current transport Create Asimov AI channel Asimov AppInsights channel. Post data to the Vortex directly or using UTC. This path is for the folder with pending packets to send to backend. It should be in consistence with \Shared\AI\TelemetryChannels\PersistenceChannel\Windows\WindowsStorage.cs Workaround for sending Asimov pending events which was sent by the VS Setup Obtain AppInsights client wrapper Try to check specified base path for the pending files and in case pending files are found explicitly start channel to send events. Appends the Common Schema version to the EventTelemetry object Common Schema version is dependant on the EndPoint destination Base AppInsightsClientWrapper. Implement all necessary functionality for the work with AI channel. Derived by real channels: Default, Asimov Send the specified telemetry event to Application Insights. Event Transmit all internal buffers to the end-point and dispose channel. Cancellation token Create real AppInsights transport channel Base AppInsights channel. Implements base operations on AI session channel Is channel already started. Prevent from start channel several times. Gets the channel id, known by the concrete implementation. Gets used transport for the Asimov channel. Expected to be called after Start() method. In case it is called before Start() exception will be thrown. Gets or sets channel properties. It could restricts access to the channel. Initialize BaseAppInsightsSessionChannel and calculate used transport. Calculate used transport by asking concrete implementation if specific transport is used. In case specific transport is not used transportUsed just channel id. In case specific transport is used (as for combined channel UTC/Vortex) transportUsed is channelid.specific transport Start session channel opens channel and make it ready to send events. Transmit all internal buffers to the end-point and dispose channel. Cancellation token Gets a value indicating whether channel is started Gets the folder name for the Persistence storage. This is where the transmission files are stored. If/when this convention changes, PersistentStorageReceiver and other IReceivers must also be updated. Posts a telemetry event. Converts a TelemetryEvent object to AIContracts.EventTelemetry. Post routed event Appends the Common Schema version to the EventTelemetry object Common Schema version is dependant on the EndPoint destination Obtain AppInsights client wrapper Default client wrapper - create direct AI channel Return current transport Create Asimov AI channel Collector++ channel. Post data to the Collector directly or using UTC. This path is for the folder with pending packets to send to backend. It should be in consistence with \Shared\AI\TelemetryChannels\PersistenceChannel\Windows\WindowsStorage.cs Workaround for sending Asimov pending events which was sent by the VS Setup Obtain AppInsights client wrapper Try to check specified base path for the pending files and in case pending files are found explicitly start channel to send events. Appends the Common Schema version to the EventTelemetry object Common Schema version is dependent on the EndPoint destination Default client wrapper - create direct AI channel For AI channel no specific transport is used, so we return false Create default InProcess channel Default AppInsights channel. Post data to the AI backend directly. Obtain AppInsights client wrapper Appends the Common Schema version to the EventTelemetry object Common Schema version is dependant on the EndPoint destination Interface for the AppInsights Lifecycle Manager. Manager is necessary for the send signals to the AI SDK in order to properly handle offline telemetry. Application starts Application stops Gets unique channel id Gets or sets channel properties. It could restricts access to the channel. Post routed event Gets a value indicating whether session is started Process events from the queue. Process all events. Transmit all internal buffers to the end-point and dispose channel. Cancellation token Sets the action that is fired after initial events have made it through to channels. Implement Dispose resources Global test channel for all sessions. All events from all sessions are captured here. Private constructor to avoid create this object Channels which support dispose and transmit functionality. Transmit all internal buffers to the end-point and dispose channel. Cancellation token Common interface for all session channels. Session channel depends on type of channel. It could be AppInsights channel, SQM channel, ETW and so on. Interface defines methods for sending events through the channel during one session. Gets channel id Gets the transport used to post event. Format: id[.transport] Usually it just matches id, but sometime it more detailed. For example, in the case with Asimov channel it could be: aiutc.utc or aiutc.vortex Gets or sets the type of a session Gets a value indicating whether session already started Posts a telemetry event. Posts a routed telemetry event. Start session channel. SessionId required for some channels. Each channel has properties No specific settings This channel is used to transfer events by default (for ex. ai07) Channel is used for internal users only For unit test purposes This channel is not supposed to be used during unit tests because it is real channel Developer's channel is used to collect all events, even those which are going to be completely suppressed. Gets or sets type of a session Post telemetry event information Post routed event Session Start Gets a value indicating whether session is started Try to get current TelemetryEvent from the queue and remove it from queue Represents logging for posting events in the VSTelemetryLibrary to local log file Gets or sets channel properties. It could restricts access to the channel. The channel for logging telemetry events to file Post telemetry event information to log file Post routed event Channel Start Get the session ID information and start a log file writer Gets a value indicating whether channel is started Dispose managed resources. For FaultEvents, posting to Watson Gets the percent of expensive operations that will be collected, i.e. 5 means 5% of occurrences will actually create dumps Can be changed by test code Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventWatsonSampleRate /t REG_DWORD /d 100 /f [OBSOLETE] Please use data model to track performance in dev15 and above releases. More details is at http://aka.ms/datamodel. Gets activity correlation id for the current activity Gets correlation Id for this activity's parent activity Gets begin timestamp of the activity (in UTC) Gets end timestamp of the activity (in UTC) Creates the new telemetry activity class. Event name that is unique, not null and not empty. Creates a new telemetry activity parented to another activity Event name that is unique, not null and not empty. Correlation Id of the parent event Marks the activity as began and registers the current timestamp Marks the activity as ended and registers the current timestamp Marks the activity as ended and sets the duration and start time per given the duration Duration of the activity in milliseconds Returns default properties that should be on each TelemetryEvent A time when the event happend A time when the session started 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. Gets the raw value contained as the property value. We need the raw value since we want measurements for them, if available. Creates the Complex Object. Throws if val is null. ToString to make debugging easier: show in debug watch window Telemetry Context is a concept of a unit of work. More details here Gets Shared properties that are added to each event until the context is closed. Shared properties have prefix "Context.%ContextName%." Gets Realtime Shared properties calculated and added to each event until the context is closed. Shared properties have prefix "Context.%ContextName%." Gets a value indicating whether we have shared properties. This is implemented in order to avoid instantiation of empty SharedProperties dictionary Gets ContextName which serves as convenient way to differ between properties from different contexts. ContextName added to the prefix of the shared properties. Post regular context property. That property is posted to the backend immediately and not attached to the every event. You may want to consider or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Post context property. That property is posted to the backend immediately and not attached to the every event. Property could be reserved or regular. Reserved property will accomplished with prefix "Reserved." is property reserved Create TelemetrySessionContext with the name Session which owns this context Check whether context name is valid Process telemetry event. Add all shared properties Add all real-time shared properties to event Context event validator. We have to check that properties doesn't contain reserved prefixes Validate property name. Check whether property name prefix is not match to the reserved prefixes. Check whether property name is reserved Validate whether event name is context/postproperty Dispose managed resources implementation Validate event name in terms of the context validation. Name is valid if it is not reserved. Validate event properties in terms of the context validation. Property is valid if it is not contain reserved prefix. Build context event name Build context start event Build context end event Add reserved properties (Id and Name) to the event Create a telemetry event Gets the value of the property (if not scrubbed) or the ReplacementText if it is scrubbed; Gets time taken for validating the value needed to be scrubbed or not. Replacement text if a credential is detected. Helper base class to provide virtual method for releasing managed resources and preventing from calling Dispose several times. Gets a value indicating whether session is deposed - to detect redundant calls This code added to correctly implement the disposable pattern. This function throws an ObjectDisposedException if the object is disposed. User should implement it to dispose managed resources Default ETW implementation for telemetry service. Event keywords for telemetry events. These are used to separate events related to each section of telemetry API Events related to service initialization, service wide messages Events related to telemetry session initialization, session wide messages Events related to telemetry event instances like posting events Events related to telemetry activity instances like start, stop, post events Events related to telemetry context initialization, start, stop Event data submitted for all telemetry event, contains basic session information Event data submitted with telemetry activity instances that were ended with specified duration Verbose telemetry event/activity data, used to pass properties to ETW stream Creates a new Telemetry ETW provider. Writes start event for a TelemetryActivity Telemetry activity instance Writes stop event for a TelemetryActivity Telemetry activity instance Writes event for a TelemetryActivity that was ended with a specified duration Telemetry activity instance Writes an event for a TelemetryActivity when it is posted to a session. Telemetry activity instance Writes an event to indicate a telemetry event being posted to a session Telemetry event instance The class represents a telemetry event that can be posted to a server. Class is NOT thread-safe Please contact vsdmcrew@microsoft.com before making any change. Bump the version for any conditions below for data model events. 1. add new property. 2. remove property. 3. change the meaning of property value. 4. change the data type of property value. A string to indicate data source of telemetry event. It is used for backend server processing. Event property key-value storage Reserved properties key-value storage Each event should have its own unique id to be able to dedupe or match on a server side Severity level for this event. Gets or sets a value indicating whether event is friendly for the optOut session. By default it is false. If it is OptOut friendly it passes through with the event specific properties only. This behaviour can be changed by manifest rules. Gets or sets a severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. Gets event type for this event Gets schema version for this event. Gets data source. Gets correlation of this event. It represents this event when correlated with other events. Creates the new telemetry event instance. You should consider choosing , , , , or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Event name that is unique, not null and not empty. Creates the new telemetry event instance with severity information. You should consider choosing , , , , or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Event name that is unique, not null and not empty. Severity level of the event. Correlate this event with other events via . An array of that represents the correlated events. This method is not thread-safe. Creates the new telemetry event instance with specific information. Event name that is unique, not null and not empty. Severity level of the event. Data Model type of this event. check for full type list. Creates the new telemetry event instance with specific information. Event name that is unique, not null and not empty. Severity level of the event. Correlation value for this event. Creates an event for a channel from this event and session start time. Note: a returned event is not a pure copy of this event. Don't want to expose an interface, like IClonable publicly, so we use an internal method that clones from a ChannelEvent Correlate this event with other event via with description information. The property of correlated event. A description string for this correlation information, such as name, hint, tag, category. Please don't include comma which is a reserved char. It could be null or empty string. This method is not thread-safe. Gets current event name Gets a dictionary of event properties. Properties are dimensions that aggregated data can be sliced by. The key is a property name that is unique, not null and not empty. The value is any object that represents a property value. Telemetry channels must use value.ToString(CultureInfo.InvariantCulture) to send the value to a server as a string. Gets a value indicating whether properties already created. Gets or sets timestamp of the event when it is going to be posted Set by TelemetrySession Gets shared property bags Gets a dictionary of reserved event properties. These properties are for internal purposes, such as event timestamps, activity attributes. Gets a value indicating whether reserved properties already created. Check whether property name is reserved Returns default properties that should be on each TelemetryEvent A time when the event happend A time when the session started Converts property names to "Reserved." prefixed property names as needed Add data model common properties to telemetry events. ToString to make debugging easier: show in debug watch window This class represents a property that should be hashed. During processing the raw value contained will be turned into a hashed value by a cryptology algorithm. Gets the string value contained to be hashed. We pre-ToString the value, since we need InvariantCulture to guarantee that values like double always produce the same results. Gets the raw value contained as the property value. We need the raw value since we want measurements for them, if available. Creates the Hashed Object and converts to string. Throws if val is null. ToString to make debugging easier: show in debug watch window Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Validates only 'this' class but not children. Returns all children. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Parse manifest stream and create an object Parse manifest from the string ITelemetryManifestRouteArgs interface for the providing arguments to the router Validate arguments on post-parsing stage to avoid validate each time during posting events. Event is raised when one of the following is happened: - new manifest successfully read and parsed - new manifest successfully downloaded and parsed - reading manifest failed - downloading manifest failed Builds a TelemetryManifestManager from the TelemetrySession. Gets the successfully loaded manifest if any Gets a value indicating whether the operation (load/download) succeeded Builds a TelemetryManifestManager from the telemetrySession Constructs a builder using defaults for some of the member variables. The null variables will be populated later. Constructs a builder using explicitly supplied member variables. Builds the manifest manager using the telemetrySession. Format version specifies version manifest file format that current binaries are able to recognize. It is primarily used in the TelemetryManifestFileDownloader to request correct version from the server. This number is incremented when breaking changes in format are occurred. Build default manifest. It will contain default channels only Validate manifest object structure Initializes all TelemetryManifestMatchSample.IsSampleActive. The initialization is based on information from the given session, such as machine id, session id etc. Start validation of the manifest immediately after deserialization Calculated field on a deserialization step Channel id is equal to '*' make it true Gets priority which is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false if it is last action to execute. Indicator, whether is it allowed to the keep executing next actions Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Gets or sets the name of property to exclude. Gets the priority of rule in processing. This is always . Excludes the property identified by from the event. Event processor context. True in all cases. Validate the content of the rule. Thrown if is null or white space. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using eventProcessorContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false if it is last action to execute. Indicator, whether is it allowed to the keep executing next actions Validate rule on post-parsing stage to avoid validate each action every time during posting events. Base class for all manifest OptOut actions Default Execute method checks if session is OptedOut and call specific method By default no validation needed Each deriver should implement this specific OptOut action Explicitily exclude matched events from the OptOut session, even if these events were included by the custom OptOut action Implementation of the TelemetryManifestActionOptOutBase.ExecuteOptOutAction method Logic is very simple. If event matches current conditions then it is not valid for the OptOut session Explicitily exclude properties from the matched events from the OptOut session, even if these properties were included by the custom OptOut action Implementation of the ProcessPropertyName Explicitily include matched events from the OptOut session Implementation of the TelemetryManifestActionOptOutBase.ExecuteOptOutAction method Logic is very simple. If event matches current conditions then it is valid for the OptOut session Explicitily include properties from the matched events for the OptOut session Implementation of the ProcessPropertyName Base class for the work with the OptOut properties Gets or sets the properties used by the action. Note: derived classes should never set null to the property. Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Implementation of the TelemetryManifestActionOptOutBase.ExecuteOptOutAction method We need to include/exclude matched properties from/to event when user is OptedOut Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using eventProcessorContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false if it is last action to execute. Indicator, whether is it allowed to the keep executing next actions Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false if it is last action to execute. Indicator, whether is it allowed to the keep executing next actions Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Base class for all manifest OptOut actions Default Execute method checks if session is OptedOut and call specific method By default no validation needed Each deriver should implement this specific OptOut action Invalid action is necessary for specify invalid (unrecognized) action on JSON deserialization stage. During rule validation stage this action should be ignored and removed from the action list. It allows us to partitially parse manifest files with new actions. Gets action priority. 0 - highest, Inf - lowest Priority is a hardcoded property we use to sort actions for executing. We don't want to change it from manifest. Execute action on event, using telemetryManifestContext as a provider of the necessary information. Return true if it is allowed to execute next actions. Return false action forbids the event. Indicator, whether current action is not explicitely forbid current event Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Invalid match item is necessary for specify invalid (unrecognized) match item on JSON deserialization stage. During rule validation stage this item throws an exception and whole rule will be removed from the rule list. It allows us to partitially parse manifest files with new matching format. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Invalid match value item is necessary for specify invalid (unrecognized) match value item on JSON deserialization stage. During rule validation stage this item throws an exception and whole rule will be removed from the rule list. It allows us to partitially parse manifest files with new matching format. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Invalid route args item is necessary for specify invalid (unrecognized) route args on JSON deserialization stage. During rule validation stage this route action should be ignored and removed from the action list. It allows us to partitially parse manifest files with new actions. Validate arguments on post-parsing stage to avoid validate each time during posting events. Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Check, whether does event match conditions Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Contains sampling and correspoding rule. Gets full sampling name. Validates only 'this' class but not children. Explicity specify interface so that this method can only be called an instance typed to the interface and not an implementation type. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Match event if property exists in the event. Syntax { property : "VS.Core.SKU", value : { exists : true } } Check, whether passed value is match condition If property is exist this method will be called. Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Check, whether passed value is match condition Validate rule on post-parsing stage to avoid validate each action everytime during posting events. Parser exception class, using in the manifest parsers Validate router on post-parsing stage to avoid validate each action everytime during posting events. Validate rule, called automatically by TelemetryManifest object after deserializaing Validation exception class, using in the validation of the manifest after deserializaing to check its correctness. A null etw provider that does nothing with event calls. 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. Creates the Pii Object and converts to string. Throws if val is null. ToString to make debugging easier: show in debug watch window TelemetryPropertyBag is intended for the add properties to the subscibed events Collections of the property bags Check, whether we have properties Concurrent property bag Initializer of the concurrent bag Concurrent property bag with prefixed properties to avoid string duplication Initializer of the concurrent bag Non-concurrent property bag with prefixed properties to avoid string duplication This class is used to send data model events for an application work with duration and result. The event could be either or It sends one event at the beginning and the other one at the end of work. An event being or inheriting from , e.g., Gets a value indicating whether the scope is end or not. Gets an event that will be posted at the end of work. It is used to add extra properties for current work. Please don't post this event directly, use method instead. Gets correlation of start event so user can correlate with this TelemetryScope. Create and post an event for start point, and then create a user event for end point (but not posted.) Telemetry Session An event name following data model 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 function to create a new event. A object to control the TelemetryScope behavior. Because the same event name is used by both start and end events, please don't use Start or End in event name. Marks the end of this work and post end event. the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. This class is to wrap up settings used to control TelemetryScope behavior when create an instance of it. Gets or sets event properties which are added to both start and end events when create an instance of TelemetryScope. Gets or sets event severity for both start and end events in TelemetryScope. Gets or sets a value indicating whether events are opted out friendly or not. Gets or sets correlations for both start and end events in TelemetryScope. Gets or sets a value indicating whether post start event or not when create an instance of TelemetryScope. Creates the new TelemetryScopeSettings instance. Core Telemetry class. It has default session object. Gets default session Used by most, if not all, components to get a session Gets the singleton instance. Gets or sets the ETW event source instance to be used from telemetry sessions, events Allow user to change the Default Session, especially for a cloned session e.g. TelemetryService.SetDefaultSession(new TelemetrySession(clonedSettingsString) Thrown when trying to set a default session when a default session is already set. Attempts to set the Default Session, especially for a cloned session e.g. TelemetryService.TrySetDefaultSession(new TelemetrySession(clonedSettingsString) true if DefaultSession was successfully set, false if DefaultSession already existed. Create new default session with specified parameters Create new default session with specified parameters Collector++ endpoint api-ikey Create new default session with specified parameters Attach test channel for diagnostics Detach test channel Initialized the host specific ETW provider instance to be used by the telemetry service This method must be called before any telemetry APIs are used otherwise default provider will be used and the subsequent InitializeEtwProvider calls will throw. Provider instance to be used Ensures that an ETW provider is initialized. 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 unresponsiveness or fatal crash or no Internet connection for 30 days. All methods are thread-safe and return immediately. Constant for value which is not available. Default context name. Used for internal testing only Creates a new telemetry session based on a serialized string of a TelemetrySessionSettings instance. Use the SerializeSettings method of an instance of TelemetrySession to get such a string. This enables a process to post events to a telemetry session from another process. Use VSTelemetryService.DefaultSession to access the application session. Create TelemetrySession object from serialized session settings and use the session settings to setup initializer Create TelemetrySession object from serialized session settings and using custom session initializer object Gets the session Id. Gets the Configured VS Code Telemetry Level. Gets the product hosting the current session. Gets or sets a value indicating whether user is opted in. Gets or sets a value indicating for which buckets Watson reporting should be enabled for fault events. Gets or sets a value indicating for which buckets process dumps should be added for fault events. Gets or sets telemetry host name, it affects on manifest file location Gets the Telemetry Session's CancellationToken Gets or sets application id for SQM Gets a value indicating whether current session can collect PII information based on the answer from the User Information Manager Gets a value indicating whether current session belongs to internal user thus can collect information based on the answer from the User Information Manager Gets/Sets calculated sampling from the manifest file Gets machine id (SQM Machine Id) Gets user id (SQM User Id) Gets the MAC address hash. If the hash is not found in local storage, a 0 hash will be returned and the hashing process will be invoked Gets TimeSinceSessionStart in case if customers want to use it to calculate custom delays based on the same algorithm Telemetry does. Sets the action that is fired after initial events have made it through to channels. Gets or Sets the event handler for TelemetryNotificationService Start session means create default context for the session and add private information properties if it is allowed. Reads and set VS OptIn status. VS product version so it is possible to build settings path Reads and set VS OptIn status. Calculate IsOptedIn status based on OptedIn status from all installed versions of VS. If all found OptedIn statuses are true we return true, otherwise we return false. Create context with the specific name. Gets a context by the given name. null if no context with such name. Queues a telemetry event to be posted to a server. Choose this method for simplicity if the name is the only event property. You should consider choosing PostUserTask, PostOperation, PostFault or PostAsset. These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Event name that is unique, not null and not empty. Queues a telemetry event to be posted to a server. Choose this method for flexibility. You should consider choosing PostUserTask, PostOperation, PostFault or PostAsset. These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). A telemetry event that is ready to be posted. Prepares the metric event by populating metric properties, then posts the event. A telemetry metric event ready to be posted. Queues an update to for a session-wide property. You may want to consider or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Session property name that is unique, not null and not empty. Any object that represents a property value. Telemetry channels must use value.ToString(CultureInfo.InvariantCulture) to send the value to a server as a string. Adds a property to be included on the regularly recurring VS/TelemetryApi/RecurringProperties event. Unlike PostProperty or TelemetryContext.PostProperty, PostRecurringProperty does not add the given property to every event. PostRecurringProperty is most useful for values that are constant for the lifetime of a TelemetrySession. Add new session channel to the list of active channels. Serializes the TelemetrySessionSettings object. Set shared property for the session means set shared property for the default context You may want to consider or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Remove shared property for the session means remove shared property from the default context Get shared property by name. null if no shared property with such name. Get value of shared property by name as an object. Name of shared property. null if no shared property with such name. This method behaves identically to . The difference is that this method won't incur the performance penalties brought on by being the first user of dynamic in an application's lifetime. Set persisted shared property for the session means set shared property for the default context for this session and any future sessions on the machine. Set persisted shared property for the session means set shared property for the default context for this session and any future sessions on the machine. Remove persisted shared property for all sessions means remove shared property from this default context, and for any future sessions on the machine. Get persisted shared property by name. null if no shared property with such name. Register the given property bag. Unregister a property bag with the given name. Gets a property bag by the given name. null if no property bag with such name. Asynchronously dispose and try to send all telemetry over the network. Task to wait on Writes process and session information to the registry which is used by any host VS IDE to track and report the final shutdown status of this process. Gets the process start time for this session Gets the process id for this session. Start session means create default context for the session and add private information properties if it is allowed. Do we need to check whether pending events exists and explicitly start Vortex channel Creates a new default telemetry session. Creates a new telemetry session from the given initializer. Set up telemetry session properties Add context to the contexts list. Context list is necessary to add shared properties to each event. Remove context from the contexts list. Add new session channels for the current session Checks Registry located at Software\Microsoft\VisualStudio\Telemetry for default channel set by VSDYNTEL manifest v2 RegKey name = VS.Core.Telemetry.OverrideVortex Default value set in Constants Whether telemetry should be sent to collector that's set in Registry, if no value in registry, then defaults to value in Constants Updates Registry located at Software\Microsoft\VisualStudio\Telemetry for UseCollector's cached value RegKey name = VS.Core.Telemetry.UseCollector Default value = true True if diverting to Collector, or false to send to Vortex Add context properties to the event. Guard function returns value in case it is available. In case of fail it returns defaultValue provider function for getting value Validate event. Ensure that event regular properties doesn't contain Reserved. prefix Updates the telemetry collection endpoint based on manifest and available keys 1. If the collectorKey is VS then use manifest UseCollector value, and fill in missing Asimov or AppInsight keys 2. If a non VS CollectorKey is set, then UseCollector is true regardless of manifest 3. if no collector key has been set, and there exists Asimov and AppInsights keys, then UseCollector is false to allow redirection to Vortex. 4. If no collector, AI and asimov keys are available, throw exception TelemetryManifest from CDN ToString to make debugging easier: show in debug watch window Protected implementation of Dispose pattern. Add properties that may be common to all events for the session, but should not have the Default.Context prefix. Properties are not persisted between sessions. To add a single property see Thrown when properties, key, or value is null Thrown when property key or value is null Attempts to add a single property key and value that may be common to all events for the session but should not have the Context prefix. Properties are not persisted between sessions. To add multiple properties see true if the key/value pair was added, false if the key already existed. Thrown when properties, key, or value is null Thrown when property key or value is null Gets the value associated with the specified property name that will be common to all events for the session, but should not have the context or reserved prefix. Gets an IDictionary containing a copy of the CommonProperty keys and values currently in the session. IDictionary of keys and values if CommonProperty keys and values exist, null if no keys exist. Gets the global storage URI from VS Code Extension methods for to post command line arguments. Queues a telemetry event with command line flags information to be posted to the server. Only command line flags (identified by the given prefixes) will be included. A to post the event with. The prefix(s) to identify a program's flag. If session is null. If eventName is null, empty or white space. If no prefixes are specified, or all prefixes are null, empty or white space. Queues a telemetry event with command line flags information with additional properties to be posted to the server. Only command line flags (identified by the given prefixes) will be included. A to post the event with. The prefix(s) to identify a program's flag. Optional additional properties to include with the event. If session is null. If eventName is null, empty or white space. If no prefixes are specified, or all prefixes are null, empty or white space. Gets or sets the function to provide command-line arguments for the current process. Internal property to allow dependency injection from unit tests. A class to contain all data model extension methods to existing class TelemetrySession. Post an event for user task. 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. This method is used for atomic user task that runs very fast or has little value to analyze the process duration. Caller calls this method when user task is complete. 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 which tracks both start and end points. telemetry session object. An event name following data model 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; the result of this user task. If the result is Failure, recommend correlate with . a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. Specify which events to correlate by using property Good candidates to correlate with are, The user task event correlation. Post an Operation 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 or related methods. A few examples of operations are, license check, package load, windows layout loading. This method is used for atomic operation that runs very fast or has little value to analyze the process duration. Caller calls this method when operation is complete. 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 which tracks both start and end points. telemetry session object. An event name following data model 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; the result of this user task. If the result is Failure, recommend correlate with . optional parameter. a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in . E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null. Specify which events to correlate by using property Good candidates to correlate with are, The operation event correlation. Start tracking user task by posting a at the beginning of user task work, and then return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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; instance. Start tracking user task by posting a at the beginning of user task work, and then return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. instance. Start tracking user task by posting a with specified properties at the beginning of user task work, and then return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. Event properties for the start event of this scope. They are also copied to end event. instance. Start tracking user task by posting a with specified properties at the beginning of user task work, and then return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. Event properties for the start event of this scope. They are also copied to end event. Events with which this scope can correlate. instance. Start tracking user task by posting a with specified properties at the beginning of user task work, and then return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 object to control the TelemetryScope behavior. instance. Start tracking operation by posting a at the begining of operation work, and return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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; instance. Start tracking operation by posting a at the begining of operation work, and return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. instance. Start tracking operation by posting a with specified properties at the begining of operation work, and return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. Event properties for the start event of this scope. They are also copied to end event. instance. Start tracking operation by posting a with specified properties at the begining of operation work, and return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier. Event properties for the start event of this scope. They are also copied to end event. Events with which this scope can correlate. instance. Start tracking operation by posting a with specified properties at the begining of operation work, and return a object. When the user task finishes, call method to post another for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name. Telemetry Session An event name following data model 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 object to control the TelemetryScope behavior. instance. Post a Fault event. The event will always be sent to AppInsights, but if it passes sampling, it gets posted to Wason as well. It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The desription is not put in a bucket parameter, but it is in the ErrorInformation.txt file in the Cab file sent to Watson, and in the AI event The fault event correlation. Post a Fault event. The event will always be sent to AppInsights, but if it passes sampling, it gets posted to Wason as well. It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The desription is not put in a bucket parameter, but it is in the ErrorInformation.txt file in the Cab file sent to Watson, and in the AI event The severity of the fault, used to identify actionable or important faults in divisional tools and reporting. The fault event correlation. Post a Fault Event with a managed Exception object. The bucket parameters are created from the exception object. It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The fault event correlation. Post a Fault Event with a managed Exception object. The bucket parameters are created from the exception object. It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The severity of the fault, used to identify actionable or important faults in divisional tools and reporting. The fault event correlation. Post a fault event with an exception object and a callback. The callback can be used to calculate expensive data to be sent to the Watson back end, such as JScript callstacks, etc It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; can be null Allows the user to provide code to execute synchronously to gather computationally expensive info about the event The fault correlation. Post a fault event with an exception object and a callback. The callback can be used to calculate expensive data to be sent to the Watson back end, such as JScript callstacks, etc It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The severity of the fault, used to identify actionable or important faults in divisional tools and reporting. can be null Allows the user to provide code to execute synchronously to gather computationally expensive info about the event The fault correlation. Post a fault event with an exception object and a callback. The callback can be used to calculate expensive data to be sent to the Watson back end, such as JScript callstacks, etc It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; can be null Allows the user to provide code to execute synchronously to gather computationally expensive info about the event Specify which events to correlate by using property Good candidates to correlate with are, The fault correlation. Post a fault event with an exception object and a callback. The callback can be used to calculate expensive data to be sent to the Watson back end, such as JScript callstacks, etc It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The severity of the fault, used to identify actionable or important faults in divisional tools and reporting. can be null Allows the user to provide code to execute synchronously to gather computationally expensive info about the event Specify which events to correlate by using property Good candidates to correlate with are, The fault correlation. Post an Asset event. Asset is the target of user task or operation, e.g., Solution, Project, File, Extension, License, Designer. Telemetry Session An event name following data model 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; Used to identify the asset. The id should be immutable in the asset life cycle, even if the status or content changes over time. E.g., project guid is generated during project creation and will never change. This makes it a good candidate for asset id of Project asset. Used for customized properties versioning. E.g., project asset posts event with name "vs/platform/project". If the event is updated, uses this parameter to increment the version. customized properties for this asset event. Specify which events to correlate by using property Good candidates to correlate with are, (to build up asset hierarchy/extension.) The asset event correlation. Initial telemetry session configuration Gets default session initializer Build default session initializer, but modify components according to session settings. Create default session channels and return IEnumerable list of them. In the case when checkPendingAsimovEvents == true call method on Vortex and Collector channel to check whether pending telemetry is exists and in case existing Start this channel immediately. Validate initializer for the TelemetrySession Internal only interface that supports different types of telemetry sessions. Should not be made public as the current TelemetrySession uses this interface to determine what platform the service is running on. Add properties that may be common to all events for the session, but should not have the Default.Context prefix. Common properties are not persisted between sessions. To add a single property see When is null. If the properties passed in has a duplicate key, an ArgumentException is thrown. Attempts to add a single property key and value that may be common to all events for the session but should not have the Context prefix. Properties are not persisted between sessions. To add multiple properties see . true if the key/value pair was added, false if the key already existed. Thrown when or is null or empty. Loads properties common to all events. Gets the value associated with the specified propertyname that will be common to all events for the session, but should not have the context or reserved prefix. Properties are not persisted between sessions. To add multiple properties see . Gets an IDictionary containing a copy of the CommonProperty keys and values currently in the session. IDictionary of keys and values if CommonProperty keys and values exist, null if no keys exist. Registry Key to hold default channel Registry path to the cached UseCollector value Environment var that is populated with the file path to the common props json file Constant for value which is not available Default context name Timeout for the acquire "write" permission for the block posting custom events during disposing contexts from the multiple threads 1 second should be enough to finish all pending telemetry Protects from posting custom events when default context is about being disposed Until initialized, events are buffered Gets the session Id. Gets or sets the target product this session exists in. Gets the Configured VS Code Telemetry Level. Gets the product hosting the current session. Gets or sets a value indicating whether user is opted in. Gets or sets a value indicating for which buckets Watson reporting should be enabled for fault events. Gets or sets a value indicating for which buckets process dumps should be added for fault events. Gets or sets telemetry host name, it affects on manifest file location Gets the Telemetry Session's CancellationToken Gets or sets application id for SQM Gets a value indicating whether current session can collect PII information based on the answer from the User Information Manager Gets a value indicating whether current session belongs to internal user thus can collect information based on the answer from the User Information Manager Gets a value indicating whether the user should be treated as an internal Microsoft user. This is the internal implementation of IsUserMicrosoftInternal. Allows overriding the calculation depending on the type of session that is being used. Gets/Sets calculated sampling from the manifest file Gets machine id (SQM Machine Id) Gets user id (SQM User Id) Gets the MAC address hash. If the hash is not found in local storage, a 0 hash will be returned and the hashing process will be invoked Sets the action that is fired after initial events have made it through to channels. Gets or Sets the event handler for TelemetryNotificationService. Set up telemetry session properties Reads and set VS OptIn status. VS product version so it is possible to build settings path Reads and set VS OptIn status. Calculate IsOptedIn status based on OptedIn status from all installed versions of VS. If all found OptedIn statuses are true we return true, otherwise we return false. Create context with the specific name. Gets a context by the given name. null if no context with such name. Queues a telemetry event to be posted to a server. Choose this method for simplicity if the name is the only event property. You should consider choosing PostUserTask, PostOperation, PostFault or PostAsset. These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Event name that is unique, not null and not empty. Queues a telemetry event to be posted to a server. Choose this method for flexibility. You should consider choosing PostUserTask, PostOperation, PostFault or PostAsset. These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If your data point doesn't align with any VS Data Model entity, please don't force any association and continue to use this method. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). A telemetry event that is ready to be posted. Prepares the metric event by populating metric properties, then posts the event. A telemetry metric event ready to be posted. Queues an update to for a session-wide property. You may want to consider or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Session property name that is unique, not null and not empty. Any object that represents a property value. Telemetry channels must use value.ToString(CultureInfo.InvariantCulture) to send the value to a server as a string. Adds a property to be included on the regularly recurring VS/TelemetryApi/RecurringProperties event. Unlike PostProperty or TelemetryContext.PostProperty, PostRecurringProperty does not add the given property to every event. PostRecurringProperty is most useful for values that are constant for the lifetime of a TelemetrySession. Add new session channel to the list of active channels. Serializes the TelemetrySessionSettings object. Set shared property for the session means set shared property for the default context You may want to consider or These will enable a richer telemetry experience with additional insights provided by Visual Studio Data Model. If you have any questions regarding VS Data Model, please email VS Data Model Crew (vsdmcrew@microsoft.com). Remove shared property for the session means remove shared property from the default context Get shared property by name. null if no shared property with such name. Get value of shared property by name as an object. Name of shared property. null if no shared property with such name. This method behaves identically to . The difference is that this method won't incur the performance penalties brought on by being the first user of dynamic in an application's lifetime. Remove persisted shared property for all sessions means remove shared property from this default context, and for any future sessions on the machine. Get persisted shared property by name. null if no shared property with such name. Register the given property bag. Unregister a property bag with the given name. Gets a property bag by the given name. null if no property bag with such name. Asynchronously dispose and try to send all telemetry over the network. Task to wait on Gets the registry location for the UseCollector registry key. Registry path for the UseCollector registry key. Writes process and session information to the registry which is used by any host VS IDE to track and report the final shutdown status of this process. Attempt to get the exeName via the winapi call. If that fails, use the one on the sessioninitializer's HostInformationProvider, ensuring it has a '.exe' file extension for Windows Process Name Gets the process start time for this session Gets the process id for this session. Start session means create default context for the session and add private information properties if it is allowed. Do we need to check whether pending events exists and explicitly start Vortex channel Add context to the contexts list. Context list is necessary to add shared properties to each event. Remove context from the contexts list. Add new session channels for the current session Protected implementation of Dispose pattern. Start synchronous dispose can we continue with dispose or not End synchronous dispose Flush processed event. Checks Registry located at Software\Microsoft\VisualStudio\Telemetry for default channel set by VSDYNTEL manifest v2 RegKey name = VS.Core.Telemetry.OverrideVortex Default value set in Constants. For VS Code this always returns true. Whether telemetry should be sent to collector that's set in Registry, if no value in registry, then defaults to value in Constants Updates Registry located at Software\Microsoft\VisualStudio\Telemetry for UseCollector's cached value RegKey name = VS.Core.Telemetry.UseCollector Default value = true True if diverting to Collector, or false to send to Vortex Create a default context with PII properties set if we can collect it. Passes default construction of channels and UserInformationManager to Initialize method Do we need to check whether pending events exists and explicitly start Vortex channel Add 3 internal datapoints in case we are allowed to do it. Add context properties to the event. Set persisted shared property for the session means set shared property for the default context for this session and any future sessions on the machine. Set persisted shared property for the session means set shared property for the default context for this session and any future sessions on the machine. Handles the TelemetryManifestUpdateStatus event from the downloader by giving the loaded TelemetryManifest to the EventProcessor in case of the success. Updates the telemetry collection endpoint based on manifest and available keys 1. If the collectorKey is VS then use manifest UseCollector value, and fill in missing Asimov or AppInsight keys 2. If a non VS CollectorKey is set, then UseCollector is true regardless of manifest 3. if no collectorkey has been set, and there exists Asimov and AppInsights keys, then UseCollector is false to allow redirection to Vortex. 4. If no collector, AI and asimov keys are available, throw exception TelemetryManifest from CDN Handles the MACAddressHashCalculationCompleted event from the MACInformationProvider Writes a value to the registry indicating that this process is exiting normally. Updates the StillAlive registry timer every 5 minutes until this TelemetrySession is disposed ToString to make debugging easier: show in debug watch window Gets a value indicating whether the user should be treated as an internal Microsoft user. This is the internal implementation of IsUserMicrosoftInternal. Allows overriding the calculation depending on the type of session that is being used. Represents settings that are specific to a TelemetrySession. Gets or sets a value indicating whether this is the Initial Session from which all other sessions downstream will be cloned from. This property will dictate the Starting SessionID. This value is only deserialized and is never serialized to send downstream. To use this, you would need to implement a serialized session settings string in code and call . creates Session Settings that are used to create a "clone" of this Telemetry Session based on it's SessionID. Validate session id Serialize settings to json string. Use manual serialization to fix bug https://devdiv.visualstudio.com/DevDiv/VS%20IDE%20Telemetry/_workitems/edit/634853 Deserializes the passed in string into a TelemetrySessionSettings object. This method can throw an exception if the string is not in a format the serializer expects or the string does not represent a proper TelemetrySessionSettings object. Validate serialized session Helper class to start Async job with a delay. Using Start() on already planned task cause cancel current timer and start new one. Borrowed from Application Insights Microsoft.VisualStudio.ApplicationInsights.Implementation.TaskTimer class Test channel arguments Gets or sets event which was posted tostring Read and set OptedIn value for the VS. Calculate IsOptedIn status based on OptedIn status from all installed versions of VS. If all found OptedIn statuses are true we return true, otherwise we return false. Host telemetry session OptedIn status Check whether subkey matches format XX.X, where X - is a digit. Class that provides the logic to grab both the processor and machine architecture values Retrieves architectures for process and the native machine. Defaults to using IsWow64Process2 as its most accurate and will fallback to other methods if that api isn't available. ImageFileMachine friendly name value for process architecture ImageFileMachine friendly name value for native machine architecture Const for PROCESS_INFORMATION_CLASS enum change in Windows 10 v22000. https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ne-processthreadsapi-process_information_class Retrieves architectures for process and the native machine. Defaults to using IsWow64Process2 as its most accurate and will fallback to other methods if that api isn't available. ImageFileMachine value for process architecture ImageFileMachine value for native machine architecture Processors architecture list copied from winnt.h Class that provides the logic to parse Bios firmware table Parses the supplied BIOS Firmware Table byte array The BIOS firmware table a BiosInformation object Parses the supplied BIOS Firmware Table stream a BiosInformation object Gets the current CLR version Gets the string value of the environment variable Gets current CLR version Gets the string value of the environment variable Gets the process creation time Gets the Telemetry key path for the target product VS and legacy - @"Software\Microsoft\VisualStudio\Telemetry" VS Code - @"Software\Microsoft\VSCode\Telemetry" Gets the SQM Policy key path for the target product VS and legacy - Software\Policies\Microsoft\VisualStudio\SQM VS Code - Software\Policies\Microsoft\VSCode\SQM Sets a value in the Registry from the HKCU root Registry at the proper Product registry keypath which can be found by calling true if set, false if error Sets a value in the Registry from the HKCU root Registry at the proper Product registry keypath which can be found by calling name for registry key value for registry key supported RegistryValueKind's are bool, int, long true if set, false if error Gets registry key value from the product registry path. Current value or null if does not exist. This enum is used to explicitly state this session's target product. VS Code Default VS scenario to support preexisting workflows such as VS For Mac, MACSON, and Storage Explorer. Utility function to detect if session is running in VS Code or another product. Utility function to detect if session is running in VS Code or another product. Defaults to return ProductTarget.Other if the collectorApiKey is null or empty. Utility function to detect if session is running in VS Code or another product. VSCode if running in VSCode, else Other Initializes RegistryToolsHelper instance based on product target passed in. If Initialize is called multiple times for different products, only the first product target is used. when Instance is already initialized with a different Used for tests only. Used by VS Code's Reliability workflow to match Reliability configs in the Registry to watsons or crash reports. MonoFileTimeProcessCreationTime returns FileTimeUTC. MonoProcessCreationTime is used by VS for Mac's Reliability. TypeTools class is a helper to work with types of the C# objects Try convert to UInt. In case of fail return false and init result by default. Try convert to Int. In case of fail return false and init result by default. Convert to String. Never fails. Tracks the configured VS Code telemetry level and provides utilities to align and enforce telemetry levels. The configured VS Code telemetry level. See documentation for details: https://code.visualstudio.com/docs/getstarted/telemetry. The configured telemetry level is unknown. The configured telemetry level is set to "All". The configured telemetry level is set to "Error". The configured telemetry level is set to "Crash". The configured telemetry level is set to "Off". No telemetry should be sent. The configured telemetry level. Initializes a new instance of the class. Maps the raw value of the telemetry level to the internal value. This constructor signature is required to ensure we can parse items passed from the command line. The raw vs code telemetry level, as reported by the TelemetryReporter in VS Code. Validates if the configured telemetry level represented by this object permits telemetry associated with the specified level. The telemetry level configured for the app. The event's required telemetry level. True if the configured level is equally permissive or more permissive than required. Otherwise, false. Validates if the configured telemetry level represented by this object permits telemetry associated with the specified level. The minimum telemetry level needed to send a certain type of data. True if the configured level is equally permissive or more permissive than required. Otherwise, false. WatsonSessionChannelBuilder can build a WatsonSessionChannel. There is 2 stages of the creation. 1 stage is to create Builder itself with all necessary parameters to build a WatsonSessionChannel. Second stage is to Build a WatsonSessionChannel when TelemetrySession object is known. Build WatsonChannelBuilder and all its dependencies Used to affect the behavior of one or more fault events based on matching bucketer paremeter filters. For example, a fault event whose buckete parameters match the filter values can have its report to Watson disabled, or can have a process dump added. Gets the index of the specified bucket parameter name (ex. the index of "P1" would be 0). The name of the bucket parameter whose index is to be returned. The index of the bucket parameter if the name is valid, or -1 if not. Gets or sets the ID of the bucket filter. Gets or sets the Watson event type associated with the bucket filter (ex. VisualStudioNonFatalErrors2). Gets or sets the bucket parameter filters used to match against a fault event's bucket parameters. The filter values are treated as regular expressions. Gets or sets additional properties associated with a bucket filter. For example, a bucket filter used to add a process dump to a particular fault event can also specify the type of dump as an additional property. Constructs a BucketFilter object. The ID (a guid) of the bucket filter. The Watson event type of the bucket filter. Ex. VisualStudioNonFatalErrors2. Wrapper class for the Windows Error Reporting functions (not the Mock) A SynchronizationContext whose synchronously blocking Wait method does not allow any reentrancy via the message pump. A shared singleton. Initializes a new instance of the class. Gets a shared instance of this class. Synchronously blocks without a message pump. An array of type that contains the native operating system handles. true to wait for all handles; false to wait for any handle. The number of milliseconds to wait, or (-1) to wait indefinitely. The array index of the object that satisfied the wait. Creates handle to WER_DUMP_CUSTOM_OPTIONS_V3 struct containing the given process snapshot handle. Watson Report handling partial class FaultEvent, processing Exceptions and bucket information Default sample rate for sending FaultEvents to Watson The default # of maximum Watson reports generated per telemetry session The default # of minimum seconds between Watson reports (1 hour). Gets A stringbuilder that contains any information about this error report that we want to add to WER as a file e.g. the entire nested chain of exceptions registered at the Watson back end for our event "VisualStudioNonFatalErrors2" Internally, buckets range P0-P9. Externally, P1-P10 Given a FaultEvent, see if it's sampled. If so, call user provided callback and then process to Watson back end true to post to AI back end Submit the report to Watson back end on Windows Execute the user provided delegate (if any) to provide more information. it's invoked from native code slightly differently: see vscommon/testtools/VSTelemetry/VSTelemetryPackage/VSFaultEvent.cs Get the Report ID, if it is present and a report was actually submitted WER report result returned by WerReportSubmit WER report start time WER report end time If this Watson report is not sampled (!fullCab) but the user opted in to sending data like params to Watson (sendParams), then we want to send just the bucket params. True if Watson report is sampled True if user opted in to sending parameter data to Watson bool indicating if we should only send bucket parameters to Watson Synchronously capture dumps and upload report to Watson. Begins sending the Watson report. This method returns before the Watson report is sent, so some data like reportId will not be available at the time this method returns. This data is later added to the FaultEvent from . Set to true to capture heap dumps. Only bucket params will be included in Watson report if this value is true and fullCab is false Adds all the necessary files to the report. Submits the WER report Sets the WER report's bucket parameters. Uses the property to add dumps for the specified processes to the WER report. Sets the related telemetry properties in the . True if dump should be captured via a snapshot Adds a file to the report containing the text contained in the StringBuilder. Sets the telemetry properties indicating what type of dump will be collected Sends a telemetry event with properties that may not get set on original FaultEvent if dump is captured asynchronously. A GUID to correlate this event with the corresponding FaultEvent Returns an int representing the FaultEvent dump mode, with the following definitions: 0: use original FaultEvent dump implementation 1: capture dump asynchronously if the user creates a FaultEvent and sets bucketparameters already, we won't override them Removes telemetry frames from the top of a runtime stack trace the runtime stack trace the same stacktrace without the telemetry frames included A culture agnostic replacement for Exception.ToString() The exception to be converted to a string the string representation of the exception Creates a culture agnostic string represenatation of just an exception stack trace the exception defaults to false, attempts to shorten the stack to mitigate length issues a culture agnostic string represenatation of the exception stack trace Takes any collection of StackFrame objects (from an exception or the runtime stack, typically) and converts it to a culture agnostic string representation. The input stack frames the maximum length. If it is longer, it will be truncated. defaults to false, attempts to shorten the stack to mitigate length issues a culture agnostic string representation of the stack trace Include a file for the exception and any inner exceptions Todo: privacy review. get inner most exception, perhaps with a constraint first get outermost to innermost in a list, then reverse the list and apply constraint Creates a new WatsonReportBuilder instance with the specified report and event type. Class to allow mocking of pinvoke WER functions Defaults to DefaultImplementation, which actually calls the WER API called from tests to override implementation if null, restores to default Managed wrappers around wer APIs added in Windows 10 RS2 that allow access to queued or archived wer reports Represents a single Watson bucket parameter. The bucket parameter name The bucket Parameter value Defines the types of Wer report store that can be opened. Machine wide store of archived reports. You cannot depend on how long reports will be here. older reports are better obtained through the event log. Machine wide store of queued reports. Gets a value indicating whether the API is present. Should be present on RS2+. If it is not, opening a store will return null. Allows you to iterate the available wer reports on the computer. Gets an enumeration of the reports this store contains An enumeration of the reports in this store. Opens a wer report store and allows you to enumerate the reports it contains. If called on an earlier operating system where the relevant APIs do not exist, it will return an empty enumerable. Exposes information about a wer report. Gets the locally unique report ID. Should be present for all reports. Gets the event Type the report was sent to. Gets an array of length 10 with the bucket parameters for this report Gets the cab ID, if present. This will be empty for reports that are not uploaded. Gets the bucket ID. This will be empty for reports that are not uploaded. Gets the Timestamp of this report's creation 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. used for real faults (not tests) that occur within the telemetry assembly itself Gets or sets the sample rate used to calculate whether or not a qualifying fault event will be reported to Watson. A fault event qualifies for reporting to Watson if it is modified in at least one of the following methods is called on it: 1) AddErrorInformation 2) AddFile 3) AddProcessDump Gets or sets the maximum number of fault events that will be reported to Watson during the telemetry session. Gets or sets the minimum number of seconds that must elapse after a Watson report is sent for a fault event before another report can be sent. This property is obsolete. Use TelemetrySession.BucketFiltersToEnableWatsonForFaults to enable Watson reports for faults. They are now disabled by default instead of enabled by default. This property is obsolete. Use TelemetrySession.BucketFiltersToAddDumpsToFaults to add process dumps to fault events. Gets or sets a value indicating whether we sample this event locally. Affects Watson only. If false, will not send to Watson: only sends the telemetry event to AI and doesn't call callback. Changing this will force the event to send to Watson. Be careful because it can have big perf impact. If unchanged, it will be set according to the default sample rate. See Gets or sets the type of dump that's created for AddProcessDump and sent to Watson AddProcessDump indicates which processes to dump, and DumpCollectionType determines the kind of dump To get a full heap dump, set this value to WER_DUMP_TYPE.WerDumpTypeHeapDump. e.g. (ev as FaultEvent).DumpCollectionType = WER_DUMP_TYPE.WerDumpTypeHeapDump; Another way to set this property is to add a normal Telemetry Property into the TelemetryEvent Property Bag e.g. faultEvent.Properties["DUMPCOLLECTIONTYPE"] = "werdumptypeheapdump"; //works from native code, uses Enum.Parse case insensitive. The property bag setting (usable from native code) will override the Property setting (which is much more discoverable in intellisense) When calling TelemetrySession.PostEvent(faultEvent), WerReportAddDump is called for each process in AddProcesDump with the DumpCollectionType specified. All processes dumped will have the same DumpCollectionType You can control the type of dump (and even whether to send a dump) via remote settings in your GatherEventDetails callback Very useful for collecting heap dumps for those rare cases that are very difficult to debug. Once the issue is fixed, Remote settings can turn this off. Defaults to WER_DUMP_TYPE.WerDumpTypeMiniDump Gets or sets This must be an event type registered on the Watson back end like "VisualStudioNonFatalErrors2". All "normal" FaultEvents should go to VisualStudioNonFatalErrors2 Various Watson event types behave differently. For example the # and retention policy of collected cabs, the routing of cabs. e.g. "VisualStudioMemWatson" is used to collect a stream of cabs to be processed by the PerfWatson backend. These events can be queried from http://Watson . Gets or sets a value indicating whether we capture the dump file synchronously or on the threadpool. If we're collecting a dump due to ThreadPool starvation, we don't want to use the ThreadPool to collect the dump (the Threadpool is starved and by the time the dump code is run, the pool is drained) Gets or sets a value indicating whether this faultevent should be posted to AI. (telemetry internal failures can cause infinite recursion) Gets A stringbuilder that contains any information about this error report that we want to add to WER as a file callback users can add strings This keeps track of whether and how the consumer of this API opted into sending data to Watson. Gets or sets a value indicating whether or not the FaultEvent owner has modified the event in a way that would make it eligible for reporting to Watson. We don't want to report default FaultEvents to Watson because it can have performance impact, and all default properties are posted by VS Telemetry. Create an uncategorized severity FaultEvent. The pattern: 1. FEvent = new FaultEvent(...) 2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; This delegate is called to gather expensive details (like jscript call stacks) only when not sampled. The callback parameter can be cast to to a FaultEvent or (IVsFaultEvent in native) which inherits from TelemetryEvent (IVsTelemetryEvent in native) Create a FaultEvent. The pattern: 1. FEvent = new FaultEvent(...) 2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with or which may have led to the fault occurence. An event name following data model 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; The severity of the fault, used to identify actionable or important faults in divisional tools and reporting. This delegate is called to gather expensive details (like jscript call stacks) only when not sampled. The callback parameter can be cast to to a FaultEvent or (IVsFaultEvent in native) which inherits from TelemetryEvent (IVsTelemetryEvent in native) Each Watson cab includes a text file (ErrrorInformation.txt) with basic information such as Error.ToString, telemetry properties, etc. Call this to add information to the file This does the work of creating a unique temp file name per instance and adding standard information NOTE: Calling this will result in the ErrorInformation.txt being marked for PII, and therefore block the CAB upload unless the users' telemetry settings are Full. NOTE: When using FaultEvent from VisualStudio, you are strongly encouraged to not directly call AddProcessDump for the current process, but instead remotely trigger it with a targeted notification. Search for "APPLYING BUCKET FILTERS TO FAULT EVENTS" in the VS repo for details. Add the process id of a process for which to collect a dump Dump collection doese not occur unless the Watson back end requests a dump You can request a heap dump for a particular bucket from the Watson portal: https://watsonportal.microsoft.com/. Dump collection is out of process, to reduce chance of deadlock Set the bucket parameter for a Watson issue Should not contain any full file paths or PII A unique set of 10 bucket parameters constitues a BucketId, which is considered the same failure. When passing in an Exception Object, the bucket parameters are set by the IClrErrorReportingManager::GetBucketParametersForCurrentException int 0-9 max len 255. Can be queried at http://Watson Set the bucket parameter attributed to the fault's reported app name as processed in Watson and elsewhere. This is automatically set in most instances. You should only change the reported app name in very special circumstances where the app reporting telemetry isn't also the app experiencing the fault. The name of the app Set the bucket parameter attributed to the fault's reported app version as processed in Watson and elsewhere. This is automatically set in most instances. You should only change the reported app version in very special circumstances where the app reporting telemetry isn't also the app experiencing the fault. The version of the application Set the bucket parameters which compose the unique Failure ID for the reported fault as processed in Watson and elsewhere. Failure parameters which are left unspecified or passed a null value will retain their original value set by default. See the DevDiv wiki for additional documentation. This is the recommended API to use for customizing the unique failure identification process for your team's faults. The parameter value for Failure Parameter 0 The parameter value for Failure Parameter 1 The parameter value for Failure Parameter 2 The parameter value for Failure Parameter 3 The parameter value for Failure Parameter 4 Set the bucket parameters which compose the non-failure parameters as processed in Watson and elsewhere. Parameters which are left unspecified or passed a null value will retain their original value set by default. The parameter value for Non-Failure Parameter 0 The parameter value for Non-Failure Parameter 1 Get the value of a bucket parameter int 0-9 add a file to the report sent back to Microsoft ToString to make debugging easier: show in debug watch window Dump type https://msdn.microsoft.com/en-us/library/windows/desktop/bb513622(v=vs.85).aspx A limited minidump that contains only a stack trace. This type is equivalent to creating a minidump with the following options: •MiniDumpWithDataSegs •MiniDumpWithUnloadedModules •MiniDumpWithProcessThreadData •MiniDumpWithoutOptionalData A minidump. This type is equivalent to creating a minidump with the following options: •MiniDumpWithDataSegs •MiniDumpWithUnloadedModules •MiniDumpWithProcessThreadData •MiniDumpWithTokenInformation (Windows 7 and later) An extended minidump that contains additional data such as the process memory. This type is equivalent to creating a minidump with the following options: •MiniDumpWithDataSegs •MiniDumpWithProcessThreadData •MiniDumpWithHandleData •MiniDumpWithPrivateReadWriteMemory •MiniDumpWithUnloadedModules •MiniDumpWithFullMemoryInfo •MiniDumpWithThreadInfo (Windows 7 and later) •MiniDumpWithTokenInformation (Windows 7 and later) •MiniDumpWithPrivateWriteCopyMemory (Windows 7 and later) not in MSDN yet Max 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. Uncategorized faults have no severity assigned by the developer. Developers should NOT use this severity in any new instrumentation. The majority of uncategorized faults are being assigned the uncategorized value by default in legacy code. Teams with high volumes of uncategorized fault data may be asked to make changes to add real severity to their faults. Diagnostics faults represent faults which are likely informational in nature. The fault may have no clear tangible impact, it may be considered "by design" but still undesirable, or the fault only matters in relation to other faults. The fault information is nonetheless useful to investigate or root-cause an issue, or to inform future investments or changes to design, but the fault is not itself an indicator of an issue warranting attention. General faults are the most common type of fault - the impact or significance of the fault may not be known during instrumentation. Further investigation may be required to understand the nature of the fault and, if possible, assign a more useful severity. Critical faults are faults which represent likely bugs or notable user impact. If this kind of fault is seen, there is a high likelihood that there is some kind of bug ultimately causing the issue. Crash faults are faults which definitively represent a bug or notable user impact because they represent a fatal crash. While Watson or other systems may collect a crash dump, crash faults are likely to include other contextual diagnostic information. Interface for FaultCallback used for native code callers too Each Watson dump includes a text file (ErrrorInformation.txt) with basic information such as Error.ToString, telemtry properties, etc. Call this to add information to the file Creates a process dump. The dump type (Full/Mini) is controlled by the Watson back end The processid Include a file in the report Set the bucket parameter Parameter number. 0 based: internally 0-9. Externally (in event log) the 1st param is P1) Get the value for a particular bucket. Useful to get the values in the callback to see what they were set to Get the sample rate for Fault Events from registry useful for testing Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventWatsonSampleRate /t REG_DWORD /d 100 /f Get the default # of Watson reports per session from registry Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventMaximumWatsonReportsPerSession /t REG_DWORD /d 100 /f Get the default # of seconds between Watson reports from registry Reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v FaultEventMinimumSecondsBetweenWatsonReports /t REG_DWORD /d 3600 /f The registry can have an EventTag, such as "PerfLab": reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry /v EventTag /t reg_sz /d PerfLab this will be added to the Vs/TelemetryApi/Session/Initialized event with a property name "VS.TelemetryApi.RegistrySettings.EventTag", value "PerfLab" This tag can be changed without binary rebuild/re-release: the user can be instructed to set the value in the registry This EventTag can be used to group users, e.g. a select group of internal dogfood users, compare lab data to real world. a string. If empty, returns "null" This filter provider provides information about some properties. Provider is required TelemetrySession to get information from Gets filters value based on the passed enum. Formatted string to attach to the headers Experimentation service to provide functionality of A/B experiments: - reading flights; - caching current set of flights; - get answer on if flights are enabled. Gets default experimentation service Gets default setter experimentation service Gets default status experimentation service Construct an experimentation service object using an initializer obect and set it as the default Construct experimentation service object using initializer object. Get status of the requested flight, if it is enabled for the user + filters. Fast and cheap method. Does not send a telemetry event to indicate a triggered experimental scenario. Read information from the local storage. Can be used on a startup. IsCachedFlightEnabled should be called at a later point when the experimental scenario will be triggered. flight name is a string no more than 16 characters (case-insensitive) Get status of the requested flight, if it is enabled for the user + filters. Fast and cheap method. Read information from the local storage. Can be used on a startup. Sends telemetry event to indicate the triggered experimental scenario. flight name is a string no more than 16 characters (case-insensitive) Get actual flight status without sending a telemetry event to indicate a triggered experimental scenario. If requests in the progress waits on them. IsFlightEnabledAsync should be called at a later point when the experimental scenario will be triggered. Flight name (case-insensitive) cancellation token to interrupt process Get actual flight status. If requests in the progress waits on them. Sends telemetry event to indicate the triggered experimental scenario. Flight name (case-insensitive) cancellation token to interrupt process Gets list of the enabled cached flights. List of enabled cached flights Start the service. Ask all flights providers to start polling there endpoints to get actual flight set. Set flight for this machine using flightName as a flight and timeoutInMinutes as an expiration timeout. End of work with experimentation service. Release all resources. Initializer class, which contains all settings necessary for ExperimentationService functionality. Gets or sets telemetry service, which is used to send and set flights telemetry. Gets or sets filter provider, which provides filters necessary to build correct query to remote service. Gets or sets key-value storage necessary to keep local data, like cached flights. Gets or sets experimentation optin status reader to understand whether we can start/work with remote services. Create default instance of the initializer with default settings. Fill empty properties with default values without overriding initialized fields. Instance of the experimentation initializer Provides flights from the AFD (Azure Front Door): - build and send request to the AFD every 30 minutes; - parse response and update flights if necessary; - use local storage to keep flights from the previous session. Edge Endpoint only allows alphanumeric and dashes. We will use this regular expression to replace all non allowed characters with dashes. Build cach path key with filters. Key should look like: %BASE_PATH%\%ApplicationName%\%ApplicationVesion%\%Branch%\%flightsKey% Base class for the following functionality: - poll remote flight source with specific interval; - get current flights; - set current flights; - cache new flights/send signals; - cancel requests on dispose; - start polling. Build cach path key. Implementation of the IRemoteFileReaderFactory which create preset IRemoteFileReader which uses RemoteControl to download shipping flights from the Azure account. Data Class to be used to deserialize response from Edge endpoint Data Class to be used to deserialize response from Remote Control Gets or sets identifier for a set of Treatment variables Gets or sets treatment Variable dictionary string -> object Data Class to be used to deserialize response from Remote Control FlightAllocation holds a single FlightName and AllocationId for a full AssignmentContext enabled flight from Control Tower. Gets the name of flight being allocated. Gets an Id that disambiguates when the flight was allocated. Merge otherFlights into flights and returns the new Enumerable. For collisions, non-null AllocationIds are preserved over null AllocationIds and valid AllocationIds on newly unioned otherFlights will overwrite any previously existing valid AllocationId. Removes all excludedFlights from flights, matching on FlightName and disregarding AllocationId differences. Data Class to be used to deserialize response from Remote Control Implementation of the IRemoteFileReader interface to read remote file using preset remote control instance. Implementation of the IRemoteFileReaderFactory which create preset IRemoteFileReader which uses RemoteControl to download shipping flights from the Azure account. Provides flight configurations from the local machine's registry. List of real flight providers Perform action for all available providers Gets active flights set by the setter API. We get all information from the local storage. Flight list immutable once it is requested until the end of the process. That means if flight was set in this instance and flight list was requested before this call the flight will not be active until the next instance. Set new flight. Raw flight data are in the format: "flight_name#yyyy-MM-dd HH:mm:ssZ". First part (before '#') is the flight name and second part (after '#') is the expiration date of the flight. Return clean set of the flight (without expired flights). Parse raw flight to the structure. Raw value is in format: flight#2017-12-12 03:24:59Z Implementation of the IRemoteFileReaderFactory which create preset IRemoteFileReader which uses RemoteControl to download shipping flights from the Azure account. All available filters, can be updated. UserId which is used as primary unit for the experimentation. Name of the application which uses experimentation service. Version of the application which uses experimentation service. Sku of the application (VS specific - empty string if not applicable). branch of the application (VS specific - empty string if not applicable). Is user is Microsoft internal. Installation channel id. IExperimentationFilterProvider provides filter`s values. Get filter value by enum Provides current optedin status for the user to experimentation service. Gets a value indicating whether user is optedin to the experimentation service. Experimentation service provides A/B experimentation functionality. Get status of the requested flight, if it is enabled for the user + filters. Fast and cheap method. Read information from the local storage. Can be used on a startup. flight name is a string no more than 16 characters (case-insensitive) Get actual flight status. If requests in the progress waits on them. Interesting flight name (case-insensitive) cancellation token to interrupt process Start the service. Ask all flights providers to start polling there endpoints to get actual flight set. IExperimentationService2 provides information about all cached flights. Gets all enabled cached flights IExperimentationService3 provides information about Treatment Variables Get config data for experiments. Fast and cheap method. Read information from the local storage. Can be used on a startup. Configuration Id (case sensitive) for a set of Treatment Variables Dictionary of treatment variables. Get config data for experiments. If request is in the progress wait. Interesting configutation Id (case sensitive) cancellation token to interrupt process Dictionary of treatment variables. Returns the string value of the Treatment Variable or null if not found or wrong type. Example: TV: VisualStudio.stringTreatmentVariable: "foo" ConfigId. This is the intial part of the Treatment variable name. (e.g. VisualStudio) Treatment variable name. (e.g. stringTreatmentVariable) Cancellation token string Value of Treatment Variable, null is returned if the treatment variable requested is not present or of a differnt type. Returns the int value of the Treatment Variable or null if not found or wrong type. Example: TV: VisualStudio.intTreatmentVariable: 42 ConfigId. This is the intial part of the Treatment variable name. (e.g. VisualStudio) Treatment variable name. (e.g. intTreatmentVariable) Cancellation token int? Value of Treatment Variable, null is returned if the treatment variable requested is not present or of a differnt type. Returns the value of the Treatment Variable or null if not found. Example: TV: VisualStudio.boolTreatmentVariable: true ConfigId. This is the intial part of the Treatment variable name. (e.g. VisualStudio) Treatment variable name. (e.g. boolTreatmentVariable) Cancellation token bool? Value of Treatment Variable, null is returned if the treatment variable requested is not present or of a differnt type. Returns the value of the Treatment Variable or null if not found. Example: TV: VisualStudio.numTreatmentVariable: 4.3 ConfigId. This is the intial part of the Treatment variable name. (e.g. VisualStudio) Treatment variable name. (e.g. numTreatmentVariable) Cancellation token double? Value of Treatment Variable, null is returned if the treatment variable requested is not present or of a differnt type. IExperimentationSetterService provides functionality to set particular flight with expiration date. Set flight for this machine using flightName as a flight and timeoutInMinutes as an expiration timeout. IExperimentationStatusService provides methods to query status of a flight without triggering the experimental scenario. Get status of the requested flight, if it is enabled for the user + filters. Fast and cheap method. Does not send a telemetry event to indicate a triggered experimental scenario. Read information from the local storage. Can be used on a startup. IsCachedFlightEnabled should be called at a later point when the experimental scenario will be triggered. flight name is a string no more than 16 characters (case-insensitive) Get actual flight status without sending a telemetry event to indicate a triggered experimental scenario. If requests in the progress waits on them. IsFlightEnabledAsync should be called at a later point when the experimental scenario will be triggered. Interesting flight name (case-insensitive) cancellation token to interrupt process Telemetry for the experimentation service. Set shared property for all events. Opst one event with specified namd and property bag. Extended Telemetry for the experimentation service. Post a fault event with name and description Extended Telemetry for the experimentation service. Set shared property for all events. Opst one event with specified namd and property bag. Gets list of known so far Gets list of the Configs containing Treatment Variables Wait for all asynchronous operations are ready (like reading from file, network, etc) When operation completes Flights will be up to dated with actual value Start working expensive operations (like network calls) Storage which provides key-value pairs. Gets current value from the storage Sets value to the storage. Severity of the message Just informational message. Warning. Error. Critical error, can't continue. Logger interface Gets or sets a value indicating whether logger enabled or not. Gets full logger file path Log current string with severity Severity Component id, so it would be easy to filter later, might be null or empty Required free form logger text Local file logger writes one line per event. File path specified once per creation and can't be changed during lifetime. It is possible to Enable/Disable logger during the object lifetime. By default logger is created disabled. Once logger enabled log file is either created or opened for appending. Flush on disk happens after every record to be sure that data will persist even in the case of abnormal program termination. Use soft dispose method. No exceptions after dispose, just no-op. That would help for centralized logger, when logger is disposed and some stale component trying to use it. We don't want to fail the whole application in this case. The number of times this object was disposed. Default constructor Constructor with specified logger file name Internal constructor for unit testing Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Generate unique file name. Unique name guaranteed by process name, process id, datatime, incremental sequence number per process. Generated full path name Controls default logger lifetime Gets or sets default logger instance Gets or create and gets default logger instance Null Local file logger placeholder for non-Windows platforms. Default constructor Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Implementation of some default remote settings filters that all apps should be able to take advantage of. Construct a default Remote Settings filter provider from the passed in TelemetrySession Determines if we are running in a cloud instance and the particular partner ID. Container for the telemetry policy values AllowTelemetry value for the Windows group data collection policy. AllowTelemetry value for the current Windows data collection policy. LimitDumpCollection value for the Windows group data collection policy. This QWORD value indicates whether a device is opted into various Microsoft Special Programs (MSP). Among other things, these identify whether the device is opted into the Data Processing Service for Windows (DPSW, aka Windows as a Processor) or not. DPSW devices will not route any data to Client Watson, regardless of the above AllowTelemetry values. Instead, Watson reports will be routed to the Enterprise Data Platform (EDP). MSP Bit flags documentation: https://1dsdocs.azurewebsites.net/schema/Types/MspType.html DPSW/EDP docs: https://aka.ms/dpsw https://msazure.visualstudio.com/One/_wiki/wikis/One.wiki/24344/Enterprise-Data-Platform Represents a Json file that has been copied down from Azure. Gets the collection of scopes that were deserialized from the remote settings json file or null if there was an error parsing the json file. Gets the collection of settings that were deserialized from the remote settings json file or null if there was an error parsing the json file. Gets the error message that occurred while parsing the json file. If the json file was parsed successfully this will be null. Gets a value indicating whether the json file was parsed correctly. Merges the passed in GroupedRemoteSettings from buckets into this instance. Identical settings in this instance will be overwritten by those in buckets. Kind of a value in the collection. Value kind is unknown or the value doesn't exist A string value Multiple strings value A 32 bit value such as an int or bool. A 64 bit value such as a long. Storage which provides key-value pairs, along with collections of key-value pairs. Gets current value from the storage Gets current value from storage and indicates if key was found in storage. true if value in storage, default(T) if not in storage Gets kind of value from storage. Sets value to the storage. Gets all the property names under a specific collection. Gets all the sub-collection names under a specific collection. Determines if the collection exists. Determines if the collection exists. Deletes an entire collection, it's properties, and all sub-collections. Deletes a property under a collection. Remote settings provide configurable settings without code changes. Subscribe to this event to be notified when Remote Settings have been updated. Gets a remote setting value that is updated with both Targeted Notifications backend and RemoteControl file. This does not return the most up-to-date setting, but the value of whatever RemoteSettings has processed so far. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Value to return if remote setting does not exist Remote setting value if it exists, otherwise defaultValue Gets remote setting value if one exists. Path to the remote setting collection in the form My\Custom\Path Key of the Remote Setting The value if it exists or default(T) True if value exists, false if it does not Gets a remote setting value, that is updated with both Targeted Notifications backend and RemoteControl file. Must be called after Start. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Value to return if remote setting does not exist Remote setting value if it exists, otherwise defaultValue Gets kind of a remote setting value. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Kind of the value or unknown if it does not exist or error. Gets all remote actions of type T, wrapped in ActionWrapper. Waits for the call to Targeted Notifications backend to complete. Must be called after Start. Unique path to identify the actions to retrieve Starts a background operation to check for new Remote Settings on both Targeted Notifictions and Remote Control backend and apply them. Add a scope filter provider. Not implemented yet. A filter provider IRemoteSettings interface for chaining Gets all the property names under a specific collection. Path to the remote setting collection in the form My\Custom\Path IEnumerable of all properties under the specified collection. Empty if no properties exist. Gets all the sub-collection names under a specific collection. Path to the remote setting collection in the form My\Custom\Path IEnumerable of the names of the sub collections. Empty if it does not exist. Determines if the collection exists. Path to the remote setting collection in the form My\Custom\Path True if the colleciton exists, otherwise false Determines if the property exists. Path to the remote setting collection in the form My\Custom\Path Key of the Remote Setting True if the property exists, otherwise false IRemoteSettings2 provides subscribable settings without code changes Subscribes to triggered remote actions of type T on the given action path. Unique path to identify the actions to subscribe Callback to be invoked with each individual action when it becomes available Unsubscribes from triggered remote actions on the given action path Unique path to identify the actions to unsubscribe Gets current value from storage and indicates if key was found in storage. true if value in storage, default(T) if not in storage Gets current value from storage and indicates if key was found in storage. true if value in storage, default(T) if not in storage Interface that describes the Telemetry operations Remote Settings will use. Posts the named event and properties to Telemetry. name of the event dictionary of properties Creates a Telemetry Activity with the specified name. The name of the activity. Interface for telemetry activity. Starts the Telemetry Activity Ends the Telemetry Activity Posts the Telemetry Activity Provides a scope filter. Gets name of the filter provider Gets kind of value from storage. Gets all the property names under a specific collection. Gets all the sub-collection names under a specific collection. Determines if the collection exists. Determines if the property exists. Interface that describes the Telemetry operations Remote Settings will use. Adding a second instance to avoid breaking external consumers. Gets the ID of the telemetry session. Posts a successful operation to telemetry. The name of the operation event. Any additional properties to add to the telemetry event. Posts a fault event to telemetry with diagnostic severity. The name of the fault event. The human-readable description of the fault event. The exception attributed to the fault, if applicable. Any additional properties to add to the telemetry event. Posts a fault event to telemetry with general severity. The name of the fault event. The human-readable description of the fault event. The exception attributed to the fault, if applicable. Any additional properties to add to the telemetry event. Posts a fault event to telemetry with critical severity. The name of the fault event. The human-readable description of the fault event. The exception attributed to the fault, if applicable. Any additional properties to add to the telemetry event. Starts a background operation to check for new Remote Settings and apply them. Remote settings from file Implementation of the IRemoteFileReader interface to read remote file using preset remote control instance. Implementation of the IRemoteFileReaderFactory which create preset IRemoteFileReader which uses RemoteControl to download shipping flights from the Azure account. Represents a single setting. Gets the path of the setting. Gets the name of the setting. Gets or sets the ScopeString associated with this setting, or Null. Gets the value of the setting. Data types of the Remote Settings Invalid data type. 4 byte setting 8 byte setting Data type used to store string. Remote settings provide configurable settings without code changes. Subscribe to this event to be notified when Remote Settings have been updated. Construct a new Remote Setting instance with values taken from the initializer. Values with which to initialize Gets a default remote settings instance that uses a "Default.json" file. Gets a remote setting value that is updated with both Targeted Notifications backend and RemoteControl file. This does not return the most up-to-date setting, but the value of whatever RemoteSettings has processed so far. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Value to return if remote setting does not exist Remote setting value if it exists, otherwise defaultValue Gets remote setting value if one exists. Path to the remote setting collection in the form My\Custom\Path Key of the Remote Setting The value or default(T) True if value exists, false if it does not Gets kind of a remote setting value. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Kind of the value or unknown if it does not exist or error. Gets a remote setting value, that is updated with both Targeted Notifications backend and RemoteControl file. Must be called after Start. Path to the remote setting collection in the form My\Custom\Path Key of the remote setting Value to return if remote setting does not exist Remote setting value if it exists, otherwise defaultValue Gets all remote actions of type T, wrapped in ActionWrapper. Waits for the call to Targeted Notifications backend to complete. Must be called after Start. Unique path to identify the actions to retrieve Subscribes to triggered remote actions of type T on the given action path. Unique path to identify the actions to subscribe Callback to be invoked with each individual action when it becomes available Unsubscribes to triggered remote actions on the given action path Unique path to identify the actions to unsubscribe Starts a background operation to check for new Remote Settings and apply them. Add a scope filter provider. A filter provider IRemoteSettings interface for chaining Gets all the property names under a specific collection. Path to the remote setting collection in the form My\Custom\Path IEnumerable of all properties under the specified collection. Empty if no properties exist. Gets all the sub-collection names under a specific collection. Path to the remote setting collection in the form My\Custom\Path IEnumerable of the names of the sub collections. Empty if it does not exist. Determines if the collection exists. Path to the remote setting collection in the form My\Custom\Path True if the colleciton exists, otherwise false Determines if the property exists. Path to the remote setting collection in the form My\Custom\Path Key of the Remote Setting True if the property exists, otherwise false RemoteSettingsFilterProvider provides filter`s values. MachineId UserId VSid of the signed-in user (VS specific - empty Guid if not applicable). Culture string of the application. Branch of the application (VS specific - empty string if not applicable). Name of the application which uses remote settings service. Version of the application which uses remote settings service. Sku of the application (VS specific - empty string if not applicable). Number of notifications that have been sent Guid of the AppId package (VS specific - empty string if not available). MacAddressHash Installation channel id. Installation channel manifest id. Installation manifest id. OS type. Currently only "Windows" Current OS Version Whether or not user is Microsoft internal Session Role, client or server Version of the CLR being used Process architecture value The product the client is being used in The Group Policy for telemetry The Local Policy for telemetry The dump collection policy Get the current MSP flag settings Initializer for Remote Settings Gets or sets whether to use default prefix for collection names in Key-Value storage. Like "Software\Microsoft\VisualStudio\RemoteSetting" Gets or sets the collection of ScopeFilterProviders that are registered to provide scopes. Gets or sets the remote settings file name. Gets or sets the CollectionKeyValueStorage that will be used for the Remote Settings. Gets or sets the IExperimentationService that will be used to provide Flight scopes. Gets or sets the ITelemetryNotificationProvider that will be used to subscribe to telemetry events. Gets or sets the telemetry implementation that will be used to log telemetry about Remote Settings operations. Gets or sets the implementation utilized for core Targeted Notifications telemetry. Gets or sets the storage mechanism utilitized for Targeted Notifications client side caching. Gets or sets the filter provider that will be used to provide values for the Targeted Notifications request plus Scope Providers. Gets or sets the key value storage that will be used for non scoped settings, as a way for consumers to access RemoteSettings directly without having to go through this library. Gets or sets the names of root subcollections that will hold stable settings. The first time a setting under one of these subcollections gets requested, the value is cached, and RemoteSettings will continue to return this value for the rest of the process lifetime. Helper class used for parsing a settings file that was copied down from Azure. Deserializes the contents of a remote settings file. This never throws an exception. If an error occurs while parsing the Error property will be set with an error message. The stream of json to parse. An object representing the json. Returns a SplitKey or null if storageName not in correct format. Handles requests for Flight.NameOfFlight Name of the flight A True if flight is enabled. Handles async requests for Flight.NameOfFlight Name of the flight A True if flight is enabled. Provides a multi-value scope filter in an async way that maps a key to a specific . Provides a ScopeValue for the specified key. The for the passed in key. Provides a multi-value scope filter that maps a key to a specific . Provides a ScopeValue for the specified key. The for the passed in key. Handles requests for IsInternal A True if user is internal Provides a single in an async way. Provides a Provides a single . Provides a Handles requests for Scope.NameOfScope The name of the Scope to evaluate. A True if the Scope evaluates to True. Handles async requests for Scope.NameOfScope The name of the Scope to evaluate. A True if the Scope evaluates to True. A bool Constructs a ScopeValue with the passed in bool value. Determines if there is a cycle in the graph. True if there is a cycle, returns as soon as one is found Colors nodes to determine if there is a cycle in the graph. True if there is a cycle A double Constructs a ScopeValue with the passed in double value. Scope parser exception class, using in running Scope Strings to check its correctness. A value that a Scope can have. A string Constructs a ScopeValue with the passed in string value. Gets or sets all the telemetry triggers that apply to this action. And example of a valid json would be: { "start": { "triggerOnSubscribe": true }, "stop": { "event": "some/telemetry/event" }, "customEventName": { "triggerAlways": true "and": [ { "event": "some/other/telemetry/event" }, { "property": "some.property", "value": { "gt": 100 } } ] } } This entire field will be deserialized into two types: IDictionary<string, ITelemetryEventMatch$gt; IDictionary<string, ActionTriggerOptions$gt; There can be any number of triggers specified in the Json. "TriggerOnSubscribe" is only valid on the special "start" trigger. If "start" does not specify "TriggerOnSubscribe" then it must have a full valid ITelemetryEventMatch set of telemetry conditions like all other triggers. Provides information about why a remote settings action subscription callback was invoked Well known name of the initial start trigger for triggered Targeted Notifications rules. Well known name of the final stop trigger for triggered Targeted Notifications rules. Gets a value indicating whether the invoked trigger is set to trigger on every event match, or just once. Gets a value indicating whether the trigger was invoked directly after subscribing or not. Gets the telemetry event that matched given filter conditions, if a telemetry notification subscription is the reason this callback was invoked Gets the names of all triggers to which this rule is subscribed. Gets the trigger name being invoked Unsubscribes from the trigger event specified by TriggerName Unsubscribes from all triggers specified alongside TriggerName in the Targeted Notifications back-end. Gets or sets a value indicating whether the trigger should be invoked directly after subscribing or not. Gets or sets a value indicating whether the trigger should be invoked every time the given conditions are met, or only the first time. An action of type T that is defined on the TargetedNotifications backend. Gets the path under which this action lives. Gets the typed action. Gets the precedence of actions of within the same ActionPath. Higher indicates higher precedence. Gets a unique identifier for the rule. Gets a name for the type of action. Useful if consumer wants to handle processing their own actions. Gets an experimentation flight that needs to be enabled in order for this action to have been returned. Gets any subscription details for this action Gets or sets a dictionary of CategoryId -> CachedActionCategoryTime Gets or sets a dictionary of RuleId -> CachedActionResponseTime Interface that describes a means of locally storing a CachedTargetedNotifications object representing locally cached TN rules. Loads the cache and returns a copy of it Saves the cache, overriding any existing cache Locks all access to cache across all threads and processes Milliseconds to wait for the lock to be acquired before timing out. Leave null for infinite wait. True if the lock was acquired. False if it was not (due to timeout) Releases a held Lock Resets the local cache store to its initial/empty state Called when a new ActionResponseBag is received from the service. This merges that new data into the existing cache An ActionResponseBag received from the Azure API Set of rule IDs that were previously read from the cache and should not be written back Maximum time to wait, in milliseconds, for the cache lock. Leave null for infinite. Gets all rule IDs currently stored in the local cache Maximum time to wait, in milliseconds, for the cache lock. Leave null for infinite. An IEnumerable of the rule IDs as strings. The IEnumerable will be empty of the timeout expires. Given an action, determines if that action can be sent now, meaning it isn't SendOnce and already sent by another instance and any Category courtesy WaitTimeSpans are expired. This function updates cache state to indicate any returned action has been sent before returning it. The single action to check Milliseconds to wait for cache access. Leave null for infinite. The action, if it is safe to sent to a feature, or null if it is not or the call timed out. Given a set of actions, determines which of them can be sent now, meaning they aren't SendOnce and already sent by another instance and any Category courtesy WaitTimeSpans have expired. This function updates cache state to indicate any returned actions have been sent before returning them. IEnumerable of ActionResponses to check against Milliseconds to wait for cache access. Leave null for infinite. A subset of the given actions that are sendable. Acquires a system-wide lock on the shared cache Max milliseconds to wait for lock True if the lock was acquired, False if the timeout was reached without acquiring the lock Releases a previously acquired system-wide lock on the shared cache Gets file version found in the json file or null of there was an error parsing the josn file. Gets the changeset Id found in json file or null of there was an error parsing the josn file. CsWin32's generated PssCaptureSnapshot and PssFreeSnapshot use a SafeProcessHandle for the process handle, which is not available in net45. To get around this, we define our own PInvoke methods that use IntPtr instead of SafeProcessHandle. Contains extern methods from "AdvApi32.dll". Contains extern methods from "Gdi32.dll". Contains extern methods from "Kernel32.dll". Contains extern methods from "NetApi32.dll". Contains extern methods from "ShlwApi.dll". Contains extern methods from "User32.dll". Contains extern methods from "wer.dll". Windows applications can use this control code to return the properties of a storage device or adapter. The optional output buffer returned through the *lpOutBuffer* parameter can be one of several structures depending on the value of the **PropertyId** member of the [STORAGE_PROPERTY_QUERY](ns-winioctl-storage_property_query.md) structure pointed to by the *lpInBuffer* parameter. These values are enumerated by the [STORAGE_PROPERTY_ID](ne-winioctl-storage_property_id.md) enumeration. If the **QueryType** member of the **STORAGE_PROPERTY_QUERY** is set to **PropertyExistsQuery** then no structure is returned. Read more on docs.microsoft.com. Retrieves the physical location of a specified volume on one or more disks. In Windows 8 and Windows Server 2012, this code is supported by the following technologies. Technology | Supported -----------|---------- Server Message Block (SMB) 3.0 protocol | No SMB 3.0 Transparent Failover (TFO) | No SMB 3.0 with Scale-out File Shares (SO) | No Cluster Shared Volume File System (CsvFS) | Yes Read more on docs.microsoft.com. Documentation varies per use. Refer to each: IMbnRadioEvents.OnSetSoftwareRadioStateComplete, IMbnSmsEvents.OnSmsSendComplete, IMbnPinManagerEvents.OnGetPinStateComplete, IMbnPinEvents.OnChangeComplete, IMbnSmsEvents.OnSetSmsConfigurationComplete, IMbnPinEvents.OnEnterComplete, IMbnPinEvents.OnUnblockComplete, IMbnSmsEvents.OnSmsDeleteComplete, IMbnSmsEvents.OnSmsReadComplete, IMbnConnectionContextEvents.OnSetProvisionedContextComplete, IMbnPinEvents.OnEnableComplete, IMbnConnectionEvents.OnConnectComplete, IMbnPinEvents.OnDisableComplete, IMbnServiceActivationEvents.OnActivationComplete. The GetDeviceCaps function retrieves device-specific information for the specified device. A handle to the DC. The return value specifies the value of the desired item. When nIndex is BITSPIXEL and the device has 15bpp or 16bpp, the return value is 16. Learn more about this API from docs.microsoft.com. Closes an open object handle. A valid handle to an open object. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. If the application is running under a debugger, the function will throw an exception if it receives either a handle value that is not valid or a pseudo-handle value. This can happen if you close a handle twice, or if you call CloseHandle on a handle returned by the FindFirstFile function instead of calling the FindClose function. Learn more about this API from docs.microsoft.com. Creates or opens a file or I/O device. The most commonly used I/O devices are as follows:\_file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. The name of the file or device to be created or opened. You may use either forward slashes (/) or backslashes (\\) in this name. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, use this Unicode version of the function and prepend "\\\\?\\" to the path. For more information, see Naming Files, Paths, and Namespaces. For information on special device names, see Defining an MS-DOS Device Name. To create a file stream, specify the name of the file, a colon, and then the name of the stream. For more information, see File Streams.
Tip Starting with Windows 10, version 1607, for the unicode version of this function (CreateFileW), you can opt-in to remove the MAX_PATH limitation without prepending "\\?\". See the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.
Read more on docs.microsoft.com. The requested access to the file or device, which can be summarized as read, write, both or neither zero). The most commonly used values are GENERIC_READ, GENERIC_WRITE, or both (GENERIC_READ | GENERIC_WRITE). For more information, see Generic Access Rights, File Security and Access Rights, File Access Rights Constants, and ACCESS_MASK. If this parameter is zero, the application can query certain metadata such as file, directory, or device attributes without accessing that file or device, even if GENERIC_READ access would have been denied. You cannot request an access mode that conflicts with the sharing mode that is specified by the dwShareMode parameter in an open request that already has an open handle. For more information, see the Remarks section of this topic and Creating and Opening Files. Read more on docs.microsoft.com. The requested sharing mode of the file or device, which can be read, write, both, delete, all of these, or none (refer to the following table). Access requests to attributes or extended attributes are not affected by this flag. If this parameter is zero and CreateFile succeeds, the file or device cannot be shared and cannot be opened again until the handle to the file or device is closed. For more information, see the Remarks section. You cannot request a sharing mode that conflicts with the access mode that is specified in an existing request that has an open handle. CreateFile would fail and the GetLastError function would return ERROR_SHARING_VIOLATION. To enable a process to share a file or device while another process has the file or device open, use a Read more on docs.microsoft.com. A pointer to a SECURITY_ATTRIBUTES structure that contains two separate but related data members: an optional security descriptor, and a Boolean value that determines whether the returned handle can be inherited by child processes. This parameter can be NULL. If this parameter is NULL, the handle returned by CreateFile cannot be inherited by any child processes the application may create and the file or device associated with the returned handle gets a default security descriptor. The lpSecurityDescriptor member of the structure specifies a SECURITY_DESCRIPTOR for a file or device. If this member is NULL, the file or device associated with the returned handle is assigned a default security descriptor. CreateFile ignores the lpSecurityDescriptor member when opening an existing file or device, but continues to use the bInheritHandle member. The bInheritHandlemember of the structure specifies whether the returned handle can be inherited. For more information, see the Remarks section. Read more on docs.microsoft.com. An action to take on a file or device that exists or does not exist. For devices other than files, this parameter is usually set to OPEN_EXISTING. For more information, see the Remarks section. Read more on docs.microsoft.com. The file or device attributes and flags, FILE_ATTRIBUTE_NORMAL being the most common default value for files. This parameter can include any combination of the available file attributes (FILE_ATTRIBUTE_*). All other file attributes override FILE_ATTRIBUTE_NORMAL. This parameter can also contain combinations of flags (FILE_FLAG_*) for control of file or device caching behavior, access modes, and other special-purpose flags. These combine with any FILE_ATTRIBUTE_* values. This parameter can also contain Security Quality of Service (SQOS) information by specifying the SECURITY_SQOS_PRESENT flag. Additional SQOS-related flags information is presented in the table following the attributes and flags tables.
Note When CreateFile opens an existing file, it generally combines the file flags with the file attributes of the existing file, and ignores any file attributes supplied as part of dwFlagsAndAttributes. Special cases are detailed in Creating and Opening Files.
Some of the following file attributes and flags may only apply to files and not necessarily all other types of devices that CreateFile can open. For additional information, see the Remarks section of this topic and Creating and Opening Files. For more advanced access to file attributes, see SetFileAttributes. For a complete list of all file attributes with their values and descriptions, see File Attribute Constants.
This doc was truncated. Read more on docs.microsoft.com. A valid handle to a template file with the GENERIC_READ access right. The template file supplies file attributes and extended attributes for the file that is being created. This parameter can be NULL. When opening an existing file, CreateFile ignores this parameter. When opening a new encrypted file, the file inherits the discretionary access control list from its parent directory. For additional information, see File Encryption. Read more on docs.microsoft.com. If the function succeeds, the return value is an open handle to the specified file, device, named pipe, or mail slot. If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com.
Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation. A handle to the device on which the operation is to be performed. The device is typically a volume, directory, file, or stream. To retrieve a device handle, use the CreateFile function. For more information, see Remarks. Read more on docs.microsoft.com. The control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it. For a list of the control codes, see Remarks. The documentation for each control code provides usage details for the lpInBuffer, nInBufferSize, lpOutBuffer, and nOutBufferSize parameters. Read more on docs.microsoft.com. A pointer to the input buffer that contains the data required to perform the operation. The format of this data depends on the value of the dwIoControlCode parameter. This parameter can be NULL if dwIoControlCode specifies an operation that does not require input data. Read more on docs.microsoft.com. The size of the input buffer, in bytes. A pointer to the output buffer that is to receive the data returned by the operation. The format of this data depends on the value of the dwIoControlCode parameter. This parameter can be NULL if dwIoControlCode specifies an operation that does not return data. Read more on docs.microsoft.com. The size of the output buffer, in bytes. A pointer to a variable that receives the size of the data stored in the output buffer, in bytes. If the output buffer is too small to receive any data, the call fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and lpBytesReturned is zero. If the output buffer is too small to hold all of the data but can hold some entries, some drivers will return as much data as fits. In this case, the call fails, GetLastError returns ERROR_MORE_DATA, and lpBytesReturned indicates the amount of data received. Your application should call DeviceIoControl again with the same operation, specifying a new starting point. If lpOverlapped is NULL, lpBytesReturned cannot be NULL. Even when an operation returns no output data and lpOutBuffer is NULL, DeviceIoControl makes use of lpBytesReturned. After such an operation, the value of lpBytesReturned is meaningless. If lpOverlapped is not NULL, lpBytesReturned can be NULL. If this parameter is not NULL and the operation returns data, lpBytesReturned is meaningless until the overlapped operation has completed. To retrieve the number of bytes returned, call GetOverlappedResult. If hDevice is associated with an I/O completion port, you can retrieve the number of bytes returned by calling GetQueuedCompletionStatus. Read more on docs.microsoft.com. A pointer to an OVERLAPPED structure. If hDevice was opened without specifying FILE_FLAG_OVERLAPPED, lpOverlapped is ignored. If hDevice was opened with the FILE_FLAG_OVERLAPPED flag, the operation is performed as an overlapped (asynchronous) operation. In this case, lpOverlapped must point to a valid OVERLAPPED structure that contains a handle to an event object. Otherwise, the function fails in unpredictable ways. For overlapped operations, DeviceIoControl returns immediately, and the event object is signaled when the operation has been completed. Otherwise, the function does not return until the operation has been completed or an error occurs. Read more on docs.microsoft.com. If the operation completes successfully, the return value is nonzero. If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Enumerates all system firmware tables of the specified type. A pointer to a buffer that receives the list of firmware tables. If this parameter is NULL, the return value is the required buffer size. For more information on the contents of this buffer, see the Remarks section. Read more on docs.microsoft.com. The size of the pFirmwareTableBuffer buffer, in bytes. If the function succeeds, the return value is the number of bytes written to the buffer. This value will always be less than or equal to BufferSize. If the function fails because the buffer is not large enough, the return value is the required buffer size, in bytes. This value is always greater than BufferSize. If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves the command-line string for the current process. The return value is a pointer to the command-line string for the current process. Learn more about this API from docs.microsoft.com. Retrieves a pseudo handle for the current process. The return value is a pseudo handle to the current process. Learn more about this API from docs.microsoft.com. Retrieves the process identifier of the calling process. The return value is the process identifier of the calling process. Learn more about this API from docs.microsoft.com. Retrieves the thread identifier of the calling thread. The return value is the thread identifier of the calling thread. Learn more about this API from docs.microsoft.com. Retrieves file information for the specified file. A handle to the file that contains the information to be retrieved. This handle should not be a pipe handle. Read more on docs.microsoft.com. A pointer to a BY_HANDLE_FILE_INFORMATION structure that receives the file information. Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the lpFileInformation parameter. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves the final path for the specified file. A handle to a file or directory. A pointer to a buffer that receives the path of hFile. The size of lpszFilePath, in TCHARs. This value must include a NULL termination character. If the function succeeds, the return value is the length of the string received by lpszFilePath, in TCHARs. This value does not include the size of the terminating null character. Windows Server 2008 and Windows Vista:  For the ANSI version of this function, GetFinalPathNameByHandleA, the return value includes the size of the terminating null character. If the function fails because lpszFilePath is too small to hold the string plus the terminating null character, the return value is the required buffer size, in TCHARs. This value includes the size of the terminating null character. If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError. This doc was truncated. Learn more about this API from docs.microsoft.com. Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. A handle to the loaded library module. The LoadLibrary, LoadLibraryEx, GetModuleHandle, or GetModuleHandleEx function returns this handle. Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call the GetLastError function. Learn more about this API from docs.microsoft.com. Retrieves the fully qualified path for the file that contains the specified module. The module must have been loaded by the current process. A handle to the loaded module whose path is being requested. If this parameter is NULL, GetModuleFileName retrieves the path of the executable file of the current process. The GetModuleFileName function does not retrieve the path for modules that were loaded using the LOAD_LIBRARY_AS_DATAFILE flag. For more information, see LoadLibraryEx. Read more on docs.microsoft.com. A pointer to a buffer that receives the fully qualified path of the module. If the length of the path is less than the size that the nSize parameter specifies, the function succeeds and the path is returned as a null-terminated string. If the length of the path exceeds the size that the nSize parameter specifies, the function succeeds and the string is truncated to nSize characters including the terminating null character. Windows XP:  The string is truncated to nSize characters and is not null-terminated. The string returned will use the same format that was specified when the module was loaded. Therefore, the path can be a long or short file name, and can use the prefix "\\?\". For more information, see Naming a File. Read more on docs.microsoft.com. The size of the lpFilename buffer, in TCHARs. If the function succeeds, the return value is the length of the string that is copied to the buffer, in characters, not including the terminating null character. If the buffer is too small to hold the module name, the string is truncated to nSize characters including the terminating null character, the function returns nSize, and the function sets the last error to ERROR_INSUFFICIENT_BUFFER. Windows XP:  If the buffer is too small to hold the module name, the function returns nSize. The last error code remains ERROR_SUCCESS. If nSize is zero, the return value is zero and the last error code is ERROR_SUCCESS. If the function fails, the return value is 0 (zero). To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves information about the current system to an application running under WOW64. A pointer to a SYSTEM_INFO structure that receives the information. Read more on docs.microsoft.com. To determine whether a Win32-based application is running under WOW64, call the IsWow64Process2 function. To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers. Read more on docs.microsoft.com. Retrieves information about the specified process. A handle to the process. This handle must have the PROCESS_SET_INFORMATION access right. For more information, see Process Security and Access Rights. Read more on docs.microsoft.com. A member of the [PROCESS_INFORMATION_CLASS](./ne-processthreadsapi-process_information_class.md) enumeration specifying the kind of information to retrieve. Pointer to an object to receive the type of information specified by the ProcessInformationClass parameter. If the ProcessInformationClass parameter is ProcessMemoryPriority, this parameter must point to a MEMORY_PRIORITY_INFORMATION structure. If the ProcessInformationClass parameter is ProcessPowerThrottling, this parameter must point to a PROCESS_POWER_THROTTLING_STATE structure. If the ProcessInformationClass parameter is ProcessProtectionLevelInfo, this parameter must point to a PROCESS_PROTECTION_LEVEL_INFORMATION structure. If the ProcessInformationClass parameter is ProcessLeapSecondInfo, this parameter must point to a PROCESS_LEAP_SECOND_INFO structure. If the ProcessInformationClass parameter is ProcessAppMemoryInfo, this parameter must point to a APP_MEMORY_INFORMATION structure. Read more on docs.microsoft.com. The size in bytes of the structure specified by the ProcessInformation parameter. If the ProcessInformationClass parameter is ProcessMemoryPriority, this parameter must be sizeof(MEMORY_PRIORITY_INFORMATION). If the ProcessInformationClass parameter is ProcessPowerThrottling, this parameter must be sizeof(PROCESS_POWER_THROTTLING_STATE). If the ProcessInformationClass parameter is ProcessProtectionLevelInfo, this parameter must be sizeof(PROCESS_PROTECTION_LEVEL_INFORMATION). If the ProcessInformationClass parameter is ProcessLeapSecondInfo, this parameter must be sizeof(PROCESS_LEAP_SECOND_INFO). If the ProcessInformationClass parameter is ProcessAppMemoryInfo, this parameter must be sizeof(APP_MEMORY_INFORMATION). Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves timing information for the specified process. A handle to the process whose timing information is sought. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights. Windows Server 2003 and Windows XP:  The handle must have the PROCESS_QUERY_INFORMATION access right. Read more on docs.microsoft.com. A pointer to a FILETIME structure that receives the creation time of the process. Read more on docs.microsoft.com. A pointer to a FILETIME structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined. A pointer to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value. Read more on docs.microsoft.com. A pointer to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value. Note that this value can exceed the amount of real time elapsed (between lpCreationTime and lpExitTime) if the process executes across multiple CPU cores. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves the specified firmware table from the firmware table provider. The identifier of the firmware table. This identifier is little endian, you must reverse the characters in the string. For example, FACP is an ACPI provider, as described in the Signature field of the DESCRIPTION_HEADER structure in the ACPI specification (see http://www.acpi.info). Therefore, use 'PCAF' to specify the FACP table, as shown in the following example: retVal = GetSystemFirmwareTable('ACPI', 'PCAF', pBuffer, BUFSIZE); For more information, see the Remarks section of the EnumSystemFirmwareTables function. Read more on docs.microsoft.com. A pointer to a buffer that receives the requested firmware table. If this parameter is NULL, the return value is the required buffer size. For more information on the contents of this buffer, see the Remarks section. Read more on docs.microsoft.com. The size of the pFirmwareTableBuffer buffer, in bytes. If the function succeeds, the return value is the number of bytes written to the buffer. This value will always be less than or equal to BufferSize. If the function fails because the buffer is not large enough, the return value is the required buffer size, in bytes. This value is always greater than BufferSize. If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version. The value returned by the GetVersionEx function now depends on how the application is manifested. An OSVERSIONINFO or OSVERSIONINFOEX structure that receives the operating system information. Before calling the GetVersionEx function, set the dwOSVersionInfoSize member of the structure as appropriate to indicate which data structure is being passed to this function. Read more on docs.microsoft.com. If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call GetLastError. The function fails if you specify an invalid value for the dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure. Learn more about this API from docs.microsoft.com. Retrieves information about the system's current usage of both physical and virtual memory. A pointer to a MEMORYSTATUSEX structure that receives information about current memory availability. Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Determines whether the calling process is being debugged by a user-mode debugger. If the current process is running in the context of a debugger, the return value is nonzero. If the current process is not running in the context of a debugger, the return value is zero. Learn more about this API from docs.microsoft.com. Determines whether the specified process is running under WOW64; also returns additional machine process and architecture information. A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights. On success, returns a pointer to an IMAGE_FILE_MACHINE_* value. The value will be IMAGE_FILE_MACHINE_UNKNOWN if the target process is not a WOW64 process; otherwise, it will identify the type of WoW process. On success, returns a pointer to a possible IMAGE_FILE_MACHINE_* value identifying the native architecture of host system. If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Retrieves the Remote Desktop Services session associated with a specified process. Specifies a process identifier. Use the GetCurrentProcessId function to retrieve the process identifier for the current process. Read more on docs.microsoft.com. Pointer to a variable that receives the identifier of the Remote Desktop Services session under which the specified process is running. To retrieve the identifier of the session currently attached to the console, use the WTSGetActiveConsoleSessionId function. Read more on docs.microsoft.com. If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Captures a snapshot of a target process. A handle to the target process. Flags that specify what to capture. For more information, see PSS_CAPTURE_FLAGS. The CONTEXT record flags to capture if CaptureFlags specifies thread contexts. A handle to the snapshot that this function captures. This function returns ERROR_SUCCESS on success. All error codes are defined in winerror.h. Use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a message for an error code. Learn more about this API from docs.microsoft.com. Frees a snapshot. A handle to the process that contains the snapshot. The handle must have PROCESS_VM_READ, PROCESS_VM_OPERATION, and PROCESS_DUP_HANDLE rights. If the snapshot was captured from the current process, or duplicated into the current process, then pass in the result of GetCurrentProcess. A handle to the snapshot to free. This function returns ERROR_SUCCESS on success or one of the following error codes. This doc was truncated. Learn more about this API from docs.microsoft.com. Reopens the specified file system object with different access rights, sharing mode, and flags. A handle to the object to be reopened. The object must have been created by the CreateFile function. Read more on docs.microsoft.com. The required access to the object. For a list of values, see File Security and Access Rights. You cannot request an access mode that conflicts with the sharing mode specified in a previous open request whose handle is still open. If this parameter is zero (0), the application can query device attributes without accessing the device. This is useful if an application wants to determine the size of a floppy disk drive and the formats it supports without requiring a floppy in the drive. Read more on docs.microsoft.com. The sharing mode of the object. You cannot request a sharing mode that conflicts with the access mode specified in a previous open request whose handle is still open. If this parameter is zero (0) and CreateFile succeeds, the object cannot be shared and cannot be opened again until the handle is closed. To enable other processes to share the object while your process has it open, use a combination of one or Read more on docs.microsoft.com. If the function succeeds, the return value is an open handle to the specified file. If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Sets the file information for the specified file. A handle to the file for which to change information. This handle must be opened with the appropriate permissions for the requested change. For more information, see the Remarks and Example Code sections. This handle should not be a pipe handle. Read more on docs.microsoft.com. A FILE_INFO_BY_HANDLE_CLASS enumeration value that specifies the type of information to be changed. For a table of valid values, see the Remarks section. Read more on docs.microsoft.com. A pointer to the buffer that contains the information to change for the specified file information class. The structure that this parameter points to corresponds to the class that is specified by FileInformationClass. For a table of valid structure types, see the Remarks section. Read more on docs.microsoft.com. The size of lpFileInformation, in bytes. Returns nonzero if successful or zero otherwise. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses. The number of object handles in the array pointed to by lpHandles. The maximum number of object handles is MAXIMUM_WAIT_OBJECTS. This parameter cannot be zero. An array of object handles. For a list of the object types whose handles can be specified, see the following Remarks section. The array can contain handles to objects of different types. It may not contain multiple copies of the same handle. If one of these handles is closed while the wait is still pending, the function's behavior is undefined. The handles must have the SYNCHRONIZE access right. For more information, see Standard Access Rights. Read more on docs.microsoft.com. If this parameter is TRUE, the function returns when the state of all objects in the lpHandles array is signaled. If FALSE, the function returns when the state of any one of the objects is set to signaled. In the latter case, the return value indicates the object whose state caused the function to return. The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the specified objects are signaled or the interval elapses. If dwMilliseconds is zero, the function does not enter a wait state if the specified objects are not signaled; it always returns immediately. If dwMilliseconds is INFINITE, the function will return only when the specified objects are signaled. Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2:  The dwMilliseconds value does include time spent in low-power states. For example, the timeout does keep counting down while the computer is asleep. Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10 and Windows Server 2016:  The dwMilliseconds value does not include time spent in low-power states. For example, the timeout does not keep counting down while the computer is asleep. Read more on docs.microsoft.com. If the function succeeds, the return value indicates the event that caused the function to return. It can be one of the following values. (Note that WAIT_OBJECT_0 is defined as 0 and WAIT_ABANDONED_0 is defined as 0x00000080L.) This doc was truncated. Learn more about this API from docs.microsoft.com. Registers app-specific metadata to be collected (in the form of key/value strings) when WER creates an error report. The "key" string for the metadata element being registered. The value string for the metadata element being registered. This function returns S_OK on success or an error code on failure, including the following error codes. This doc was truncated. Learn more about this API from docs.microsoft.com. Frees the memory allocated for the specified DSREG_JOIN_INFO structure, which contains join information for a tenant and which you retrieved by calling the NetGetAadJoinInformation function. Pointer to the DSREG_JOIN_INFO structure for which you want to free the memory. This function does not return a value. Learn more about this API from docs.microsoft.com. Retrieves the join information for the specified tenant. This function examines the join information for Microsoft Azure Active Directory and the work account that the current user added. The tenant identifier for the joined account. If the device is not joined to Azure Active Directory (Azure AD), and the user currently logged into Windows added no Azure AD work accounts for the specified tenant, the buffer that the ppJoinInfo parameter points to is set to NULL. If the specified tenant ID is NULL or empty, ppJoinInfo is set to the default join account information, or NULL if the device is not joined to Azure AD and the current user added no Azure AD work accounts. The default join account is one of the following: This doc was truncated. Read more on docs.microsoft.com. The join information for the tenant that the pcszTenantId parameter specifies. If this parameter is NULL, the device is not joined to Azure AD and the current user added no Azure AD work accounts. You must call the NetFreeAadJoinInformation function to free the memory allocated for this structure. Read more on docs.microsoft.com. If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. Learn more about this API from docs.microsoft.com. Checks for specified operating systems and operating system features. Type: DWORD Type: BOOL Returns a nonzero value if the specified operating system or operating system feature is detected, otherwise FALSE. Learn more about this API from docs.microsoft.com. The ReleaseDC function releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs. A handle to the window whose DC is to be released. A handle to the DC to be released. The return value indicates whether the DC was released. If the DC was released, the return value is 1. If the DC was not released, the return value is zero. Learn more about this API from docs.microsoft.com. Retrieves the specified system metric or system configuration setting. Type: int Type: int If the function succeeds, the return value is the requested system metric or configuration setting. If the function fails, the return value is 0. GetLastError does not provide extended error information. Learn more about this API from docs.microsoft.com. Closes the specified report. A handle to the report. This handle is returned by the WerReportCreate function. This function returns S_OK on success or an error code on failure. Learn more about this API from docs.microsoft.com. Adds a file to the specified report. A handle to the report. This handle is returned by the WerReportCreate function. A pointer to a Unicode string that contains the full path to the file to be added. This path can use environment variables. The maximum length of this path is MAX_PATH characters. This function returns S_OK on success or an error code on failure, including the following error code. This doc was truncated. Learn more about this API from docs.microsoft.com. Creates a problem report that describes an application event. A pointer to a Unicode string that specifies the name of the event. A pointer to a WER_REPORT_INFORMATION structure that specifies information for the report. A handle to the report. If the function fails, this handle is NULL. This function returns S_OK on success or an error code on failure. Learn more about this API from docs.microsoft.com. Sets the parameters that uniquely identify an event for the specified report. A handle to the report. This handle is returned by the WerReportCreate function. A pointer to a Unicode string that contains the name of the parameter. If this parameter is NULL, the default name is Px, where x matches the integer portion of the value specified in dwparamID. The parameter value. This function returns S_OK on success or an error code on failure, including the following error code. This doc was truncated. Learn more about this API from docs.microsoft.com. Submits the specified report. A handle to the report. This handle is returned by the WerReportCreate function. This function returns S_OK on success or an error code on failure. Learn more about this API from docs.microsoft.com. A pointer to the IErrorInfo interface that provides more information about the error. You can specify to use the current IErrorInfo interface, or new IntPtr(-1) to ignore the current IErrorInfo interface and construct the exception just from the error code. , if it does not reflect an error. A pointer to a constant character string. A pointer to the first character in the string. The content should be considered readonly, as it was typed as constant in the SDK. Gets the number of characters up to the first null character (exclusive). Returns a with a copy of this character array. A , or if is . Returns a span of the characters in this string. Returns a span of the characters in this string. Contains information that the GetFileInformationByHandle function retrieves. The identifier that is stored in the nFileIndexHigh and nFileIndexLow members is called the file ID. Support for file IDs is file system-specific. File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time. In the FAT file system, the file ID is generated from the first cluster of the containing directory and the byte offset within the directory of the entry for the file. Some defragmentation products change this byte offset. (Windows in-box defragmentation does not.) Thus, a FAT file ID can change over time. Renaming a file in the FAT file system can also change the file ID, but only if the new file name is longer than the old one. In the NTFS file system, a file keeps the same file ID until it is deleted. You can replace one file with another file without changing the file ID by using the ReplaceFile function. However, the file ID of the replacement file, not the replaced file, is retained as the file ID of the resulting file. Not all file systems can record creation and last access time, and not all file systems record them in the same manner. For example, on a Windows FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (the access date). On the NTFS file system, access time has a resolution of 1 hour. For more information, see File Times. Read more on docs.microsoft.com. The file attributes. For possible values and their descriptions, see File Attribute Constants. Read more on docs.microsoft.com. A FILETIME structure that specifies when a file or directory is created. If the underlying file system does not support creation time, this member is zero (0). Read more on docs.microsoft.com. A FILETIME structure. For a file, the structure specifies the last time that a file is read from or written to. For a directory, the structure specifies when the directory is created. For both files and directories, the specified date is correct, but the time of day is always set to midnight. If the underlying file system does not support the last access time, this member is zero (0). Read more on docs.microsoft.com. A FILETIME structure. For a file, the structure specifies the last time that a file is written to. For a directory, the structure specifies when the directory is created. If the underlying file system does not support the last write time, this member is zero (0). Read more on docs.microsoft.com. The serial number of the volume that contains a file. The high-order part of the file size. The low-order part of the file size. The number of links to this file. For the FAT file system this member is always 1. For the NTFS file system, it can be more than 1. Read more on docs.microsoft.com. The high-order part of a unique identifier that is associated with a file. For more information, see nFileIndexLow. Read more on docs.microsoft.com. The low-order part of a unique identifier that is associated with a file. The identifier (low and high parts) and the volume serial number uniquely identify a file on a single computer. To determine whether two open handles represent the same file, combine the identifier and the volume serial number for each file and compare them. The ReFS file system, introduced with Windows Server 2012, includes 128-bit file identifiers. To retrieve the 128-bit file identifier use the GetFileInformationByHandleEx function with FileIdInfo to retrieve the FILE_ID_INFO structure. The 64-bit identifier in this structure is not guaranteed to be unique on ReFS. Read more on docs.microsoft.com. Contains the basic information for a file. Used for file handles. Learn more about this API from docs.microsoft.com. The time the file was created in FILETIME format, which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC). Read more on docs.microsoft.com. The time the file was last accessed in FILETIME format. Read more on docs.microsoft.com. The time the file was last written to in FILETIME format. Read more on docs.microsoft.com. The time the file was changed in FILETIME format. Read more on docs.microsoft.com. The file attributes. For a list of attributes, see File Attribute Constants. If this is set to 0 in a FILE_BASIC_INFO structure passed to SetFileInformationByHandle then none of the attributes are changed. Read more on docs.microsoft.com. Indicates whether a file should be deleted. Used for any handles. Learn more about this API from docs.microsoft.com. Identifies the type of file information that GetFileInformationByHandleEx should retrieve or SetFileInformationByHandle should set. As noted in the preceding section, some file information classes are valid only for use with GetFileInformationByHandleEx. Others are valid only for use with SetFileInformationByHandle. Where neither function is mentioned, the information class is valid with both functions. Read more on docs.microsoft.com. Minimal information for the file should be retrieved or set. Used for file handles. See FILE_BASIC_INFO. Read more on docs.microsoft.com. Extended information for the file should be retrieved. Used for file handles. Use only when calling GetFileInformationByHandleEx. See FILE_STANDARD_INFO. Read more on docs.microsoft.com. The file name should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_NAME_INFO. Read more on docs.microsoft.com. The file name should be changed. Used for file handles. Use only when calling SetFileInformationByHandle. See FILE_RENAME_INFO. Read more on docs.microsoft.com. The file should be deleted. Used for any handles. Use only when calling SetFileInformationByHandle. See FILE_DISPOSITION_INFO. Read more on docs.microsoft.com. The file allocation information should be changed. Used for file handles. Use only when calling SetFileInformationByHandle. See FILE ALLOCATION INFO. Read more on docs.microsoft.com. The end of the file should be set. Use only when calling SetFileInformationByHandle. See FILE_END_OF_FILE_INFO. Read more on docs.microsoft.com. File stream information for the specified file should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_STREAM_INFO. Read more on docs.microsoft.com. File compression information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_COMPRESSION_INFO. Read more on docs.microsoft.com. File attribute information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ATTRIBUTE_TAG_INFO. Read more on docs.microsoft.com. Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. The number of files returned for each call to GetFileInformationByHandleEx depends on the size of the buffer that is passed to the function. Any subsequent calls to GetFileInformationByHandleEx on the same handle will resume the enumeration operation after the last file is returned. See FILE_ID_BOTH_DIR_INFO. Read more on docs.microsoft.com. Identical to FileIdBothDirectoryInfo, but forces the enumeration operation to start again from the beginning. See FILE_ID_BOTH_DIR_INFO. Read more on docs.microsoft.com. Priority hint information should be set. Use only when calling SetFileInformationByHandle. See FILE_IO_PRIORITY_HINT_INFO. Read more on docs.microsoft.com. File remote protocol information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_REMOTE_PROTOCOL_INFO. Read more on docs.microsoft.com. Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. See FILE_FULL_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. Identical to FileFullDirectoryInfo, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx. See FILE_FULL_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. File storage information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_STORAGE_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. File alignment information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ALIGNMENT_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. File information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ID_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. See FILE_ID_EXTD_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. Identical to FileIdExtdDirectoryInfo, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx. See FILE_ID_EXTD_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported before Windows 8 and Windows Server 2012 Read more on docs.microsoft.com. This value is used for validation. Supported values are less than this value. Contains the name to which the file should be renamed. Learn more about this API from docs.microsoft.com. A handle to the root directory in which the file to be renamed is located. The size of FileName in bytes. The new file name. Always 1. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Specifies the various types of storage buses. Learn more about this API from docs.microsoft.com. Unknown bus type. SCSI bus. ATAPI bus. ATA bus. IEEE-1394 bus. SSA bus. Fibre Channel bus. USB bus. RAID bus. Serial Attached SCSI (SAS) bus. **Windows Server 2003:**  This is not supported before Windows Server 2003 with SP1. Read more on docs.microsoft.com. SATA bus. **Windows Server 2003:**  This is not supported before Windows Server 2003 with SP1. Read more on docs.microsoft.com. Contains both the encoded and decoded representations of a certificate. Learn more about this API from docs.microsoft.com. Type of encoding used. It is always acceptable to specify both the certificate and message encoding types by combining them with a bitwise-OR operation as shown in the following example: X509_ASN_ENCODING | PKCS_7_ASN_ENCODING Currently defined encoding types are: This doc was truncated. Read more on docs.microsoft.com. A pointer to a buffer that contains the encoded certificate. The size, in bytes, of the encoded certificate. The address of a CERT_INFO structure that contains the certificate information. A handle to the certificate store that contains the certificate context. The CERT_EXTENSION structure contains the extension information for a certificate, Certificate Revocation List (CRL) or Certificate Trust List (CTL). Learn more about this API from docs.microsoft.com. Object identifier (OID) that specifies the structure of the extension data contained in the Value member. For specifics on extension OIDs and their related structures, see X.509 Certificate Extension Structures. Read more on docs.microsoft.com. If TRUE, any limitations specified by the extension in the Value member of this structure are imperative. If FALSE, limitations set by this extension can be ignored. A CRYPT_OBJID_BLOB structure that contains the encoded extension data. The cbData member of Value indicates the length in bytes of the pbData member. The pbData member byte string is the encoded extension. Read more on docs.microsoft.com. Contains the information of a certificate. Learn more about this API from docs.microsoft.com. The version number of a certificate. This member can be one of the following version numbers. This doc was truncated. Read more on docs.microsoft.com. A BLOB that contains the serial number of a certificate. The least significant byte is the zero byte of the pbData member of SerialNumber. The index for the last byte of pbData, is one less than the value of the cbData member of SerialNumber. The most significant byte is the last byte of pbData. Leading 0x00 or 0xFF bytes are removed. For more information, see CertCompareIntegerBlob. A CRYPT_ALGORITHM_IDENTIFIER structure that contains the signature algorithm type and encoded additional encryption parameters. The name, in encoded form, of the issuer of the certificate. Date and time before which the certificate is not valid. For dates between 1950 and 2049 inclusive, the date and time is encoded Coordinated Universal Time (Greenwich Mean Time) format in the form YYMMDDHHMMSS. This member uses a two-digit year and is precise to seconds. For dates before 1950 or after 2049, encoded generalized time is used. Encoded generalized time is in the form YYYYMMDDHHMMSSMMM, using a four-digit year, and is precise to milliseconds. Even though generalized time supports millisecond resolution, the NotBefore time is only precise to seconds. Date and time after which the certificate is not valid. For dates between 1950 and 2049 inclusive, the date and time is encoded Coordinated Universal Time format in the form YYMMDDHHMMSS. This member uses a two-digit year and is precise to seconds. For dates before 1950 or after 2049, encoded generalized time is used. Encoded generalized time is in the form YYYYMMDDHHMMSSMMM, using a four-digit year, and is precise to milliseconds. Even though generalized time supports millisecond resolution, the NotAfter time is only precise to seconds. The encoded name of the subject of the certificate. A CERT_PUBLIC_KEY_INFO structure that contains the encoded public key and its algorithm. The PublicKey member of the CERT_PUBLIC_KEY_INFO structure contains the encoded public key as a CRYPT_BIT_BLOB, and the Algorithm member contains the encoded algorithm as a CRYPT_ALGORITHM_IDENTIFIER. A BLOB that contains a unique identifier of the issuer. A BLOB that contains a unique identifier of the subject. The number of elements in the rgExtension array. An array of pointers to CERT_EXTENSION structures, each of which contains extension information about the certificate. Read more on docs.microsoft.com. Contains a public key and its algorithm. Learn more about this API from docs.microsoft.com. CRYPT_ALGORITHM_IDENTIFIER structure that contains the public key algorithm type and associated additional parameters. BLOB containing an encoded public key. Specifies an algorithm used to encrypt a private key. Learn more about this API from docs.microsoft.com. A BLOB that provides encoded algorithm-specific parameters. In many cases, there are no parameters. This is indicated by setting the cbData member of the Parameters BLOB to zero. The following algorithms have the specified encoded parameters. For more information, see Constants for CryptEncodeObject and CryptDecodeObject. This doc was truncated. Read more on docs.microsoft.com. Contains a set of bits represented by an array of bytes. Because the smallest chunk of memory that can normally be allocated is a byte, the CRYPT_BIT_BLOB structure allows the last byte in the array to contain zero to seven unused bits. The number of unused bits in the array is contained in the cUnusedBits member of this structure. The number of meaningful bits in the pbData member is calculated with the formula ((cbData × 8) –cUnusedBits). For example, if you need to represent 10 bits, you would allocate an array of 2 bytes and set cUnusedBits to 6. If you view the array as contiguous bits from left to right, the left 10 bits would be meaningful, and the right 6 bits would be unused. Read more on docs.microsoft.com. The number of bytes in the pbData array. A pointer to an array of bytes that represents the bits. The number of unused bits in the last byte of the array. The unused bits are always the least significant bits in the last byte of the array. The SECURITY_ATTRIBUTES structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. Read more on docs.microsoft.com. The size, in bytes, of this structure. Set this value to the size of the **SECURITY\_ATTRIBUTES** structure. A pointer to a [**SECURITY\_DESCRIPTOR**](../winnt/ns-winnt-security_descriptor.md) structure that controls access to the object. If the value of this member is **NULL**, the object is assigned the default security descriptor associated with the [*access token*](/windows/win32/secauthz/access-tokens) of the calling process. This is not the same as granting access to everyone by assigning a **NULL** [*discretionary access control list*](/windows/win32/secauthz/dacls-and-aces) (DACL). By default, the default DACL in the access token of a process allows access only to the user represented by the access token. For information about creating a security descriptor, see [Creating a Security Descriptor](/windows/win32/secauthz/creating-a-security-descriptor-for-a-new-object-in-c--). Read more on docs.microsoft.com. A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is **TRUE**, the new process inherits the handle. Indicates the elevation type of token being queried by the GetTokenInformation function or set by the SetTokenInformation function. Learn more about this API from docs.microsoft.com. The token does not have a linked token. The token is an elevated token. The token is a limited token. Contains values that specify the type of information being assigned to or retrieved from an access token. Learn more about this API from docs.microsoft.com. The buffer receives a TOKEN_USER structure that contains the user account of the token. Read more on docs.microsoft.com. The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token. Read more on docs.microsoft.com. The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token. Read more on docs.microsoft.com. The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects. Read more on docs.microsoft.com. The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects. Read more on docs.microsoft.com. The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects. Read more on docs.microsoft.com. The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information. Read more on docs.microsoft.com. The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token. Read more on docs.microsoft.com. The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails. Read more on docs.microsoft.com. The buffer receives a TOKEN_STATISTICS structure that contains various token statistics. Read more on docs.microsoft.com. The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token. Read more on docs.microsoft.com. The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token. If the token is associated with the terminal server client session, the session identifier is nonzero. Windows Server 2003 and Windows XP:  If the token is associated with the terminal server console session, the session identifier is zero. In a non-Terminal Services environment, the session identifier is zero. If TokenSessionId is set with SetTokenInformation, the application must have the Act As Part Of the Operating System privilege, and the application must be enabled to set the session ID in a token. Read more on docs.microsoft.com. The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token. Reserved. The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag. Reserved. The buffer receives a TOKEN_ORIGIN value. If the token resulted from a logon that used explicit credentials, such as passing a name, domain, and password to the LogonUser function, then the TOKEN_ORIGIN structure will contain the ID of the logon session that created it. If the token resulted from network authentication, such as a call to AcceptSecurityContext or a call to LogonUser with dwLogonType set to LOGON32_LOGON_NETWORK or LOGON32_LOGON_NETWORK_CLEARTEXT, then this value will be zero. Read more on docs.microsoft.com. The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token. The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token. The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated. The buffer receives a DWORD value that is nonzero if the token has ever been filtered. The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token. The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token. The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token. The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level. The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set. The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy. The buffer receives a TOKEN_GROUPS structure that specifies the token's logon SID. The buffer receives a DWORD value that is nonzero if the token is an app container token. Any callers who check the TokenIsAppContainer and have it return 0 should also verify that the caller token is not an identify level impersonation token. If the current token is not an app container but is an identity level token, you should return AccessDenied. The buffer receives a TOKEN_GROUPS structure that contains the capabilities associated with the token. The buffer receives a TOKEN_APPCONTAINER_INFORMATION structure that contains the AppContainerSid associated with the token. If the token is not associated with an app container, the TokenAppContainer member of the TOKEN_APPCONTAINER_INFORMATION structure points to NULL. The buffer receives a DWORD value that includes the app container number for the token. For tokens that are not app container tokens, this value is zero. The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the user claims associated with the token. The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the device claims associated with the token. This value is reserved. This value is reserved. The buffer receives a TOKEN_GROUPS structure that contains the device groups that are associated with the token. The buffer receives a TOKEN_GROUPS structure that contains the restricted device groups that are associated with the token. This value is reserved. This value is reserved. The maximum value for this enumeration. Represents a disk extent. Learn more about this API from docs.microsoft.com. The number of the disk that contains this extent. This is the same number that is used to construct the name of the disk, for example, the *X* in "\\\\?\\PhysicalDrive*X*" or "\\\\?\\\Harddisk*X*". Read more on docs.microsoft.com. The offset from the beginning of the disk to the extent, in bytes. The number of bytes in this extent. Used in conjunction with the IOCTL_STORAGE_QUERY_PROPERTY control code to retrieve the properties of a storage device or adapter. The data retrieved by IOCTL_STORAGE_QUERY_PROPERTY is reported in the buffer immediately following this structure. Read more on docs.microsoft.com. Contains the size of this structure, in bytes. The value of this member will change as members are added to the structure. Read more on docs.microsoft.com. Specifies the total size of the data returned, in bytes. This may include data that follows this structure. Read more on docs.microsoft.com. Used in conjunction with the IOCTL_STORAGE_QUERY_PROPERTY control code to retrieve the storage device descriptor data for a device. An application can determine the required buffer size by issuing a IOCTL_STORAGE_QUERY_PROPERTY control code passing a STORAGE_DESCRIPTOR_HEADER structure for the output buffer, and then using the returned Size member of the STORAGE_DESCRIPTOR_HEADER structure to allocate a buffer of the proper size. Read more on docs.microsoft.com. Contains the size of this structure, in bytes. The value of this member will change as members are added to the structure. Read more on docs.microsoft.com. Specifies the total size of the descriptor, in bytes, which may include vendor ID, product ID, product revision, device serial number strings and bus-specific data which are appended to the structure. Read more on docs.microsoft.com. Specifies the device type as defined by the Small Computer Systems Interface (SCSI) specification. Specifies the device type modifier, if any, as defined by the SCSI specification. If no device type modifier exists, this member is zero. Read more on docs.microsoft.com. Indicates when TRUE that the device's media (if any) is removable. If the device has no media, this member should be ignored. When FALSE the device's media is not removable. Read more on docs.microsoft.com. Indicates when TRUE that the device supports multiple outstanding commands (SCSI tagged queuing or equivalent). When FALSE, the device does not support SCSI-tagged queuing or the equivalent. Read more on docs.microsoft.com. Specifies the byte offset from the beginning of the structure to a null-terminated ASCII string that contains the device's vendor ID. If the device has no vendor ID, this member is zero. Read more on docs.microsoft.com. Specifies the byte offset from the beginning of the structure to a null-terminated ASCII string that contains the device's product ID. If the device has no product ID, this member is zero. Read more on docs.microsoft.com. Specifies the byte offset from the beginning of the structure to a null-terminated ASCII string that contains the device's product revision string. If the device has no product revision string, this member is zero. Read more on docs.microsoft.com. Specifies the byte offset from the beginning of the structure to a null-terminated ASCII string that contains the device's serial number. If the device has no serial number, this member is zero. Read more on docs.microsoft.com. Specifies an enumerator value of type STORAGE_BUS_TYPE that indicates the type of bus to which the device is connected. This should be used to interpret the raw device properties at the end of this structure (if any). Read more on docs.microsoft.com. Indicates the number of bytes of bus-specific data that have been appended to this descriptor. Contains an array of length one that serves as a place holder for the first byte of the bus specific property data. Read more on docs.microsoft.com. Always 1. Enumerates the possible values of the PropertyId member of the STORAGE_PROPERTY_QUERY structure passed as input to the IOCTL_STORAGE_QUERY_PROPERTY request to retrieve the properties of a storage device or adapter. The optional output buffer returned through the *lpOutBuffer* parameter of the [IOCTL_STORAGE_QUERY_PROPERTY](ni-winioctl-ioctl_storage_query_property.md) control code request can be one of several structures depending on the value of the **PropertyId** member of the [STORAGE_PROPERTY_QUERY](ns-winioctl-storage_property_query.md) structure pointed to by the *lpInBuffer* parameter. If the **QueryType** member of the **STORAGE_PROPERTY_QUERY** is set to **PropertyExistsQuery**, then no structure is returned. Read more on docs.microsoft.com. Indicates that the caller is querying for the device descriptor, [STORAGE_DEVICE_DESCRIPTOR](ns-winioctl-storage_device_descriptor.md). Indicates that the caller is querying for the adapter descriptor, [STORAGE_ADAPTER_DESCRIPTOR](ns-winioctl-storage_adapter_descriptor.md). Indicates that the caller is querying for the device identifiers provided with the SCSI vital product data pages. Data is returned using the [STORAGE_DEVICE_ID_DESCRIPTOR](ns-winioctl-storage_device_id_descriptor.md) structure. **Intended for driver usage.** Indicates that the caller is querying for the unique device identifiers. Data is returned using the **STORAGE_DEVICE_UNIQUE_IDENTIFIER** structure (see the storduid.h header in the DDK). **Windows Server 2003 and Windows XP:**  This value is not supported before Windows Vista and Windows Server 2008. Read more on docs.microsoft.com. Indicates that the caller is querying for the write cache property. Data is returned using the [STORAGE_WRITE_CACHE_PROPERTY](ns-winioctl-storage_write_cache_property.md) structure. **Windows Server 2003 and Windows XP:**  This value is not supported before Windows Vista and Windows Server 2008. Read more on docs.microsoft.com. Reserved for system use. Indicates that the caller is querying for the access alignment descriptor, [STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR](ns-winioctl-storage_access_alignment_descriptor.md). **Windows Server 2003 and Windows XP:**  This value is not supported before Windows Vista and Windows Server 2008. Read more on docs.microsoft.com. Indicates that the caller is querying for the seek penalty descriptor, [DEVICE_SEEK_PENALTY_DESCRIPTOR](ns-winioctl-device_seek_penalty_descriptor.md). **Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:**  This value is not supported before Windows 7 and Windows Server 2008 R2. Read more on docs.microsoft.com. Indicates that the caller is querying for the trim descriptor, [DEVICE_TRIM_DESCRIPTOR](ns-winioctl-device_trim_descriptor.md). **Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:**  This value is not supported before Windows 7 and Windows Server 2008 R2. Read more on docs.microsoft.com. Reserved for system use. Reserved for system use. Indicates that the caller is querying for the logical block provisioning property. Data is returned using the [DEVICE_LB_PROVISIONING_DESCRIPTOR](ns-winioctl-device_lb_provisioning_descriptor.md) structure. **Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:**  This value is not supported before Windows 8 and Windows Server 2012. Read more on docs.microsoft.com. Indicates that the caller is querying for the device power descriptor. Data is returned using the [DEVICE_POWER_DESCRIPTOR](ns-winioctl-device_power_descriptor.md) structure. **Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:**  This value is not supported before Windows 8 and Windows Server 2012. Read more on docs.microsoft.com. Indicates that the caller is querying for the copy offload parameters property. Data is returned using the [DEVICE_COPY_OFFLOAD_DESCRIPTOR](ns-winioctl-device_copy_offload_descriptor.md) structure. **Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:**  This value is not supported before Windows 8 and Windows Server 2012. Read more on docs.microsoft.com. Reserved for system use. Indicates that the caller is querying for the medium product type. Data is returned using the [STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR](./ns-winioctl-storage_medium_product_type_descriptor.md) structure. Indicates that the caller is querying for RPMB support and properties. Data is returned using the [STORAGE_RPMB_DESCRIPTOR](ns-winioctl-storage_rpmb_descriptor.md) structure. Provides info on the storage adapter encryption capabilities. This is currently supported on UFS (Universal Flash Storage) adapters. Indicates that the caller is querying for the device I/O capability property. Data is returned using the [DEVICE_IO_CAPABILITY_DESCRIPTOR](ns-winioctl-storage_device_io_capability_descriptor.md) structure. Indicates that the caller is querying for protocol-specific data from the adapter. Data is returned using the [STORAGE_PROTOCOL_DATA_DESCRIPTOR](ns-winioctl-storage_protocol_data_descriptor.md) structure. See the remarks for more info. Indicates that the caller is querying for protocol-specific data from the device. Data is returned using the [STORAGE_PROTOCOL_DATA_DESCRIPTOR](ns-winioctl-storage_protocol_data_descriptor.md) structure. See the remarks for more info. Indicates that the caller is querying temperature data from the adapter. Data is returned using the [STORAGE_TEMPERATURE_DATA_DESCRIPTOR](ns-winioctl-storage_temperature_data_descriptor.md) structure. Indicates that the caller is querying for temperature data from the device. Data is returned using the [STORAGE_TEMPERATURE_DATA_DESCRIPTOR](ns-winioctl-storage_temperature_data_descriptor.md) structure. Indicates that the caller is querying for topology information from the adapter. Data is returned using the [STORAGE_PHYSICAL_TOPOLOGY_DESCRIPTOR](ns-winioctl-storage_physical_topology_descriptor.md) structure. Indicates that the caller is querying for topology information from the device. Data is returned using the [STORAGE_PHYSICAL_TOPOLOGY_DESCRIPTOR](ns-winioctl-storage_physical_topology_descriptor.md) structure. Reserved for future use. Provides health information about the storage device (specifically for the persistent memory stack). Indicates that the caller is querying for the adapter serial number. Data is returned using the [STORAGE_ADAPTER_SERIAL_NUMBER](ns-winioctl-storage_adapter_serial_number.md) structure. Reserved for system use. Provides the non-uniform memory access (NUMA) node of the storage device. Reserved for system use. Provides the unsafe shutdown count value used to determine if the device data might have been lost during a power loss event (specifically for the persistent memory stack). Provides info on how many bytes have been read/write from a solid-state drive (SSD). This property is supported only for Non-Volatile Memory Express (NVMe) devices that implement a certain NVMe feature. Provides info on the state of the LED associated with a storage device. This is a server-oriented feature. Reserved for system use. Provides identification info for a storage device that can be physically replaced with a Field Replacement Unit (FRU). Indicates the properties of a storage device or adapter to retrieve as the input buffer passed to the IOCTL_STORAGE_QUERY_PROPERTY control code. The optional output buffer returned through the lpOutBuffer parameter of the IOCTL_STORAGE_QUERY_PROPERTY control code can be one of several structures depending on the value of the PropertyId member. If the QueryType member is set to PropertyExistsQuery, then no structure is returned. Read more on docs.microsoft.com. Indicates whether the caller is requesting a device descriptor, an adapter descriptor, a write cache property, a device unique ID (DUID), or the device identifiers provided in the device's SCSI vital product data (VPD) page. For a list of the property IDs that can be assigned to this member, see STORAGE_PROPERTY_ID. Read more on docs.microsoft.com. Contains flags indicating the type of query to be performed as enumerated by the STORAGE_QUERY_TYPE enumeration. This doc was truncated. Read more on docs.microsoft.com. Contains an array of bytes that can be used to retrieve additional parameters for specific queries. Always 1. Used by the STORAGE_PROPERTY_QUERY structure passed to the IOCTL_STORAGE_QUERY_PROPERTY control code to indicate what information is returned about a property of a storage device or adapter. Learn more about this API from docs.microsoft.com. Instructs the driver to return an appropriate descriptor. Instructs the driver to report whether the descriptor is supported. Not currently supported. Do not use. Specifies the upper limit of the list of query types. This is used to validate the query type. Represents a physical location on a disk. Learn more about this API from docs.microsoft.com. The number of disks in the volume (a volume can span multiple disks). An extent is a contiguous run of sectors on one disk. When the number of extents returned is greater than one (1), the error code ERROR_MORE_DATA is returned. You should call DeviceIoControl again, allocating enough buffer space based on the value of NumberOfDiskExtents after the first DeviceIoControl call. Read more on docs.microsoft.com. An array of DISK_EXTENT structures. Always 1. Contains information about the current state of both physical and virtual memory, including extended memory. MEMORYSTATUSEX reflects the state of memory at the time of the call. It also reflects the size of the paging file at that time. The operating system can enlarge the paging file up to the maximum size set by the administrator. The physical memory sizes returned include the memory from all nodes. Read more on docs.microsoft.com. The size of the structure, in bytes. You must set this member before calling GlobalMemoryStatusEx. Read more on docs.microsoft.com. A number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use). The amount of actual physical memory, in bytes. The amount of physical memory currently available, in bytes. This is the amount of physical memory that can be immediately reused without having to write its contents to disk first. It is the sum of the size of the standby, free, and zero lists. The current committed memory limit for the system or the current process, whichever is smaller, in bytes. To get the system-wide committed memory limit, call GetPerformanceInfo. The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value. To calculate the system-wide available commit value, call GetPerformanceInfo and subtract the value of CommitTotal from the value of CommitLimit. The size of the user-mode portion of the virtual address space of the calling process, in bytes. This value depends on the type of process, the type of processor, and the configuration of the operating system. For example, this value is approximately 2 GB for most 32-bit processes on an x86 processor and approximately 3 GB for 32-bit processes that are large address aware running on a system with 4-gigabyte tuning enabled. The amount of unreserved and uncommitted memory currently in the user-mode portion of the virtual address space of the calling process, in bytes. Reserved. This value is always 0. Contains operating system version information. Relying on version information is not the best way to test for a feature. Instead, refer to the documentation for the feature of interest. For more information on common techniques for feature detection, see Operating System Version. If you must require a particular operating system, be sure to use it as a minimum supported version, rather than design the test for the one operating system. This way, your detection code will continue to work on future versions of Windows. The following table summarizes the values returned by supported versions of Windows. Use the information in the column labeled "Other" to distinguish between operating systems with identical version numbers. This doc was truncated. Read more on docs.microsoft.com. The size of this data structure, in bytes. Set this member to sizeof(OSVERSIONINFO). The major version number of the operating system. For more information, see Remarks. The minor version number of the operating system. For more information, see Remarks. The build number of the operating system. The operating system platform. This member can be the following value. This doc was truncated. Read more on docs.microsoft.com. A null-terminated string, such as "Service Pack 3", that indicates the latest Service Pack installed on the system. If no Service Pack has been installed, the string is empty. Always 128. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information. Learn more about this API from docs.microsoft.com. The page size and the granularity of page protection and commitment. This is the page size used by the VirtualAlloc function. Read more on docs.microsoft.com. A pointer to the lowest memory address accessible to applications and dynamic-link libraries (DLLs). A pointer to the highest memory address accessible to applications and DLLs. A mask representing the set of processors configured into the system. Bit 0 is processor 0; bit 31 is processor 31. The number of logical processors in the current group. To retrieve this value, use the GetLogicalProcessorInformation function.
Note  For information about the physical processors shared by logical processors, call GetLogicalProcessorInformationEx with the RelationshipType parameter set to RelationProcessorPackage (3).
 
Read more on docs.microsoft.com.
An obsolete member that is retained for compatibility. Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine the type of processor. The granularity for the starting address at which virtual memory can be allocated. For more information, see VirtualAlloc. The architecture-dependent processor level. It should be used only for display purposes. To determine the feature set of a processor, use the IsProcessorFeaturePresent function. If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_INTEL, wProcessorLevel is defined by the CPU vendor. If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_IA64, wProcessorLevel is set to 1. Read more on docs.microsoft.com. The architecture-dependent processor revision. The following table shows how the revision value is assembled for each type of processor architecture. This doc was truncated. Read more on docs.microsoft.com. Flags that specify what PssCaptureSnapshot captures. If both PSS_CREATE_FORCE_BREAKAWAY and PSS_CREATE_BREAKAWAY are specified, then PSS_CREATE_FORCE_BREAKAWAY takes precedence. Read more on docs.microsoft.com. Capture nothing. Capture a snapshot of all cloneable pages in the process. The clone includes all MEM_PRIVATE regions, as well as all sections (MEM_MAPPED and MEM_IMAGE) that are shareable. All Win32 sections created via CreateFileMapping are shareable. (Do not use.) Capture the handle table (handle values only). Capture name information for each handle. Capture basic handle information such as HandleCount, PointerCount, GrantedAccess, etc. Capture type-specific information for supported object types: Process, Thread, Event, Mutant, Section. Capture the handle tracing table. Capture thread information (IDs only). Capture the context for each thread. Capture extended context for each thread (e.g. CONTEXT_XSTATE). (Do not use.) Capture a snapshot of the virtual address space. The VA space is captured as an array of MEMORY_BASIC_INFORMATION structures. This flag does not capture the contents of the pages. For MEM_IMAGE and MEM_MAPPED regions, dumps the path to the file backing the sections (identical to what GetMappedFileName returns). For MEM_IMAGE regions, also dumps: This doc was truncated. Read more on docs.microsoft.com. The breakaway is optional. If the clone process fails to create as a breakaway, then it is created still inside the job. This flag must be specified in combination with either PSS_CREATE_FORCE_BREAKAWAY and/or PSS_CREATE_BREAKAWAY. The clone is broken away from the parent process' job. This is equivalent to CreateProcess flag CREATE_BREAKAWAY_FROM_JOB. The clone is forcefully broken away the parent process's job. This is only allowed for Tcb-privileged callers. The facility should not use the process heap for any persistent or transient allocations. The use of the heap may be undesirable in certain contexts such as creation of snapshots in the exception reporting path (where the heap may be corrupted). Measure performance of the facility. Performance counters can be retrieved via PssQuerySnapshot with the PSS_QUERY_PERFORMANCE_COUNTERS information class of PSS_QUERY_INFORMATION_CLASS. Always 256. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Contains information used by the WerReportCreate function. Learn more about this API from docs.microsoft.com. The size of this structure, in bytes. A handle to the process for which the report is being generated. If this member is NULL, this is the calling process. The name used to look up consent settings. If this member is empty, the default is the name specified by the pwzEventType parameter of WerReportCreate. The display name. If this member is empty, the default is the name specified by pwzEventType parameter of WerReportCreate. The name of the application. If this parameter is empty, the default is the base name of the image file. The full path to the application. A description of the problem. This description is displayed in Problem Reports and Solutions on Windows Vista or the problem reports pane of the Action Center on Windows 7. A handle to the parent window. Always 64. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Always 128. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Always 260. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Always 512. Copies the fixed array to a new string up to the specified length regardless of whether there are null terminating characters. Thrown when is less than 0 or greater than . Copies the fixed array to a new string, stopping before the first null terminator character or at the end of the fixed array (whichever is shorter). Indicates a specific class of process information. Read more on docs.microsoft.com. The process information is represented by a MEMORY_PRIORITY_INFORMATION structure. Allows applications to lower the default memory priority of threads that perform background operations or access files and data that are not expected to be accessed again soon. The process information is represented by a PROCESS_MEMORY_EXHAUSTION_INFO structure. Allows applications to configure a process to terminate if an allocation fails to commit memory. The process information is represented by a APP_MEMORY_INFORMATION structure. Allows applications to query the commit usage and the additional commit available to this process. Does not allow the caller to actually get a commit limit. If a process is set to **ProcessInPrivate** mode, and a trace session has set the [EVENT_ENABLE_PROPERTY_EXCLUDE_INPRIVATE](../evntrace/ns-evntrace-enable_trace_parameters.md) flag, then the trace session will drop all events from that process. The process information is represented by a PROCESS_POWER_THROTTLING_STATE structure. Allows applications to configure how the system should throttle the target process’s activity when managing power. Reserved. Reserved. The process information is represented by a PROCESS_PROTECTION_LEVEL_INFORMATION structure. The process information is represented by a PROCESS_LEAP_SECOND_INFO structure. The maximum value for this enumeration. This value may change in a future version. Contains information used in asynchronous (overlapped) input/output (I/O). This structure should always be initialized to zero before it is used in a function call. If it is not, the function can fail and return ERROR_INVALID_PARAMETER. Use the IStreamAsync::CancelIo function to cancel an asynchronous I/O operation. A common mistake is to reuse an OVERLAPPED structure before the previous asynchronous operation has been completed. Use a separate structure for each request. Create an event object for each thread that processes data. Read more on docs.microsoft.com. Type: ULONG_PTR Reserved for operating system use. This member, which specifies a system-dependent status, is valid when the IStreamAsync::OverlappedResult function returns without setting the extended error information to ERROR_IO_PENDING. Read more on docs.microsoft.com. Type: ULONG_PTR Reserved for operating system use. This member, which specifies the length of the data transferred, is valid when the IStreamAsync::OverlappedResult function returns TRUE. Read more on docs.microsoft.com. Type: handle Handle to an event that is set to the signaled state when the operation has been completed. The calling process must set this member either to zero or a valid event handle before it calls any overlapped functions. To create an event object, use the CreateEvent function. This function returns a handle that can be used to synchronize simultaneous I/O requests for a device. Functions such as IStreamAsync::ReadAsync and IStreamAsync::WriteAsync set this handle to the nonsignaled state before they begin an I/O operation. When the operation has completed, the handle is set to the signaled state. Functions such as IStreamAsync::OverlappedResult and the wait functions reset auto-reset events to the nonsignaled state. Therefore, if an auto-reset event is used, the application can stop responding if it waits for the operation to complete and then calls IStreamAsync::OverlappedResult. Read more on docs.microsoft.com. Contains information about how a device is joined to Microsoft Azure Active Directory. Learn more about this API from docs.microsoft.com. An enumeration value that specifies the type of the join. Representations of the certification for the join. The identifier of the device. A string that represents Azure Active Directory (Azure AD). The identifier of the joined Azure AD tenant. The email address for the joined account. The display name for the joined account. The URL to use to enroll in the Mobile Device Management (MDM) service. The URL that provides information about the terms of use for the MDM service. The URL that provides information about compliance for the MDM service. The URL for synchronizing user settings. Information about the user account that was used to join a device to Azure AD. Specifies the possible ways that a device can be joined to Microsoft Azure Active Directory. Learn more about this API from docs.microsoft.com. The type of join is not known. The device is joined to Azure Active Directory (Azure AD). An Azure AD work account is added on the device. Contains information about a user account that is used to join a device to Microsoft Azure Active Directory. Learn more about this API from docs.microsoft.com. The email address of the user. The identifier of the Microsoft Passport key that is provisioned for the user. The name of the Microsoft Passport key that is provisioned for the user. Represents a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