Microsoft.ApplicationInsights Executes action if Activity is available (DiagnosticSource DLL is available). Decorate all code that works with Activity with this method. Action to execute. True if Activity is available, false otherwise. 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 called. Indicates if this instance has been disposed of. 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 number of telemetry items will accumulate in a memory before the serializing them for transmission to Application Insights. This is not a hard limit on how many unsent items can be in the buffer. Gets or sets the maximum number of telemetry items that can be in the backlog to send. This is a hard limit and Items will be dropped by the once this limit is hit until items are drained from the buffer. Sends an instance of ITelemetry through the channel. Will send all the telemetry items stored in the memory. Will send all the telemetry items stored in the memory. Timeout interval to abort sending. Disposing the channel. 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. 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. 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. Gets or sets the maximum number of telemetry items that can be in the backlog to send. Items will be dropped once this limit is hit. 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. Initializes a new instance of the class. This overload is for Test purposes. 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 the content's type of the transmission. Gets the encoding method of the transmission. Gets a timeout value for the transmission. Gets an id of the transmission. Gets the number of telemetry items in the transmission. Executes the request that the current transmission represents. The task to await. Splits the Transmission object into two pieces using a method to determine the length of the first piece based off of the length of the transmission. A tuple with the first item being a Transmission object with n ITelemetry objects and the second item being a Transmission object with the remaining ITelemetry objects. Creates a post web request. The Address in the web request. A web request pointing to the Address. Telemetry type used for availability web test results. Contains a time and message and optionally some additional metadata. Learn more Initializes a new instance of the class with empty properties. Initializes a new instance of the class with empty properties. Gets or sets the test run id. Gets or sets the test name. Gets or sets availability test duration. Gets or sets a value indicating whether the availability test was successful or not. Gets or sets location where availability test was run. Gets or sets the error message. Gets or sets the value that defines absolute order of the telemetry item. Gets the context associated with the current telemetry item. Gets a dictionary of application-defined property names and values providing additional information about this availability test run. Learn more Gets a dictionary of application-defined event metrics. Learn more Gets or sets date and time when telemetry was recorded. Sanitizes the properties based on constraints. The class that represents information about the collected dependency. Learn more. Initializes a new instance of the class. Initializes a new instance of the class with the given , , , and property values. Initializes a new instance of the class with the given , , , property values. Initializes a new instance of the class with the given , , , , , , and and property values. 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 Dependency ID. Gets or sets the Result Code. Gets or sets resource name. Gets or sets text of SQL command or empty it not applicable. Gets or sets data associated with the current dependency instance. Command name/statement for SQL dependency, URL for http dependency. Gets or sets target of dependency call. SQL server name, url host, etc. Gets or sets the dependency type name. Gets or sets the dependency type name. Gets or sets the amount of time it took the application to handle the request. Gets or sets a value indicating whether the dependency call was successful or not. Gets a dictionary of application-defined property names and values providing additional information about this remote dependency. Learn more Gets a dictionary of application-defined event metrics. Learn more Gets or sets the dependency kind, like SQL, HTTP, Azure, etc. Gets or sets data sampling percentage (between 0 and 100). Should be 100/n where n is an integer. Learn more Sanitizes the properties based on constraints. Telemetry type used to track custom events. Learn more 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 a dictionary of application-defined event metrics. Learn more Gets a dictionary of application-defined property names and values providing additional information about this event. Learn more Gets or sets data sampling percentage (between 0 and 100). Should be 100/n where n is an integer. Learn more 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. Learn more 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 problemId. Gets or sets the value indicated where the exception was handled. Gets or sets the original exception tracked by this . Gets or sets ExceptionTelemetry message. Gets a dictionary of application-defined exception metrics. Learn more Gets a dictionary of application-defined property names and values providing additional information about this exception. Learn more Gets or sets Exception severity level. Gets or sets data sampling percentage (between 0 and 100). Should be 100/n where n is an integer. Learn more Set parsedStack from an array of StackFrame objects. Sanitizes the properties based on constraints. 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 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 metrics. Gets a dictionary of application-defined metric names and values providing additional information about telemetry. Represents an object that supports application-defined properties. Gets a dictionary of application-defined property names and values providing additional information about telemetry. Represent objects that support data sampling. Gets or sets data sampling percentage (between 0 and 100). Telemetry type used to track metrics. Represents a sample set of values with a specified count, sum, max, min, and standard deviation. Learn more Initializes a new instance of the class with empty properties. Obsolete - use MetricTelemetry(name,count,sum,min,max,standardDeviation). Initializes a new instance of the class with the specified and . The is null or empty string. Initializes a new instance of the class with properties provided. Learn more To send metrics, collect your metric events over an aggregation interval of 1 minute. Metric name. Count of values taken during aggregation interval. Sum of values taken during aggregation interval. Minimum value taken during aggregation interval. Maximum of values taken during aggregation interval. Standard deviation of values taken during aggregation interval. 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 sum of the values of the metric samples. Gets or sets the number of values in the sample set. Gets or sets the min value of this metric across the sample set. Gets or sets the max value of this metric across the sample set. Gets or sets the standard deviation of this metric across the sample set. Gets a dictionary of application-defined property names and values providing additional information about this metric. Learn more 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. Learn more 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 page. Gets or sets the page view Uri. Gets or sets the page view duration. Gets a dictionary of custom defined metrics. Learn more Gets a dictionary of application-defined property names and values providing additional information about this page view. Learn more Gets or sets data sampling percentage (between 0 and 100). Should be 100/n where n is an integer. Learn more Sanitizes the properties based on constraints. The class that represents information about performance counters. Initializes a new instance of the class. Initializes a new instance of the class. Category name. Performance counter name. Instance name. Performance counter value. 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. 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. Learn more Initializes a new instance of the class. Initializes a new instance of the class with the given , , , and property values. 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 object that contains contextual information about the application at the time when it handled the request. Gets or sets Request ID. 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. Learn more Gets or sets request url (optional). Gets a dictionary of application-defined request metrics. Learn more Gets or sets the HTTP method of the request. Gets or sets data sampling percentage (between 0 and 100). Gets or sets the source for the request telemetry object. This often is a hashed instrumentation key identifying the caller. 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. Learn more 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 the cloud 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 . Learn more Gets the object describing a location tracked by this . Gets a dictionary of application-defined property values. Learn more Gets a dictionary of context tags. Telemetry type used for log messages. Contains a time and message and optionally some additional metadata. Learn more 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. Learn more Gets or sets data sampling percentage (between 0 and 100). Should be 100/n where n is an integer. Learn more Sanitizes the properties based on constraints. Extracts auto-collected, pre-aggregated (aka. "standard") metrics from telemetry. Metric Extractors participate in the telemetry pipeline as telemetry processors. They examine telemetry items going through the pipeline and create pre-aggregated metrics based on the encountered items. The metrics can be anything. For example, one may choose to extract a metric for "Request Duration" from RequestTelemetry items. Or one may choose to create a metric "Cows Sold" from specific user-tracked EventTelemetry items that contain respective information.
Metric Extractors should be placed into the pipeline after telemetry initializers and before any telemetry processors that may perform any kind of filtering, e.g. before any sampling processors. Placing metric extractors after any filters will prevent them from seeing all potentially relevant telemetry which will skew the extracted metrics.
This extractor is responsible for aggregating auto-collected, pre-aggregated (aka. "standard") metrics, such as failed request count, dependency call durations and similar. Users may use the same pattern to create their own extractors for any metrics they want from any kind of telemetry. This extractor contains several implementations of the (internal) ISpecificAutocollectedMetricsExtractor-interface to which it delegates the aggregation of particular metrics. All those implementations share the same -instance for metric aggregation.
We have dedicated instance variables to refer to each individual extractors because we are exposing some of their properties to the config subsystem here. However, for calling common methods for all of them, we also group them together. Gets the metric manager that owns all extracted metric data series. The MetricManager allows participating extractors to access the Microsoft.ApplicationInsights.Extensibility.MetricManager instance that aggregates all metrics to be extracted. Participants should call on this instance for construction of all data series to be extracted from telemetry. This will ensure that all metric documents are aggregated and tagged correctly and are processed using the instance used to initialize this extractor. The telemetry processor that will be called after this processor. Marks if we ever log MetricExtractorAfterSamplingError so that if we do we use Verbosity level subsequently. Initializes a new instance of the class. Subsequent telemetry processor. Gets or sets the -property. See the remarks for the -class for more info. This class implements the interface by defining this method. It will be called by the infrastructure when the telemetry pipeline is being built. This will ensure that the extractor is initialized using the same as the rest of the pipeline. Specifically, this will also ensure that the and its respective used internally for sending extracted metrics use the same configuration. The telemetric configuration to be used by this extractor. This class implements the interface by defining this method. This method will be called by the pipeline for each telemetry item that goes through it. It invokes to actually do the extraction. The telemetry item from which the metrics will be extracted. Disposes this telemetry extractor. Constructs the extractor info string for caching. The extractor to describe. Extractor info string for caching. All telemetry that has been processed by this extractor will be tagged by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors property. This method adds that string to the specified telemetry item's properties. The telemetry item to be tagged. The string to be added to the item's properties. Calls all participating extractors to initialize themselves. Calls the of each participating extractor for the specified item. Catches and logs all errors. If isItemProcessed is True, adds a corresponding marker to the item's properties. The item from which to extract metrics. Invokes the subsequent telemetry processor if it has been initialized. Item to pass. Groups an instance of ISpecificAutocollectedMetricsExtractor with a cached version of it's pipeline processing info. Encapsulates method call that has to be compiled with DEBUG compiler constant. Write the message to the VisualStudio output window. Checks to see if logging is enabled by an attached debugger. true if a debugger is attached and logging is enabled; otherwise, false. Checks to see if debugger is attached. true if debugger is attached. Provides functionality to process metric values prior to aggregation. Process metric value. Metric definition. Metric value. Saves the context store to the call context. Operation context store instance. Returns the current operation context store present in the call context. Clears the call context and restores the parent operation. Parent operation context store to replace child operation context store. Encapsulates information about a cloud where an application is running. Gets or sets the role name. Gets or sets the role instance. 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. 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. Converts a System.Exception to a Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryTypes.ExceptionDetails. Converts a System.Diagnostics.StackFrame to a Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryTypes.StackFrame. Gets the stack frame length for only the strings in the stack frame. Sanitizing stack to 32k while selecting the initial and end stack trace. 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. Holds the static singleton instance of ContextTagKeys. 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. 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. Base class for tags backed context. HttpWebResponse wrapper object. Gets or sets HttpWebResponse content. Gets or sets HttpWebResponse StatusCode. Gets or sets HttpWebResponse Retry-After header value. Gets or sets HttpWebResponse StatusDescription. Encapsulates Internal information. Gets or sets application insights SDK version. Gets or sets application insights agent version. Gets or sets node name for the billing purposes. Use this filed to override the standard way node names got detected. Encapsulates platform-specific functionality required by the API. This type is public to enable mocking on Windows Phone. Returns contents of the ApplicationInsights.config file in the application directory. Returns the platform specific Debugger writer to the VS output console. Returns the machine name. The machine name. Interface for random number generator capable of producing a batch of unsigned 64 bit random numbers. 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. Gets the compression type used by the serializer. Gets the content type used by the serializer. 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. Converts serialized telemetry items to a byte array. Serialized telemetry items. Should serialization also perform compression. The compressed and serialized telemetry items. Deserializes and decompress the telemetry items into a JSON string. Serialized telemetry items. Should deserialization also perform decompression. Telemetry items serialized as a string. 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. 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. An instance of this class is contained within the telemetry processor. It extracts auto-collected, pre-aggregated (aka. "standard") metrics from DependencyTelemetry objects which represent invocations of the monitored service. Auto-Discovering Dependency Types: ** Dependency call duration is collected as a metric for failed and successful calls separately, and grouped by dependency type. It is essential to control the number of data series produced by this extractor: It must be a small, bounded value. However, this extractor needs to support different modules that collect information about different kinds of dependencies. To meet these constraints, the extractor will auto-discover dependency types, but it will not auto-discover more types than the number controlled by the property. The first MaxDependencyTypesToDiscover dependency types encountered will be tracked separately. Additional types will all be grouped as "Other". Customers should set this value to a value such that "Other" does not actually occur in practice. As a guidance, a good value will be approximately in range 1 - 20. If significantly more types are expected, it should be examined whether the dependency type field is used appropriately. If MaxDependencyTypesToDiscover is set to 0, dependency calls will not be grouped by type. The default value for the property if it is not set to a different value. See also the remarks about the class for additional info about the use the of MaxDependencyTypesToDiscover-property. The MetricManager to be used for creating and sending the metrics by this extractor. Groups privates to ensure atomic updates via replacements. Initializes a new instance of the class. Gets the name of this extractor. All telemetry that has been processed by this extractor will be tagged by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors property. The respective logic is in the -class. Gets the version of this extractor. All telemetry that has been processed by this extractor will be tagged by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors property. The respective logic is in the -class. Gets or sets the maximum number of auto-discovered dependency types. See also the remarks about the class for additional info about the use the of this property. Initializes the internal metrics trackers based on settings. The MetricManager to be used for creating and sending the metrics by this extractor. Extracts appropriate data points for auto-collected, pre-aggregated metrics from a single DependencyTelemetry item. The telemetry item from which to extract the metric data points. Whether of not the specified item was processed (aka not ignored) by this extractor. Initializes the privates and activates them atomically. Max number of Dependency Types to discover. This private data structure groups two metrics for successful and failed calls to a group of dependencies. This private data structure groups several privates of the outer class (DependencyMetricsExtractor). It allows for a lock-free atomic update of all the represented settings and values. Gets the name of this extractor. All telemetry that has been processed by this extractor will be tagged by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors property. The respective logic is in the -class. Gets the version of this extractor. All telemetry that has been processed by this extractor will be tagged by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors property. The respective logic is in the -class. Pre-initialize this extractor. The manager to be used for aggregation. Perform actual metric data point extraction from the specified item. The item from which to extract metrics. Whether the specified item was processed (or ignored) by this extractor. This determines whether the specified item will be tagged accordingly by adding the string "(Name: {ExtractorName}, Ver:{ExtractorVersion})" to the xxx.ProcessedByExtractors> property. An instance of this class is contained within the telemetry processor. It extracts auto-collected, pre-aggregated (aka. "standard") metrics from RequestTelemetry objects which represent invocations of the monitored service. Represents mechanism to calculate basic statistical parameters of a series of numeric values. Lock to make Track() method thread-safe. Initializes a new instance of the class. Gets sample count. Gets sum of the samples. Gets sum of squares of the samples. Gets minimum sample value. Gets maximum sample value. Gets arithmetic average value in the population. Gets variance of the values in the population. Gets standard deviation of the values in the population. Adds a value to the time series. Metric value. Encapsulates information about an operation. Operation normally reflects an end to end scenario that starts from a user action (e.g. button click). Gets or sets the application-defined operation ID for the topmost operation. Gets or sets the parent operation ID. Gets or sets the correlation vector for the current telemetry item. Gets or sets the application-defined topmost operation's name. Gets or sets the application-defined operation SyntheticSource. Operation class that holds operation id and operation name for the current call context. Operation id that will be assigned to all the child telemetry items. Parent Operation id that will be assigned to all the child telemetry items. Root Operation id that will be assigned to all the child telemetry items. Operation name that will be assigned to all the child telemetry items. Context that is propagated with HTTP outbound calls, check for null. Operation class that holds the telemetry item and the corresponding telemetry client. Parent context store that is used to restore call context. Indicates if this instance has been disposed of. Initializes a new instance of the class. Initializes telemetry client. Initializes telemetry client object. Operation telemetry item that is assigned to the telemetry associated to the current operation item. Gets Telemetry item of interest that is created when StartOperation function of ClientExtensions is invoked. Dispose method to clear the variables. Computes the duration and tracks the respective telemetry item on dispose. Base class for telemetry types representing duration in time. Gets or sets the start time of the operation. Gets or sets Operation ID. Gets or sets the name of the operation. Gets or sets whether operation has finished successfully. Gets or sets the duration of the operation. Gets the custom metrics collection. Gets the custom properties collection. Gets or sets the timestamp for the operation. Gets the object that contains contextual information about the application at the time when it handled the request. Gets or sets the value that defines absolute order of the telemetry item. Gets or sets Time in StopWatch ticks representing begin time of the operation. Used internally for calculating duration between begin and end. Sanitizes the properties based on constraints. Sets operation Id. Allow to call OperationTelemetry.Sanitize method from child classes. The .NET 4.0 and 4.5 implementation of the interface. Initializes a new instance of the PlatformImplementation class. Returns contents of the ApplicationInsights.config file in the application directory. Returns the platform specific Debugger writer to the VS output console. Returns the machine name. The machine name. Provides access to the platform. Gets or sets the current implementation. A helper class for implementing properties of telemetry and context classes. Event Source exposes Application Insights telemetry information as ETW events. Event Source exposes Application Insights telemetry information as ETW events. RichPayloadEventSource instance. Event source. Event provider name. Initializes a new instance of the RichPayloadEventSource class. Process a collected telemetry item. A collected Telemetry item. Record an operation start. The operation. Record an operation stop. The operation. Disposes the object. Disposes the object. True if disposing. Keywords for the RichPayloadEventSource. Keyword for requests. Keyword for traces. Keyword for events. Keyword for exceptions. Keyword for dependencies. Keyword for metrics. Keyword for page views. Keyword for performance counters. Keyword for session state. Keyword for availability. Keyword for operations (Start/Stop). Builds a string representing file version of the assembly with added prefix in format prefix:major.minor-revision. Prefix to add to version. String representation of the version with prefix added. Encapsulates information about a user session. Gets or sets the application-defined session ID. Gets or sets the IsFirst Session for the user. Runs a task after a certain delay and log any error. Represents an infinite time span. Gets or sets the delay before the task starts. Gets a value indicating whether value that indicates if a task has already started. Start the task. The task to run. Cancels the current task. Releases unmanaged and - optionally - managed resources. Runs a task after a certain delay and log any error. Represents an infinite time span. Gets or sets the delay before the task starts. Gets a value indicating whether value that indicates if a task has already started. Start the task. The task to run. Cancels the current task. Releases unmanaged and - optionally - managed resources. Log exception thrown by outer code. Exception to log. 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. 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. Writes telemetry items to debug output. Gets or sets a value indicating whether writing telemetry items to debug output is enabled. Write the specified item to debug output. Item to write. If specified, indicates the telemetry item was filtered out and not sent to the API. Represents the TelemetryProcessor chain. Clients should use TelemetryProcessorChainBuilder to construct this object. Initializes a new instance of the class. Marked internal, as clients should use TelemetryProcessorChainBuilder to build the processing chain. Initializes a new instance of the class by using the given list elements. Marked internal, as clients should use TelemetryProcessorChainBuilder to build the processing chain. Gets the first telemetry processor from the chain of processors. Gets the list of TelemetryProcessors making up this chain. Invokes the process method in the first telemetry processor. Releases resources used by the current instance of the class. Represents an object used to Build a TelemetryProcessorChain. Initializes a new instance of the class. The instance to which the constructed processing chain should be set to. Uses given factory to add TelemetryProcessor to the chain of processors. The processors in the chain will be invoked in the same order in which they are added. A delegate that returns a , given the next in the call chain. Builds the chain of linked instances and sets the same in configuration object passed. A special telemetry processor for handling Transmission is always appended as the last processor in the chain. Logs the information when there operation to track is null. Logs the information when there operation to stop does not match the current operation. 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. Subscriber to ETW Event source events, which sends data to other Senders (F5 and Portal). Use diagnostics telemetry module to report SDK internal problems to the portal and VS debug output window. Initializes a new instance of the class. Finalizes an instance of the class. Gets or sets diagnostics Telemetry Module LogLevel configuration setting. Possible values LogAlways, Critical, Error, Warning, Informational and Verbose. Gets or sets instrumentation key for diagnostics. Use to redirect SDK internal problems reporting to the separate instrumentation key. Initializes this telemetry module. Telemetry configuration to use for this telemetry module. Disposes this object. Disposes of resources. Indicates if managed code is being disposed. Event metadata from event source method attribute. Provides a set of extension methods for tracing. Returns a culture-independent string representation of the given object, appropriate for diagnostics tracing. Sends diagnostics data to the appropriate output. Information about trace event. A dummy queue sender to keep the data to be sent to the portal before the initialize method is called. This is due to the fact that initialize method cannot be called without the configuration and the event listener write event is triggered before the diagnosticTelemetryModule initialize method is triggered. This class is responsible for sending diagnostics information into portal. Prefix of the traces in portal. For user non actionable traces use AI Internal prefix. Initializes a new instance of the class. Gets or sets instrumentation key for diagnostics (optional). 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. Event Source event wrapper. Contains description information for trace event. Gets or sets event metadata. Gets or sets event parameters. An that act as a proxy to the Transmission of telemetry"/>. The , as configured in will be used for transmission. This processor is always appended as the last processor in the chain. Initializes a new instance of the class. The to get the channel from. Process the given item. Here processing is sending the item through the channel/>. Defines extension methods that allow coding against without conditional compilation on versions of .NET framework. Returns a value that indicates whether the specified type can be assigned to the current type. This method emulates the built-in method of the class which is not available on Windows Runtime. Returns all the public properties of the specified type. This method emulates the built-in method of the class which is not available on Windows Runtime. Note that, unlike the built-in method, this method does not return properties defined in any of the base types. However, this should be sufficient for our public types, which have to be sealed on Windows Runtime. 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 authenticated user id. Authenticated user id should be a persistent string that uniquely represents each authenticated user in the application or service. 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: implementation of XorShift algorithm https://en.wikipedia.org/wiki/Xorshift. You can find some extra details and performance tests here 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. This API supports the AI Framework infrastructure and is not intended to be used directly from your code. Initializes a new instance of the class. Gets the TelemetryModules collection. Gets the telemetry modules collection. Represents the operation item that holds telemetry which is tracked on end request. Operation can be associated with either WEB or SQL dependencies. Gets Telemetry item of interest that is created when StartOperation function of ClientExtensions is invoked. Represents an object that initializes objects. The instances use objects to automatically initialize properties of the objects. Initializes properties of the specified object. Represents an object that supports initialization from . Initialize method is called after all configuration properties have been loaded from the configuration. Represents an object used to process telemetry as part of sending it to Application Insights. Process a collected telemetry item. A collected Telemetry item. Represents aggregator for a single time series of a given metric. Aggregator manager for the aggregator. Metric aggregator id to look for in the aggregator dictionary. Aggregator hash code. Initializes a new instance of the class. Aggregator manager handling this instance. Metric name. Metric dimensions. Gets metric name. Gets a set of metric dimensions and their values. Adds a value to the time series. Metric value. Returns the hash code for this object. A 32-bit signed integer hash code. Determines whether the specified object is equal to the current object. The object to compare with the current object. True if the specified object is equal to the current object; otherwise, false. Determines whether the specified object is equal to the current object. The object to compare with the current object. True if the specified object is equal to the current object; otherwise, false. Generates id of the aggregator serving time series specified in the parameters. Metric name. Optional metric dimensions. Aggregator id that can be used to get aggregator. Forwards value to metric processors. Value tracked on time series. Metric factory and controller. Sends metrics to Application Insights service. Pre-aggregates metrics to reduce bandwidth. Learn more Value of the property indicating 'app insights version' allowing to tell metric was built using metric manager. Reporting frequency. Telemetry client used to track resulting aggregated metrics. Metric aggregation snapshot task. Last time snapshot was initiated. A dictionary of all metrics instantiated via this manager. Initializes a new instance of the class. Initializes a new instance of the class. Telemetry client to use to output aggregated metric data. Gets a list of metric processors associated with this instance of . Creates metric. Name of the metric. Optional dimensions. Metric instance. Learn more Flushes the in-memory aggregation buffers. Not normally required - occurs automatically at intervals and on Dispose. Disposes the object. Calculates wait time until next snapshot of the aggregators. Wait time. Generates telemetry object based on the metric aggregator. Metric definition. Metric aggregator statistics calculated for a period of time. Metric telemetry object resulting from aggregation. Takes a snapshot of aggregators collected by this instance of the manager and schedules the next snapshot. Takes snapshot of all active metric aggregators and turns results into metric telemetry. Telemetry initializer that populates OperationContext for the telemetry item based on context stored in an AsyncLocal variable. Initializes/Adds operation id to the existing telemetry item. Target telemetry item to add operation id. Helps to define whether thread is performing SDK internal operation at the moment. Determines whether the current thread executing the internal operation. true if the current thread executing the internal operation; otherwise, false. Marks the thread as executing the internal operation. Unmarks the thread as executing the internal operation. An 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. Indicates if this instance has been disposed of. Indicates if we created the telemetry channel and should therefore dispose of it. Initializes a new instance of the TelemetryConfiguration class. Initializes a new instance of the TelemetryConfiguration class. The instrumentation key this configuration instance will provide. Initializes a new instance of the TelemetryConfiguration class. The instrumentation key this configuration instance will provide. The telemetry channel to provide with this configuration instance. 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 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 a readonly collection of TelemetryProcessors. Gets the TelemetryProcessorChainBuilder which can build and populate TelemetryProcessors in the TelemetryConfiguration. Gets or sets the telemetry channel. Gets the list of objects used for custom metric data processing before client-side metric aggregation process. Gets or sets the chain of processors. 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. Creates a new instance loaded from the specified configuration. An xml serialized configuration. Throws if the config value is null or empty. Releases resources used by the current instance of the class. Disposes of resources. Indicates if managed code is being disposed. Extension functions to operation telemetry that start and stop the timer. Multiplier to convert Stopwatch ticks to TimeSpan ticks. An extension to telemetry item that starts the timer for the respective telemetry. Telemetry item object that calls this extension method. An extension to telemetry item that initializes the timer for the respective telemetry using a timestamp from a high-resolution . Telemetry item object that calls this extension method. A high-resolution timestamp from . An extension method to telemetry item that stops the timer and computes the duration of the request or dependency. Telemetry item object that calls this extension method. An extension method to telemetry item that stops the timer and computes the duration of the request or dependency. Telemetry item object that calls this extension method. A high-resolution timestamp from . Generate random operation Id and set it to OperationContext. Telemetry to initialize Operation id for. Set the duration given a timestamp from a high-resolution . Telemetry item object to update. The high resolution timestamp. Record the duration and, optionally, set the timestamp to the current time. Telemetry item object to update. The duration of the operation. Send events, metrics and other telemetry to the Application Insights service. Learn more 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. The does not contain a telemetry channel. 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 the object associated with this telemetry client instance. Check to determine if the tracking is enabled. Send an for display in Diagnostic Search and aggregation in Metrics Explorer. Learn more 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. Create a separate instance for each call to . Learn more An event log item. Send a trace message for display in Diagnostic Search. Learn more Message to display. Send a trace message for display in Diagnostic Search. Learn more Message to display. Trace severity level. Send a trace message for display in Diagnostic Search. Learn more Message to display. Named string values you can use to search and classify events. Send a trace message for display in Diagnostic Search. Learn more 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. Create a separate instance for each call to . Learn more Message with optional properties. Obsolete - use to send metrics. Metric name. Metric value. Named string values you can use to classify and filter metrics. Send a that represents aggregated metric data. Create a separate instance for each call to . Consider using to send metrics with reduced bandwidth. Learn more 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. Learn more Send an for display in Diagnostic Search. Create a separate instance for each call to Learn more Send information about external dependency call in the application. External dependency name. Dependency call command name. The time when the dependency was called. The time taken by the external dependency to handle the call. True if the dependency call was handled successfully. Learn more Send information about external dependency call in the application. External dependency type. External dependency target. External dependency name. Dependency call command name. The time when the dependency was called. The time taken by the external dependency to handle the call. Result code of dependency call execution. True if the dependency call was handled successfully. Learn more Send information about external dependency call in the application. Create a separate instance for each call to Learn more Send information about availability of an application. Availability test name. The time when the availability was captured. The time taken for the availability test to run. Name of the location the availability test was run from. True if the availability test ran successfully. Error message on availability test run failure. Named string values you can use to classify and search for this availability telemetry. Additional values associated with this availability telemetry. Learn more Send information about availability of an application. Create a separate instance for each call to Learn more This method is an internal part of Application Insights infrastructure. Do not call. This method is an internal part of Application Insights infrastructure. Do not call. Telemetry item to initialize. Send information about the page viewed in the application. Name of the page. Learn more Send information about the page viewed in the application. Create a separate instance for each call to . Learn more 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. Learn more Send information about a request handled by the application. Create a separate instance for each call to . Learn more Flushes the in-memory buffer. Learn more Extension class to telemetry client that creates operation object with the respective fields initialized. Start operation creates an operation object with a respective telemetry item. Type of the telemetry item. Telemetry client object. Name of the operation that customer is planning to propagate. Operation item object with a new telemetry item having current start time and timestamp. Start operation creates an operation object with a respective telemetry item. Type of the telemetry item. Telemetry client object. Name of the operation that customer is planning to propagate. Operation ID to set in the new operation. Optional parent operation ID to set in the new operation. Operation item object with a new telemetry item having current start time and timestamp. Creates an operation object with a given telemetry item. Type of the telemetry item. Telemetry client object. Operation to start. Operation item object with a new telemetry item having current start time and timestamp. Stop operation computes the duration of the operation and tracks it using the respective telemetry client. Telemetry client object. Operation object to compute duration and track. 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. Returns min DateTimeOffset value if not a valid DateTimeOffset.