Microsoft.AI.ServerTelemetryChannel Telemetry processor for sampling telemetry at a dynamic rate before sending to Application Insights. Fixed-rate sampling telemetry processor. Sampling percentage estimator settings. Callback invoked every time sampling percentage is evaluated. Sampling percentage estimator telemetry processor. Initializes a new instance of the class. Next TelemetryProcessor in call chain. Initializes a new instance of the class. Sampling percentage estimator settings. Callback invoked every time sampling percentage is evaluated. Next TelemetryProcessor in call chain. Gets or sets a semicolon separated list of telemetry types that should not be sampled. Types listed are excluded even if they are set in IncludedTypes. Gets or sets a semicolon separated list of telemetry types that should be sampled. If left empty all types are included implicitly. Types are not included if they are set in ExcludedTypes. Gets or sets initial sampling percentage applied at the start of the process to dynamically vary the percentage. Gets or sets maximum rate of telemetry items per second dynamic sampling will try to adhere to. Gets or sets minimum sampling percentage that can be set by the dynamic sampling percentage algorithm. Gets or sets maximum sampling percentage that can be set by the dynamic sampling percentage algorithm. Gets or sets duration of the sampling percentage evaluation interval. Gets or sets a value indicating how long to not to decrease sampling percentage after last change to prevent excessive fluctuation. Gets or sets a value indicating how long to not to increase sampling percentage after last change to prevent excessive fluctuation. Gets or sets exponential moving average ratio (factor) applied during calculation of rate of telemetry items produced by the application. Processes telemetry item. Telemetry item to process. Disposes the object. Disposes the object. True if disposing. Throws if the process lacks the required permissions to access the . 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. Runs tasks synchronously, on the current thread. From . Starts the , catches and logs any exceptions it may throw. Returns a per-user/per-application folder. An instance, or null if current application does not have access to file system. 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. Encapsulates platform-specific behavior of network information APIs. Adds event handler. Defined as a method instead of an event in this interface because C# compiler changes signature of event in a Windows Runtime component, making it very hard to implement properly. Removes event handler. Address changed event handler. Encapsulates platform-specific behavior of network information APIs. Releases resources used by this instance. Accumulates items for efficient transmission. Gets or sets the maximum number of telemetry items that can be buffered before transmission. The value is zero or less. Releases resources used by this instance. Processes the specified item. The is null. Passes all items to the and empties the queue. Gets or sets the endpoint address. If endpoint address is set to null, the default endpoint address will be used. Gets or sets the maximum amount of memory in bytes for buffering objects. Use this property to limit the amount of memory used to store telemetry in memory of the application before transmission. Once the maximum amount of memory is reached, will reject new transmissions. Gets the combined length of stored in the buffer. Loads a new transmission from the specified . Return transmission loaded from file; throws FormatException is file is corrupted. Saves the transmission to the specified . Gets or sets the the maximum number of objects that can be sent simultaneously. Use this property to limit the number of concurrent HTTP connections. Once the maximum number of transmissions in progress is reached, will stop accepting new transmissions until previous transmissions are sent. Gets or sets a value indicating whether a limiter on the maximum number of objects that can be sent in a given throttle window is enabled. Items attempted to be sent exceeding of the local throttle amount will be treated the same as a backend throttle. Gets or sets the maximum number of items that will be allowed to send in a given throttle window. Gets or sets the size of the self-limiting throttle window in milliseconds. Checks if the transmission throttling policy allows for sending another request. If so, this method will add a request to the current throttle count (unless peeking). The number of events that are able to be sent. Gets or sets the total amount of disk space, in bytes, allowed for storing transmission files. Implements throttled and persisted transmission of telemetry to Application Insights. Initializes a new instance of the class. Used only for UTs. Releases resources used by this instance. Implements the events for web applications. The event is raised when the instance is first created. This event is not raised for web applications. The event is raised when calls the method. Unregisters the from . Gets called by when the web application is stopping. False when the method is invoked first time, allowing async shutdown operations. True when the method is invoked second time, demanding to unregister immediately. Represents a telemetry processor for sampling telemetry at a fixed-rate before sending to Application Insights. Initializes a new instance of the class. Next TelemetryProcessor in call chain. Gets or sets a semicolon separated list of telemetry types that should not be sampled. Allowed type names: Dependency, Event, Exception, PageView, Request, Trace. Types listed are excluded even if they are set in IncludedTypes. Gets or sets a semicolon separated list of telemetry types that should be sampled. If left empty all types are included implicitly. Types are not included if they are set in ExcludedTypes. Gets or sets data sampling percentage (between 0 and 100) for all objects logged in this . All sampling percentage must be in a ratio of 100/N where N is a whole number (2, 3, 4, …). E.g. 50 for 1/2 or 33.33 for 1/3. Failure to follow this pattern can result in unexpected / incorrect computation of values in the portal. Gets or sets the next TelemetryProcessor in call chain. Process a collected telemetry item. A collected Telemetry item. Represents a communication channel for sending telemetry to Application Insights via HTTP/S. Initializes a new instance of the class. Gets or sets default interval after which diagnostics event will be logged if telemetry sending was disabled. 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 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. 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. Gets or sets the maximum amount of disk space, in bytes, that will use to store unsent telemetry transmissions. Gets or sets the folder to be used as a temporary storage for events that were not sent because of temporary connectivity issues. If folder was not provided or inaccessible. %LocalAppData% or %Temp% folder will be used. Gets or sets a value indicating whether a limiter on the maximum number of objects that can be sent in a given throttle window is enabled. Items attempted to be sent exceeding of the local throttle amount will be treated the same as a backend throttle. Gets or sets the maximum number of items that will be allowed to send in a given throttle window. Gets or sets the size of the self-limiting throttle window in milliseconds. Gets or sets first TelemetryProcessor in processor call chain. Releases unmanaged and - optionally - managed resources. Sends an instance of ITelemetry through the channel. Asynchronously flushes the telemetry buffer. Initialize method is called after all configuration properties have been loaded from the configuration. Exponential moving average counter. Average value of the counter. Value of the counter during current interval of time. Initializes a new instance of the class. Exponential coefficient. Gets exponential coefficient (must be between 0 and 1). Gets exponential moving average value of the counter. Increments counter value. Incremented value. Zeros out current value and starts new 'counter interval'. Interface for random number generator capable of producing a batch of unsigned 64 bit random numbers. Container for all the settings applicable to the process of dynamically estimating application telemetry sampling percentage. Set of default settings. Initializes a new instance of the class. Gets or sets maximum rate of telemetry items per second dynamic sampling will try to adhere to. Gets or sets initial sampling percentage applied at the start of the process to dynamically vary the percentage. Gets or sets minimum sampling percentage that can be set by the dynamic sampling percentage algorithm. Gets or sets maximum sampling percentage that can be set by the dynamic sampling percentage algorithm. Gets or sets duration of the sampling percentage evaluation interval in seconds. Gets or sets a value indicating how long to not to decrease sampling percentage after last change to prevent excessive fluctuation. Gets or sets a value indicating how long to not to increase sampling percentage after last change to prevent excessive fluctuation. Gets or sets exponential moving average ratio (factor) applied during calculation of rate of telemetry items produced by the application. Gets effective maximum telemetry items rate per second adjusted in case user makes an error while setting a value. Gets effective initial sampling rate adjusted in case user makes an error while setting a value. Gets effective minimum sampling rate adjusted in case user makes an error while setting a value. Gets effective maximum sampling rate adjusted in case user makes an error while setting a value. Gets effective sampling percentage evaluation interval adjusted in case user makes an error while setting a value. Gets effective sampling percentage decrease timeout adjusted in case user makes an error while setting a value. Gets effective sampling percentage increase timeout adjusted in case user makes an error while setting a value. Gets effective exponential moving average ratio adjusted in case user makes an error while setting a value. Adjusts sampling percentage set by user to account for errors such as setting it below zero or above 100%. Input sampling percentage. Adjusted sampling percentage in range > 0 and <= 100. Represents a method that is invoked every time sampling percentage is evaluated by the dynamic sampling algorithm. Rate of telemetry items generated by this instance of the application after current sampling percentage was applied. Current sampling percentage that was used by the algorithm. Suggested new sampling percentage that will allow to keep desired telemetry item generation rate given the volume of items states the same. A value indicating whether new sampling percentage will be applied by dynamic sampling algorithm. New sampling percentage may not be immediately applied in case it was recently changed. Dynamic sampling algorithm settings. Telemetry processor to estimate ideal sampling percentage. Next-in-chain processor. Dynamic sampling estimator settings. Average telemetry item counter. Evaluation timer. Current evaluation interval. Current sampling rate. Last date and time sampling percentage was changed. Callback to invoke every time sampling percentage is evaluated. Initializes a new instance of the class. Next TelemetryProcessor in call chain. Initializes a new instance of the class. Dynamic sampling estimator settings. Callback to invoke every time sampling percentage is evaluated. Next TelemetryProcessor in call chain. Processes telemetry item. Telemetry item to process. Disposes the object. Checks to see if exponential moving average has changed. Currently running value of moving average. Value set in the algorithm parameters. True if moving average value changed. Callback for sampling percentage evaluation timer. Timer state. Utility class for sampling score generation. Generates telemetry sampling score between 0 and 100. Telemetry item to score. Item sampling score. 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. Gets the number of consecutive errors SDK transmitter got so far while sending telemetry to backend. Gets the last status code SDK received from the backend. Sets ConsecutiveErrors to 0. Extension methods for . Adds shorthand for adding well-known processors. Adds to the given Instance of Sampling Percentage to configure. Semicolon separated list of types that should not be sampled. Semicolon separated list of types that should be sampled. All types are sampled when left empty. Instance of . Adds to the Instance of Semicolon separated list of types that should not be sampled. Semicolon separated list of types that should be sampled. All types are sampled when left empty. Instance of . Adds to the Instance of Maximum number of telemetry items to be generated on this application instance. Semicolon separated list of types that should not be sampled. Semicolon separated list of types that should be sampled. All types are sampled when left empty. Instance of . Adds to the Instance of Set of settings applicable to dynamic sampling percentage algorithm. Callback invoked every time sampling percentage evaluation occurs. Semicolon separated list of types that should not be sampled. Semicolon separated list of types that should be sampled. All types are sampled when left empty. Instance of .