diff --git a/ApplicationInsightsSDKRules.ruleset b/ApplicationInsightsSDKRules.ruleset index 55cdaac18a..0876baca7d 100644 --- a/ApplicationInsightsSDKRules.ruleset +++ b/ApplicationInsightsSDKRules.ruleset @@ -11,6 +11,8 @@ + + @@ -81,7 +83,9 @@ - + + diff --git a/src/Microsoft.ApplicationInsights/Channel/ITelemetry.cs b/src/Microsoft.ApplicationInsights/Channel/ITelemetry.cs index a33e48e4e4..bfe401cc7b 100644 --- a/src/Microsoft.ApplicationInsights/Channel/ITelemetry.cs +++ b/src/Microsoft.ApplicationInsights/Channel/ITelemetry.cs @@ -52,7 +52,7 @@ public interface ITelemetry ITelemetry DeepClone(); /// - /// Writes serialization info about the data class of the implementing type using the given + /// Writes serialization info about the data class of the implementing type using the given . /// void SerializeData(ISerializationWriter serializationWriter); } diff --git a/src/Microsoft.ApplicationInsights/Channel/InMemoryTransmitter.cs b/src/Microsoft.ApplicationInsights/Channel/InMemoryTransmitter.cs index ba796271a0..7d2501e7f5 100644 --- a/src/Microsoft.ApplicationInsights/Channel/InMemoryTransmitter.cs +++ b/src/Microsoft.ApplicationInsights/Channel/InMemoryTransmitter.cs @@ -6,12 +6,13 @@ namespace Microsoft.ApplicationInsights.Channel { using System; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Threading; using System.Threading.Tasks; - using Extensibility; - using Extensibility.Implementation; - using Extensibility.Implementation.Tracing; + using Microsoft.ApplicationInsights.Extensibility; + using Microsoft.ApplicationInsights.Extensibility.Implementation; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; /// /// A transmitter that will immediately send telemetry over HTTP. @@ -32,7 +33,6 @@ internal class InMemoryTransmitter : IDisposable /// The number of times this object was disposed. /// private int disposeCount = 0; - private TimeSpan sendingInterval = TimeSpan.FromSeconds(30); private Uri endpointAddress = new Uri(Constants.TelemetryServiceEndpoint); diff --git a/src/Microsoft.ApplicationInsights/Channel/Transmission.cs b/src/Microsoft.ApplicationInsights/Channel/Transmission.cs index 9b23999c1b..37a5347435 100644 --- a/src/Microsoft.ApplicationInsights/Channel/Transmission.cs +++ b/src/Microsoft.ApplicationInsights/Channel/Transmission.cs @@ -167,7 +167,7 @@ public virtual async Task SendAsync() wrapper = new HttpWebResponseWrapper { StatusCode = (int)response.StatusCode, - StatusDescription = response.ReasonPhrase // maybe not required? + StatusDescription = response.ReasonPhrase, // maybe not required? }; wrapper.RetryAfterHeader = response.Headers?.RetryAfter?.ToString(); @@ -204,7 +204,7 @@ public virtual async Task SendAsync() { wrapper = new HttpWebResponseWrapper { - StatusCode = (int)HttpStatusCode.RequestTimeout + StatusCode = (int)HttpStatusCode.RequestTimeout, }; } diff --git a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionDetailsInfo.cs b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionDetailsInfo.cs index 059508196f..4f9839681a 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionDetailsInfo.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionDetailsInfo.cs @@ -32,7 +32,7 @@ public ExceptionDetailsInfo(int id, int outerId, string typeName, string message message = message, hasFullStack = hasFullStack, stack = stack, - parsedStack = parsedStack.Select(ps => ps.Data).ToList() + parsedStack = parsedStack.Select(ps => ps.Data).ToList(), }; } diff --git a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionHandledAt.cs b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionHandledAt.cs index 31ec47eab1..342db789d5 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionHandledAt.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionHandledAt.cs @@ -21,6 +21,6 @@ public enum ExceptionHandledAt /// /// Exception was handled by some platform handlers. /// - Platform + Platform, } } diff --git a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionInfo.cs b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionInfo.cs index 869a84a56d..51a0747cba 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/ExceptionInfo.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/ExceptionInfo.cs @@ -3,8 +3,8 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; - using Extensibility.Implementation; - using Extensibility.Implementation.External; + using Microsoft.ApplicationInsights.Extensibility.Implementation; + using Microsoft.ApplicationInsights.Extensibility.Implementation.External; /// /// Wrapper class for that lets user provide exception data without having the actual Exception object. @@ -14,7 +14,7 @@ internal sealed class ExceptionInfo private readonly ExceptionData data; /// - /// Constructs the instance of + /// Constructs the instance of . /// public ExceptionInfo(IEnumerable exceptionDetailsInfoList, SeverityLevel? severityLevel, string problemId, IDictionary properties, IDictionary measurements) @@ -25,7 +25,7 @@ public ExceptionInfo(IEnumerable exceptionDetailsInfoList, severityLevel = severityLevel.TranslateSeverityLevel(), problemId = problemId, properties = new ConcurrentDictionary(properties), - measurements = new ConcurrentDictionary(measurements) + measurements = new ConcurrentDictionary(measurements), }; } diff --git a/src/Microsoft.ApplicationInsights/DataContracts/PerformanceCounterTelemetry.cs b/src/Microsoft.ApplicationInsights/DataContracts/PerformanceCounterTelemetry.cs index 7fe874c441..726b9197b9 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/PerformanceCounterTelemetry.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/PerformanceCounterTelemetry.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; - using Channel; + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; /// diff --git a/src/Microsoft.ApplicationInsights/DataContracts/SessionState.cs b/src/Microsoft.ApplicationInsights/DataContracts/SessionState.cs index 28c1bdf31a..197a16adc3 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/SessionState.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/SessionState.cs @@ -18,7 +18,7 @@ public enum SessionState /// /// Indicates that a user session ended. /// - End + End, } #pragma warning restore CA1724 } diff --git a/src/Microsoft.ApplicationInsights/DataContracts/StackFrame.cs b/src/Microsoft.ApplicationInsights/DataContracts/StackFrame.cs index b2755741dc..4f789ec2ac 100644 --- a/src/Microsoft.ApplicationInsights/DataContracts/StackFrame.cs +++ b/src/Microsoft.ApplicationInsights/DataContracts/StackFrame.cs @@ -18,7 +18,7 @@ public StackFrame(string assembly, string fileName, int level, int line, string fileName = fileName, level = level, line = line, - method = method + method = method, }; } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/IApplicationIdProvider.cs b/src/Microsoft.ApplicationInsights/Extensibility/IApplicationIdProvider.cs index 0a9a390671..6b3356302d 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/IApplicationIdProvider.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/IApplicationIdProvider.cs @@ -6,13 +6,13 @@ public interface IApplicationIdProvider { /// - /// Retrieves the Application Id to be used for Request.Source or Dependency.Target + /// Retrieves the Application Id to be used for Request.Source or Dependency.Target. /// /// /// Application Insights data model defines two fields: request.source and dependency.target. /// The first field identifies the component that initiated the dependency request, /// and the second identifies which component returned the response of the dependency call. - /// For more information see: https://docs.microsoft.com/azure/application-insights/application-insights-correlation + /// For more information see: https://docs.microsoft.com/azure/application-insights/application-insights-correlation . /// /// Instrumentation Key string used to lookup associated Application Id. /// Application Id corresponding to the Instrumentation Key. Returns NULL if a match was not found. diff --git a/src/Microsoft.ApplicationInsights/Extensibility/ISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/ISerializableWithWriter.cs index a1e4ab5064..ea5a034bc7 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/ISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/ISerializableWithWriter.cs @@ -1,12 +1,12 @@ namespace Microsoft.ApplicationInsights.Extensibility { /// - /// Interface for defining objects which can be serialized with a given + /// Interface for defining objects which can be serialized with a given . /// public interface ISerializableWithWriter { /// - /// Writes serialization info about the class using the given + /// Writes serialization info about the class using the given . /// void Serialize(ISerializationWriter serializationWriter); } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/ISerializationWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/ISerializationWriter.cs index 83f5591e05..b30f09d7c8 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/ISerializationWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/ISerializationWriter.cs @@ -9,62 +9,62 @@ public interface ISerializationWriter { /// - /// Writes name and value for a string field + /// Writes name and value for a string field. /// void WriteProperty(string name, string value); /// - /// Writes name and value for a double field + /// Writes name and value for a double field. /// void WriteProperty(string name, double? value); /// - /// Writes name and value for a int field + /// Writes name and value for a int field. /// void WriteProperty(string name, int? value); /// - /// Writes name and value for a boolean field + /// Writes name and value for a boolean field. /// void WriteProperty(string name, bool? value); /// - /// Writes name and value for a TimeSpan field + /// Writes name and value for a TimeSpan field. /// void WriteProperty(string name, TimeSpan? value); /// - /// Writes name and value for a DateTimeOffset field + /// Writes name and value for a DateTimeOffset field. /// void WriteProperty(string name, DateTimeOffset? value); /// - /// Writes name and value for a ISerializableWithWriter field + /// Writes name and value for a ISerializableWithWriter field. /// void WriteProperty(string name, ISerializableWithWriter value); /// - /// Writes value ISerializableWithWriter field + /// Writes value ISerializableWithWriter field. /// void WriteProperty(ISerializableWithWriter value); /// - /// Writes name and values for a IList field of strings + /// Writes name and values for a IList field of strings. /// void WriteProperty(string name, IList items); /// - /// Writes name and values for a IList field of objects implementing ISerializableWithWriter + /// Writes name and values for a IList field of objects implementing ISerializableWithWriter. /// void WriteProperty(string name, IList items); /// - /// Writes name and value for a IDictionary field with string,string as key,value + /// Writes name and value for a IDictionary field with string,string as key,value. /// void WriteProperty(string name, IDictionary items); /// - /// Writes name and value for a IDictionary field with string,string as key,value + /// Writes name and value for a IDictionary field with string,string as key,value. /// void WriteProperty(string name, IDictionary items); diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationIdHelper.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationIdHelper.cs index 5b9a977128..76664df49d 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationIdHelper.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationIdHelper.cs @@ -7,7 +7,7 @@ internal static class ApplicationIdHelper { /// - /// special string which describes that ID was taken from Breeze + /// special string which describes that ID was taken from Breeze. /// private const string Format = "cid-v1:{0}"; @@ -83,7 +83,7 @@ private static string EnforceMaxLength(string input, int maxLength) /// ASCII Extended characters (hex: 0x80 - 0xFF) (decimal: 128-255) (NOT ALLOWED) /// Non-Printable ASCII characters are (hex: 0x00 - 0x1F) (decimal: 0-31) (NOT ALLOWED) /// Printable ASCII characters are (hex: 0x20 - 0xFF) (decimal: 32-255) (PARTIALLY ALLOWED) - /// ALLOWED characters are (hex: 0x20 - 0x7F) (decimal: 32-127) + /// ALLOWED characters are (hex: 0x20 - 0x7F) (decimal: 32-127). /// private static bool IsCharHeaderSafe(char ch) => (uint)(ch - 0x20) <= (0x7F - 0x20); } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationInsightsApplicationIdProvider.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationInsightsApplicationIdProvider.cs index 1b3763c1f1..898cf049fa 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationInsightsApplicationIdProvider.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ApplicationInsightsApplicationIdProvider.cs @@ -2,9 +2,9 @@ { using System; using System.Collections.Concurrent; - using System.Threading; using System.Threading.Tasks; - using Extensibility; + + using Microsoft.ApplicationInsights.Extensibility; /// /// This will query the Application Insights' Breeze endpoint to lookup an Application Id based on Instrumentation Key. @@ -42,7 +42,7 @@ internal ApplicationInsightsApplicationIdProvider(ProfileServiceWrapper profileS /// /// Gets or sets the endpoint that is to be used to get the Application Insights resource's profile (Application Id etc.). - /// Default value is "https://dc.services.visualstudio.com/api/profiles/{0}/appId". If this is overwritten, MUST include the '{0}' for string replacement! + /// Default value is "https://dc.services.visualstudio.com/api/profiles/{0}/appId". If this is overwritten, MUST include the '{0}' for string replacement!. /// public string ProfileQueryEndpoint { @@ -51,7 +51,7 @@ public string ProfileQueryEndpoint } /// - /// Disposes resources + /// Disposes resources. /// public void Dispose() { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/DictionaryApplicationIdProvider.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/DictionaryApplicationIdProvider.cs index cc0eeba79c..9f6a3119f9 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/DictionaryApplicationIdProvider.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/DictionaryApplicationIdProvider.cs @@ -8,7 +8,7 @@ public class DictionaryApplicationIdProvider : IApplicationIdProvider { /// - /// Gets or sets a dictionary of Instrumentation Keys to Application Ids + /// Gets or sets a dictionary of Instrumentation Keys to Application Ids. /// public IReadOnlyDictionary Defined { get; set; } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/FailedRequestsManager.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/FailedRequestsManager.cs index 9ebce45290..39995f7d5a 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/FailedRequestsManager.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/FailedRequestsManager.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Concurrent; using System.Net; - using Extensibility.Implementation.Tracing; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; internal class FailedRequestsManager { @@ -104,7 +104,7 @@ private class FailedResult /// /// Initializes a new instance of the class. /// - /// Time to wait before a retry + /// Time to wait before a retry. /// Failure response code. Used to determine if we should retry requests. public FailedResult(TimeSpan retryAfter, HttpStatusCode httpStatusCode = HttpStatusCode.OK) { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ProfileServiceWrapper.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ProfileServiceWrapper.cs index a44d1ed905..1cbef4a157 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ProfileServiceWrapper.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ApplicationId/ProfileServiceWrapper.cs @@ -5,7 +5,7 @@ using System.Globalization; using System.Net.Http; using System.Threading.Tasks; - using Extensibility; + using Microsoft.ApplicationInsights.Extensibility; internal class ProfileServiceWrapper : IDisposable { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/BroadcastProcessor.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/BroadcastProcessor.cs index d19b9eb08e..af91fa1ef2 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/BroadcastProcessor.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/BroadcastProcessor.cs @@ -75,7 +75,7 @@ public TelemetryDispatcher(TelemetrySink sink, bool cloneBeforeDispatch) } /// - /// Sends the item to sink. If cloning of item is required, clones the item before sending it to + /// Sends the item to sink. If cloning of item is required, clones the item before sending it to . /// /// The telemetry item to send to sink. public void SendItemToSink(ITelemetry telemetry) diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ExceptionConverter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ExceptionConverter.cs index e179593a67..961ecdbb1b 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ExceptionConverter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/ExceptionConverter.cs @@ -37,7 +37,7 @@ internal static External.StackFrame GetStackFrame(StackFrame stackFrame, int fra { var convertedStackFrame = new External.StackFrame() { - level = frameId + level = frameId, }; var methodInfo = stackFrame.GetMethod(); diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/AvailabilityDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/AvailabilityDataISerializableWithWriter.cs index 14105dbb48..33d648b0f4 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/AvailabilityDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/AvailabilityDataISerializableWithWriter.cs @@ -5,7 +5,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class AvailabilityData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/DataPointIExtension.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/DataPointIExtension.cs index bd654095a7..9e84f6fc16 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/DataPointIExtension.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/DataPointIExtension.cs @@ -3,7 +3,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class DataPoint : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/EventDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/EventDataISerializableWithWriter.cs index 1820667ae9..83e2ae38aa 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/EventDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/EventDataISerializableWithWriter.cs @@ -5,7 +5,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class EventData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDataISerializableWithWriter.cs index c385f58564..5a750c8c7f 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDataISerializableWithWriter.cs @@ -7,7 +7,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class ExceptionData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDetailsImplementation.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDetailsImplementation.cs index 1fa8b8ef8e..d1915ac959 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDetailsImplementation.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/ExceptionDetailsImplementation.cs @@ -21,7 +21,7 @@ internal static ExceptionDetails CreateWithoutStackInfo(Exception exception, Exc { id = exception.GetHashCode(), typeName = exception.GetType().FullName, - message = exception.Message + message = exception.Message, }; if (parentExceptionDetails != null) diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageDataIExtension.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageDataIExtension.cs index 592fe1e6af..7f6a673d4b 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageDataIExtension.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageDataIExtension.cs @@ -6,7 +6,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class MessageData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageData_typeslazy.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageData_typeslazy.cs index 1f9075cfb5..233ba5bfa5 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageData_typeslazy.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MessageData_typeslazy.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class MessageData { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MetricDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MetricDataISerializableWithWriter.cs index 89eb5e72a7..7ee8b68ef5 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MetricDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/MetricDataISerializableWithWriter.cs @@ -6,7 +6,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class MetricData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewDataIExtension.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewDataIExtension.cs index f1eadb1a53..a49d86cc34 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewDataIExtension.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewDataIExtension.cs @@ -3,7 +3,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class PageViewData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewPerfDataIExtension.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewPerfDataIExtension.cs index 7417ff207c..103f1be714 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewPerfDataIExtension.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/PageViewPerfDataIExtension.cs @@ -1,7 +1,7 @@ namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External { /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class PageViewPerfData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyDataISerializableWithWriter.cs index 40ee838c2f..56e6730942 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyDataISerializableWithWriter.cs @@ -5,7 +5,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class RemoteDependencyData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyData_typeslazy.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyData_typeslazy.cs index 02439692fd..9221d0db29 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyData_typeslazy.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RemoteDependencyData_typeslazy.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class RemoteDependencyData { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestDataISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestDataISerializableWithWriter.cs index d394ac12ac..f2e470c153 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestDataISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestDataISerializableWithWriter.cs @@ -5,7 +5,7 @@ using Microsoft.ApplicationInsights.DataContracts; /// - /// Partial class to implement ISerializableWithWriter + /// Partial class to implement ISerializableWithWriter. /// internal partial class RequestData : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestData_typeslazy.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestData_typeslazy.cs index ccabb4c505..8081b1bc9d 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestData_typeslazy.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/RequestData_typeslazy.cs @@ -4,7 +4,7 @@ /// /// Partial class to declare measurements.( This is to be removed once - /// every telemetry type gets rid of internal Data classes) + /// every telemetry type gets rid of internal Data classes). /// internal partial class RequestData { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/StackFrameISerializableWithWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/StackFrameISerializableWithWriter.cs index 4e00b4e532..5fd364f88c 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/StackFrameISerializableWithWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/External/StackFrameISerializableWithWriter.cs @@ -3,7 +3,7 @@ using System; /// - /// Partial class to impelement ISerializableWithWriter + /// Partial class to impelement ISerializableWithWriter. /// internal partial class StackFrame : ISerializableWithWriter { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContextForCallContext.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContextForCallContext.cs index 8d2cacc92c..eb3d022d14 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContextForCallContext.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContextForCallContext.cs @@ -26,7 +26,7 @@ internal class OperationContextForCallContext /// /// Context that is propagated with HTTP outbound calls, check for null. - /// + /// . /// public IDictionary CorrelationContext; } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationHolder.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationHolder.cs index 3621a4b457..8f8e7a805f 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationHolder.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationHolder.cs @@ -3,7 +3,7 @@ using System; using System.Diagnostics; using System.Globalization; - using Extensibility.Implementation.Tracing; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; /// /// Operation class that holds the telemetry item and the corresponding telemetry client. @@ -30,18 +30,8 @@ internal class OperationHolder : IOperationHolder where T : OperationTelem /// Operation telemetry item that is assigned to the telemetry associated to the current operation item. public OperationHolder(TelemetryClient telemetryClient, T telemetry) { - if (telemetry == null) - { - throw new ArgumentNullException(nameof(telemetry)); - } - - if (telemetryClient == null) - { - throw new ArgumentNullException(nameof(telemetryClient)); - } - - this.telemetryClient = telemetryClient; - this.Telemetry = telemetry; + this.telemetryClient = telemetryClient ?? throw new ArgumentNullException(nameof(telemetryClient)); + this.Telemetry = telemetry ?? throw new ArgumentNullException(nameof(telemetry)); } /// diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationTelemetry.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationTelemetry.cs index dffd437aa5..ee31c6eac9 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationTelemetry.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationTelemetry.cs @@ -3,8 +3,9 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - using DataContracts; + using Microsoft.ApplicationInsights.Channel; + using Microsoft.ApplicationInsights.DataContracts; /// /// Base class for telemetry types representing duration in time. diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Property.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Property.cs index 38f8cd631d..8f80391b69 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Property.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Property.cs @@ -6,10 +6,8 @@ namespace Microsoft.ApplicationInsights.Extensibility.Implementation { using System; using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using External; - using Microsoft.ApplicationInsights.DataContracts; + + using Microsoft.ApplicationInsights.Extensibility.Implementation.External; /// /// A helper class for implementing properties of telemetry and context classes. @@ -52,7 +50,7 @@ internal static class Property { ContextTagKeys.Keys.CloudRoleInstance, 256 }, { ContextTagKeys.Keys.InternalSdkVersion, 64 }, { ContextTagKeys.Keys.InternalAgentVersion, 64 }, - { ContextTagKeys.Keys.InternalNodeName, 256 } + { ContextTagKeys.Keys.InternalNodeName, 256 }, }; public static void Set(ref T property, T value) where T : class diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.TelemetryHandler.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.TelemetryHandler.cs index 3ca3c52df1..12f1bc3262 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.TelemetryHandler.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/RichPayloadEventSource.TelemetryHandler.cs @@ -100,7 +100,7 @@ private Dictionary> CreateTelemetryHandlers(EventSource } /// - /// Create a handler for and + /// Create a handler for and . /// private Action CreateOperationStartStopHandler(EventSource eventSource) { @@ -158,7 +158,7 @@ private Action CreateOperationStartStopHandler( IKey = (string)null, Id = (string)null, Name = (string)null, - RootId = (string)null + RootId = (string)null, }.GetType()); return (item, opCode) => @@ -177,7 +177,7 @@ private Action CreateOperationStartStopHandler( break; default: - throw new ArgumentException(nameof(opCode)); + throw new ArgumentException($"Unexpected EventOpcode: {opCode}. Expected: Start or Stop.", nameof(opCode)); } var extendedData = new @@ -185,14 +185,14 @@ private Action CreateOperationStartStopHandler( IKey = item.Context.InstrumentationKey, Id = item.Id, Name = item.Name, - RootId = item.Context.Operation.Id + RootId = item.Context.Operation.Id, }; var parameters = new object[] { isRequest ? RequestTelemetry.TelemetryName : OperationTelemetry.TelemetryName, eventSourceOptionsObject, - extendedData + extendedData, }; writeMethod.Invoke(this.EventSourceInternal, parameters); @@ -200,7 +200,7 @@ private Action CreateOperationStartStopHandler( } /// - /// Create handler for unknown telemetry that accepts EventData, InstrumentationKey, tags, flags + /// Create handler for unknown telemetry that accepts EventData, InstrumentationKey, tags, flags. /// private Action, long> CreateHandlerForUnknownTelemetry(EventSource eventSource) { @@ -239,7 +239,7 @@ private Action, long> CreateHandl dummyEventData.ver, dummyEventData.name, dummyEventData.properties, - dummyEventData.measurements + dummyEventData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -258,7 +258,7 @@ private Action, long> CreateHandl data.ver, data.name, data.properties, - data.measurements + data.measurements, }, PartA_flags = flags, }; @@ -293,7 +293,7 @@ private Action CreateHandlerForRequestTelemetry(EventSource eventSou dummyRequestData.success, dummyRequestData.url, dummyRequestData.properties, - dummyRequestData.measurements + dummyRequestData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -331,7 +331,7 @@ private Action CreateHandlerForRequestTelemetry(EventSource eventSou data.success, data.url, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -361,7 +361,7 @@ private Action CreateHandlerForTraceTelemetry(EventSource eventSourc dummyMessageData.message, dummyMessageData.severityLevel, dummyMessageData.properties, - dummyMessageData.measurements + dummyMessageData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -385,7 +385,7 @@ private Action CreateHandlerForTraceTelemetry(EventSource eventSourc data.message, data.severityLevel, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -414,7 +414,7 @@ private Action CreateHandlerForEventTelemetry(EventSource eventSourc dummyEventData.ver, dummyEventData.name, dummyEventData.properties, - dummyEventData.measurements + dummyEventData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -437,7 +437,7 @@ private Action CreateHandlerForEventTelemetry(EventSource eventSourc data.ver, data.name, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -473,7 +473,7 @@ private Action CreateHandlerForDependencyTelemetry(EventSource event dummyDependencyData.target, dummyDependencyData.type, dummyDependencyData.properties, - dummyDependencyData.measurements + dummyDependencyData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -507,7 +507,7 @@ private Action CreateHandlerForDependencyTelemetry(EventSource event data.target, data.type, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -547,10 +547,10 @@ private Action CreateHandlerForMetricTelemetry(EventSource eventSour dummyDataPoint.count, dummyDataPoint.min, dummyDataPoint.max, - dummyDataPoint.stdDev - } + dummyDataPoint.stdDev, + }, }.AsEnumerable(), - dummyMetricData.properties + dummyMetricData.properties, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -580,9 +580,9 @@ private Action CreateHandlerForMetricTelemetry(EventSource eventSour i.count, i.min, i.max, - i.stdDev + i.stdDev, }), - data.properties + data.properties, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -631,10 +631,10 @@ private Action CreateHandlerForExceptionTelemetry(EventSource eventS dummyStackFrame.method, dummyStackFrame.assembly, dummyStackFrame.fileName, - dummyStackFrame.line - } - }.AsEnumerable() - } + dummyStackFrame.line, + }, + }.AsEnumerable(), + }, }.AsEnumerable(), dummyExceptionData.severityLevel, dummyExceptionData.problemId, @@ -674,13 +674,13 @@ private Action CreateHandlerForExceptionTelemetry(EventSource eventS j.method, j.assembly, j.fileName, - j.line + j.line, }), }), data.severityLevel, data.problemId, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -720,10 +720,10 @@ private Action CreateHandlerForPerformanceCounterTelemetry(EventSour dummyDataPoint.count, dummyDataPoint.min, dummyDataPoint.max, - dummyDataPoint.stdDev - } + dummyDataPoint.stdDev, + }, }.AsEnumerable(), - dummyMetricData.properties + dummyMetricData.properties, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -755,9 +755,9 @@ private Action CreateHandlerForPerformanceCounterTelemetry(EventSour i.count, i.min, i.max, - i.stdDev + i.stdDev, }), - data.properties + data.properties, }, PartA_flags = telemetryItem.Context.Flags, }; @@ -852,7 +852,7 @@ private Action CreateHandlerForPageViewPerformanceTelemetry(EventSou dummyPageViewPerfData.name, dummyPageViewPerfData.properties, dummyPageViewPerfData.measurements, - } + }, }.GetType()); return (item) => @@ -876,7 +876,7 @@ private Action CreateHandlerForPageViewPerformanceTelemetry(EventSou data.name, data.properties, data.measurements, - } + }, }; writeMethod.Invoke(eventSource, new object[] { PageViewTelemetry.TelemetryName, eventSourceOptions, extendedData }); @@ -903,7 +903,7 @@ private Action CreateHandlerForSessionStateTelemetry(EventSource eve dummyEventData.ver, dummyEventData.name, dummyEventData.properties, - dummyEventData.measurements + dummyEventData.measurements, }, PartA_flags = this.dummyPartAFlagsValue, }.GetType()); @@ -928,7 +928,7 @@ private Action CreateHandlerForSessionStateTelemetry(EventSource eve data.ver, data.name, data.properties, - data.measurements + data.measurements, }, PartA_flags = telemetryItem.Context.Flags, }; diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TaskTimerInternal.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TaskTimerInternal.cs index 07f2a671a8..c81022cafe 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TaskTimerInternal.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TaskTimerInternal.cs @@ -80,9 +80,9 @@ public void Start(Func elapsed) LogException(exception); } }, - CancellationToken.None, - TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, - TaskScheduler.Default); + CancellationToken.None, + TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, + TaskScheduler.Default); CancelAndDispose(Interlocked.Exchange(ref this.tokenSource, newTokenSource)); } diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Telemetry.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Telemetry.cs index 81b05df13f..9891311d73 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Telemetry.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Telemetry.cs @@ -85,7 +85,7 @@ internal static void CopyGlobalPropertiesIfExist(this ITelemetry telemetry, IDic } /// - /// Flattens Extension object on ITelemetry if exists into the properties and measurements + /// Flattens Extension object on ITelemetry if exists into the properties and measurements. /// internal static void FlattenIExtensionIfExists(this ITelemetry telemetry) { @@ -114,9 +114,9 @@ internal static void FlattenIExtensionIfExists(this ITelemetry telemetry) } /// - /// Flattens ITelemetry object into the properties and measurements + /// Flattens ITelemetry object into the properties and measurements. /// - /// EventData containing flattened ITelemetry object + /// EventData containing flattened ITelemetry object. internal static EventData FlattenTelemetryIntoEventData(this ITelemetry telemetry) { EventData flatTelemetry = new EventData(); diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TelemetryDebugWriter.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TelemetryDebugWriter.cs index 4494da733f..a211fbe45a 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TelemetryDebugWriter.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TelemetryDebugWriter.cs @@ -8,9 +8,10 @@ namespace Microsoft.ApplicationInsights.Extensibility.Implementation { using System; using System.Diagnostics; - using Channel; + + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; - using Platform; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Platform; /// /// Writes telemetry items to debug output. diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnoisticsEventThrottlingScheduler.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnoisticsEventThrottlingScheduler.cs index 6f6f476b6f..6ef70a09a2 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnoisticsEventThrottlingScheduler.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnoisticsEventThrottlingScheduler.cs @@ -6,7 +6,8 @@ using System.Globalization; using System.Linq; using System.Threading.Tasks; - using Implementation; + + using Microsoft.ApplicationInsights.Extensibility.Implementation; internal class DiagnoisticsEventThrottlingScheduler : IDiagnoisticsEventThrottlingScheduler, IDisposable @@ -94,7 +95,7 @@ private static TaskTimerInternal InternalCreateAndStartTimer( { var timer = new TaskTimerInternal { - Delay = TimeSpan.FromMilliseconds(intervalInMilliseconds) + Delay = TimeSpan.FromMilliseconds(intervalInMilliseconds), }; Func task = null; diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsEventListener.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsEventListener.cs index 04c5e44217..8d52eab174 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsEventListener.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsEventListener.cs @@ -43,13 +43,13 @@ protected override void OnEventWritten(EventWrittenEventArgs eventSourceEvent) Keywords = (long)eventSourceEvent.Keywords, MessageFormat = eventSourceEvent.Message, EventId = eventSourceEvent.EventId, - Level = eventSourceEvent.Level + Level = eventSourceEvent.Level, }; var traceEvent = new TraceEvent { MetaData = metadata, - Payload = eventSourceEvent.Payload?.ToArray() + Payload = eventSourceEvent.Payload?.ToArray(), }; this.listener.WriteEvent(traceEvent); diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsTelemetryModule.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsTelemetryModule.cs index 4545f575b8..56c7538c32 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsTelemetryModule.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/DiagnosticsTelemetryModule.cs @@ -182,14 +182,16 @@ public void Initialize(TelemetryConfiguration configuration) var queueSender = this.Senders.OfType().First(); queueSender.IsDisabled = true; this.Senders.Remove(queueSender); - + PortalDiagnosticsSender portalSender = new PortalDiagnosticsSender( configuration, new DiagnoisticsEventThrottlingManager( new DiagnoisticsEventThrottling(DiagnoisticsEventThrottlingDefaults.DefaultThrottleAfterCount), this.throttlingScheduler, - DiagnoisticsEventThrottlingDefaults.DefaultThrottlingRecycleIntervalInMinutes)); - portalSender.DiagnosticsInstrumentationKey = this.DiagnosticsInstrumentationKey; + DiagnoisticsEventThrottlingDefaults.DefaultThrottlingRecycleIntervalInMinutes)) + { + DiagnosticsInstrumentationKey = this.DiagnosticsInstrumentationKey, + }; this.Senders.Add(portalSender); @@ -217,9 +219,9 @@ public void Initialize(TelemetryConfiguration configuration) /// payload, including (but not limited to) the name of SDK-default items. /// /// - /// Name of the heartbeat value to add - /// Current value of the heartbeat value to add - /// Flag indicating whether or not the property represents a healthy value + /// Name of the heartbeat value to add. + /// Current value of the heartbeat value to add. + /// Flag indicating whether or not the property represents a healthy value. /// True if the new payload item is successfully added, false otherwise. public bool AddHeartbeatProperty(string propertyName, string propertyValue, bool isHealthy) { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/Extensions.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/Extensions.cs index 1f41117049..fbb859838d 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/Extensions.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/Extensions.cs @@ -23,7 +23,7 @@ public static string ToInvariantString(this Exception exception) { Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; #endif - return exception.ToString(); + return exception.ToString(); #if !NETSTANDARD1_3 } finally diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TransmissionProcessor.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TransmissionProcessor.cs index dfbd1878eb..582a6fa4b3 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TransmissionProcessor.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/TransmissionProcessor.cs @@ -1,8 +1,8 @@ namespace Microsoft.ApplicationInsights.Extensibility.Implementation { using System; + using Microsoft.ApplicationInsights.Channel; - using Platform; /// /// An that act as a proxy to the Transmission of telemetry"/>. @@ -19,12 +19,7 @@ internal class TransmissionProcessor : ITelemetryProcessor /// The holding to the telemetry channel to use for sending telemetry. internal TransmissionProcessor(TelemetrySink sink) { - if (sink == null) - { - throw new ArgumentNullException(nameof(sink)); - } - - this.sink = sink; + this.sink = sink ?? throw new ArgumentNullException(nameof(sink)); } /// diff --git a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/WeakConcurrentRandom.cs b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/WeakConcurrentRandom.cs index cdb3d6ff4c..54a98156d5 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/Implementation/WeakConcurrentRandom.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/Implementation/WeakConcurrentRandom.cs @@ -73,7 +73,7 @@ public WeakConcurrentRandom() public static WeakConcurrentRandom Instance { #if NET45 || NET46 - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [MethodImpl(MethodImplOptions.AggressiveInlining)] #endif get { diff --git a/src/Microsoft.ApplicationInsights/Extensibility/OperationCorrelationTelemetryInitializer.cs b/src/Microsoft.ApplicationInsights/Extensibility/OperationCorrelationTelemetryInitializer.cs index 9f26ee5587..877129cdce 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/OperationCorrelationTelemetryInitializer.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/OperationCorrelationTelemetryInitializer.cs @@ -1,10 +1,11 @@ namespace Microsoft.ApplicationInsights.Extensibility { using System.Diagnostics; - using Implementation; + using Microsoft.ApplicationInsights; using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.DataContracts; + using Microsoft.ApplicationInsights.Extensibility.Implementation; #if NET45 /// diff --git a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CActivityExtensions.cs b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CActivityExtensions.cs index bc151b440c..0970ba1781 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CActivityExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CActivityExtensions.cs @@ -189,7 +189,7 @@ public static void SetTracestate(this Activity activity, string value) => /// /// Gets TraceId from the Activity. - /// Use carefully: if may cause iteration over all tags! + /// Use carefully: if may cause iteration over all tags!. /// /// Activity to get traceId from. /// TraceId value or null if it does not exist. @@ -198,7 +198,7 @@ public static void SetTracestate(this Activity activity, string value) => /// /// Gets SpanId from the Activity. - /// Use carefully: if may cause iteration over all tags! + /// Use carefully: if may cause iteration over all tags!. /// /// Activity to get spanId from. /// SpanId value or null if it does not exist. @@ -207,7 +207,7 @@ public static void SetTracestate(this Activity activity, string value) => /// /// Gets ParentSpanId from the Activity. - /// Use carefully: if may cause iteration over all tags! + /// Use carefully: if may cause iteration over all tags!. /// /// Activity to get ParentSpanId from. /// ParentSpanId value or null if it does not exist. diff --git a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CConstants.cs b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CConstants.cs index 2496784964..2a1dacb799 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CConstants.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CConstants.cs @@ -41,17 +41,17 @@ internal static class W3CConstants internal const string DefaultVersion = "00"; /// - /// Default sampled flag value: may be recorded, not requested + /// Default sampled flag value: may be recorded, not requested. /// internal const string TraceFlagRecordedAndNotRequested = "02"; /// - /// Recorded and requested sampled flag value + /// Recorded and requested sampled flag value. /// internal const string TraceFlagRecordedAndRequested = "03"; /// - /// Requested trace flag + /// Requested trace flag. /// internal const byte RequestedTraceFlag = 1; diff --git a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CUtilities.cs b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CUtilities.cs index a8f07f510b..0252b3420f 100644 --- a/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CUtilities.cs +++ b/src/Microsoft.ApplicationInsights/Extensibility/W3C/W3CUtilities.cs @@ -14,9 +14,9 @@ public static class W3CUtilities /// /// Generates random trace Id as per W3C Distributed tracing specification. - /// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#trace-id + /// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#trace-id . /// - /// Random 16 bytes array encoded as hex string + /// Random 16 bytes array encoded as hex string. [EditorBrowsable(EditorBrowsableState.Never)] public static string GenerateTraceId() { @@ -25,9 +25,9 @@ public static string GenerateTraceId() /// /// Generates random span Id as per W3C Distributed tracing specification. - /// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#span-id + /// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#span-id . /// - /// Random 8 bytes array encoded as hex string + /// Random 8 bytes array encoded as hex string. [EditorBrowsable(EditorBrowsableState.Never)] internal static string GenerateSpanId() { @@ -37,7 +37,7 @@ internal static string GenerateSpanId() /// /// Converts byte array to hex lower case string. /// - /// Array encoded as hex string + /// Array encoded as hex string. private static string GenerateId(byte[] bytes, int start, int length) { // See https://stackoverflow.com/questions/311165/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-and-vice-versa/24343727#24343727 diff --git a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs index 48ec2d10a7..1bbbb70df2 100644 --- a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs +++ b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs @@ -15,7 +15,7 @@ internal class BaseDefaultHeartbeatPropertyProvider : IHeartbeatDefaultPayloadPr "runtimeFramework", "baseSdkTargetFramework", "osType", - "processSessionId" + "processSessionId", }; /// @@ -81,7 +81,7 @@ public Task SetDefaultPayload(IEnumerable disabledFields, IHeartbe /// This will return the current running .NET framework version, based on the version of the assembly that owns /// the 'Object' type. The version number returned can be used to infer other things such as .NET Core / Standard. /// - /// a string representing the version of the current .NET framework + /// a string representing the version of the current .NET framework. private static string GetRuntimeFrameworkVer() { #if NET45 || NET46 @@ -102,7 +102,7 @@ private static string GetRuntimeFrameworkVer() /// /// Returns the current target framework that the assembly was built against. /// - /// standard string representing the target framework + /// standard string representing the target framework. private static string GetBaseSdkTargetFramework() { #if NET45 @@ -162,7 +162,7 @@ private static string GetRuntimeOsType() /// Return a unique process session identifier that will only be set once in the lifetime of a /// single executable session. /// - /// string representation of a unique id + /// string representation of a unique id. private static string GetProcessSessionId() { if (BaseDefaultHeartbeatPropertyProvider.uniqueProcessSessionId == null) diff --git a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatDefaultPayload.cs b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatDefaultPayload.cs index 1758c062b1..9e7ee7b69e 100644 --- a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatDefaultPayload.cs +++ b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatDefaultPayload.cs @@ -9,7 +9,7 @@ internal static class HeartbeatDefaultPayload { internal static readonly IHeartbeatDefaultPayloadProvider[] DefaultPayloadProviders = { - new BaseDefaultHeartbeatPropertyProvider() + new BaseDefaultHeartbeatPropertyProvider(), }; public static bool IsDefaultKeyword(string keyword) diff --git a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatPropertyPayload.cs b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatPropertyPayload.cs index 43837d8e3c..643d8a0786 100644 --- a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatPropertyPayload.cs +++ b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatPropertyPayload.cs @@ -10,7 +10,7 @@ internal class HeartbeatPropertyPayload private bool isHealthy = true; // is this a healthy value or not /// - /// Gets or sets the payload value at the time the property item was added, as a string + /// Gets or sets the payload value at the time the property item was added, as a string. /// public string PayloadValue { @@ -27,7 +27,7 @@ public string PayloadValue } /// - /// Gets or sets a value indicating whether this property is currently in a healthy or unhealthy state + /// Gets or sets a value indicating whether this property is currently in a healthy or unhealthy state. /// public bool IsHealthy { @@ -40,7 +40,7 @@ public bool IsHealthy } /// - /// Gets or sets a value indicating whether this property payload has been updated since the last time it was delivered in a heartbeat + /// Gets or sets a value indicating whether this property payload has been updated since the last time it was delivered in a heartbeat. /// public bool IsUpdated { get; set; } } diff --git a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatProvider.cs b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatProvider.cs index fd63d75155..e717e65673 100644 --- a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatProvider.cs +++ b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/HeartbeatProvider.cs @@ -71,7 +71,7 @@ public HeartbeatProvider() } /// - /// Gets or sets the currently defined interval between heartbeats + /// Gets or sets the currently defined interval between heartbeats. /// public TimeSpan HeartbeatInterval { @@ -112,7 +112,7 @@ public string InstrumentationKey } /// - /// Gets or sets a value indicating whether or not heartbeats are enabled + /// Gets or sets a value indicating whether or not heartbeats are enabled. /// public bool IsHeartbeatEnabled { @@ -197,7 +197,7 @@ public bool AddHeartbeatProperty(string propertyName, bool overrideDefaultField, return new HeartbeatPropertyPayload() { IsHealthy = isHealthy, - PayloadValue = propertyValue + PayloadValue = propertyValue, }; }); } @@ -232,6 +232,7 @@ public bool SetHeartbeatProperty(string propertyName, bool overrideDefaultField, { property.IsHealthy = isHealthy.Value; } + if (propertyValue != null) { property.PayloadValue = propertyValue; diff --git a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/IHeartbeatDefaultPayloadProvider.cs b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/IHeartbeatDefaultPayloadProvider.cs index a5fb6dfab0..c18f4f2ef9 100644 --- a/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/IHeartbeatDefaultPayloadProvider.cs +++ b/src/Microsoft.ApplicationInsights/Managed/Shared/Extensibility/Implementation/Tracing/IHeartbeatDefaultPayloadProvider.cs @@ -20,8 +20,8 @@ internal interface IHeartbeatDefaultPayloadProvider /// heartbeat payload. This is primarly used to dissallow users from adding or setting a conflicting /// property into the heartbeat. /// - /// string to test against supplied property names - /// True if the given keyword conflicts with this default payload provider's properties + /// string to test against supplied property names. + /// True if the given keyword conflicts with this default payload provider's properties. bool IsKeyword(string keyword); /// diff --git a/src/Microsoft.ApplicationInsights/Metric.cs b/src/Microsoft.ApplicationInsights/Metric.cs index 5740355abe..6676837afe 100644 --- a/src/Microsoft.ApplicationInsights/Metric.cs +++ b/src/Microsoft.ApplicationInsights/Metric.cs @@ -110,8 +110,10 @@ public IReadOnlyList> GetAllSeries() return this.zeroDimSeriesList; } - var series = new List>(this.SeriesCount); - series.Add(new KeyValuePair(new string[0], this.zeroDimSeries)); + var series = new List>(this.SeriesCount) + { + new KeyValuePair(new string[0], this.zeroDimSeries), + }; this.metricSeries.GetAllPoints(series); return series; } @@ -121,7 +123,7 @@ public IReadOnlyList> GetAllSeries() /// This overload gets the zero-dimensional MetricSeries associated with this metric. /// Every metric, regardless of its dimensionality, has such a zero-dimensional MetricSeries. /// - /// Will be set to the zero-dimensional MetricSeries associated with this metric + /// Will be set to the zero-dimensional MetricSeries associated with this metric. /// True. public bool TryGetDataSeries(out MetricSeries series) { diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/AggregationPeriodSummary.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/AggregationPeriodSummary.cs index 493ccb0ce9..9904c962fd 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/AggregationPeriodSummary.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/AggregationPeriodSummary.cs @@ -3,23 +3,23 @@ using System; using System.Collections.Generic; - /// @ToDo: Complete documentation before stable release. {390} + /// @ToDo: Complete documentation before stable release. {390}. /// @PublicExposureCandidate internal class AggregationPeriodSummary { - /// @ToDo: Complete documentation before stable release. {487} - /// @ToDo: Complete documentation before stable release. {672} - /// @ToDo: Complete documentation before stable release. {290} + /// @ToDo: Complete documentation before stable release. {487}. + /// @ToDo: Complete documentation before stable release. {672}. + /// @ToDo: Complete documentation before stable release. {290}. public AggregationPeriodSummary(IReadOnlyList persistentAggregates, IReadOnlyList nonpersistentAggregates) { this.PersistentAggregates = persistentAggregates; this.NonpersistentAggregates = nonpersistentAggregates; } - /// Gets @ToDo: Complete documentation before stable release. {315} + /// Gets @ToDo: Complete documentation before stable release. {315}. public IReadOnlyList PersistentAggregates { get; } - /// Gets @ToDo: Complete documentation before stable release. {776} + /// Gets @ToDo: Complete documentation before stable release. {776}. public IReadOnlyList NonpersistentAggregates { get; } } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/ApplicationInsightsTelemetryPipeline.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/ApplicationInsightsTelemetryPipeline.cs index a9491e007d..d41de6d673 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/ApplicationInsightsTelemetryPipeline.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/ApplicationInsightsTelemetryPipeline.cs @@ -6,15 +6,15 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {628} + /// @ToDo: Complete documentation before stable release. {628}. /// @PublicExposureCandidate internal class ApplicationInsightsTelemetryPipeline : IMetricTelemetryPipeline { private readonly ApplicationInsights.TelemetryClient trackingClient; private readonly Task completedTask = Task.FromResult(true); - /// @ToDo: Complete documentation before stable release. {763} - /// @ToDo: Complete documentation before stable release. {887} + /// @ToDo: Complete documentation before stable release. {763}. + /// @ToDo: Complete documentation before stable release. {887}. public ApplicationInsightsTelemetryPipeline(ApplicationInsights.Extensibility.TelemetryConfiguration telemetryPipeline) { Util.ValidateNotNull(telemetryPipeline, nameof(telemetryPipeline)); @@ -22,8 +22,8 @@ public ApplicationInsightsTelemetryPipeline(ApplicationInsights.Extensibility.Te this.trackingClient = new ApplicationInsights.TelemetryClient(telemetryPipeline); } - /// @ToDo: Complete documentation before stable release. {253} - /// @ToDo: Complete documentation before stable release. {017} + /// @ToDo: Complete documentation before stable release. {253}. + /// @ToDo: Complete documentation before stable release. {017}. public ApplicationInsightsTelemetryPipeline(ApplicationInsights.TelemetryClient telemetryClient) { Util.ValidateNotNull(telemetryClient, nameof(telemetryClient)); @@ -31,10 +31,10 @@ public ApplicationInsightsTelemetryPipeline(ApplicationInsights.TelemetryClient this.trackingClient = telemetryClient; } - /// @ToDo: Complete documentation before stable release. {017} - /// @ToDo: Complete documentation before stable release. {043} - /// @ToDo: Complete documentation before stable release. {921} - /// @ToDo: Complete documentation before stable release. {373} + /// @ToDo: Complete documentation before stable release. {017}. + /// @ToDo: Complete documentation before stable release. {043}. + /// @ToDo: Complete documentation before stable release. {921}. + /// @ToDo: Complete documentation before stable release. {373}. public Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancelToken) { Util.ValidateNotNull(metricAggregate, nameof(metricAggregate)); @@ -63,9 +63,9 @@ public Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancel return this.completedTask; } - /// @ToDo: Complete documentation before stable release. {935} - /// @ToDo: Complete documentation before stable release. {490} - /// @ToDo: Complete documentation before stable release. {817} + /// @ToDo: Complete documentation before stable release. {935}. + /// @ToDo: Complete documentation before stable release. {490}. + /// @ToDo: Complete documentation before stable release. {817}. public Task FlushAsync(CancellationToken cancelToken) { cancelToken.ThrowIfCancellationRequested(); diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricAggregateToTelemetryPipelineConverter.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricAggregateToTelemetryPipelineConverter.cs index 08cce5c8a9..25f79e751f 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricAggregateToTelemetryPipelineConverter.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricAggregateToTelemetryPipelineConverter.cs @@ -2,13 +2,13 @@ { using System; - /// @ToDo: Complete documentation before stable release. {397} + /// @ToDo: Complete documentation before stable release. {397}. /// @PublicExposureCandidate internal interface IMetricAggregateToTelemetryPipelineConverter { - /// @ToDo: Complete documentation before stable release. {360} - /// @ToDo: Complete documentation before stable release. {116} - /// @ToDo: Complete documentation before stable release. {685} + /// @ToDo: Complete documentation before stable release. {360}. + /// @ToDo: Complete documentation before stable release. {116}. + /// @ToDo: Complete documentation before stable release. {685}. object Convert(MetricAggregate aggregate); } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesAggregator.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesAggregator.cs index e226547ccb..db23d6ca85 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesAggregator.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesAggregator.cs @@ -2,42 +2,42 @@ { using System; - /// @ToDo: Complete documentation before stable release. {558} + /// @ToDo: Complete documentation before stable release. {558}. public interface IMetricSeriesAggregator { - /// Gets @ToDo: Complete documentation before stable release. {969} + /// Gets @ToDo: Complete documentation before stable release. {969}. MetricSeries DataSeries { get; } - /// @ToDo: Complete documentation before stable release. {792} - /// @ToDo: Complete documentation before stable release. {235} + /// @ToDo: Complete documentation before stable release. {792}. + /// @ToDo: Complete documentation before stable release. {235}. bool TryRecycle(); - /// @ToDo: Complete documentation before stable release. {246} - /// @ToDo: Complete documentation before stable release. {781} - /// @ToDo: Complete documentation before stable release. {567} + /// @ToDo: Complete documentation before stable release. {246}. + /// @ToDo: Complete documentation before stable release. {781}. + /// @ToDo: Complete documentation before stable release. {567}. /// @PublicExposureCandidate void Reset(DateTimeOffset periodStart, IMetricValueFilter valueFilter); - /// @ToDo: Complete documentation before stable release. {734} - /// @ToDo: Complete documentation before stable release. {299} + /// @ToDo: Complete documentation before stable release. {734}. + /// @ToDo: Complete documentation before stable release. {299}. void Reset(DateTimeOffset periodStart); - /// @ToDo: Complete documentation before stable release. {099} - /// @ToDo: Complete documentation before stable release. {193} - /// @ToDo: Complete documentation before stable release. {573} + /// @ToDo: Complete documentation before stable release. {099}. + /// @ToDo: Complete documentation before stable release. {193}. + /// @ToDo: Complete documentation before stable release. {573}. MetricAggregate CompleteAggregation(DateTimeOffset periodEnd); - /// @ToDo: Complete documentation before stable release. {221} - /// @ToDo: Complete documentation before stable release. {203} - /// @ToDo: Complete documentation before stable release. {615} + /// @ToDo: Complete documentation before stable release. {221}. + /// @ToDo: Complete documentation before stable release. {203}. + /// @ToDo: Complete documentation before stable release. {615}. MetricAggregate CreateAggregateUnsafe(DateTimeOffset periodEnd); - /// @ToDo: Complete documentation before stable release. {574} - /// @ToDo: Complete documentation before stable release. {887} + /// @ToDo: Complete documentation before stable release. {574}. + /// @ToDo: Complete documentation before stable release. {887}. void TrackValue(double metricValue); - /// @ToDo: Complete documentation before stable release. {206} - /// @ToDo: Complete documentation before stable release. {266} + /// @ToDo: Complete documentation before stable release. {206}. + /// @ToDo: Complete documentation before stable release. {266}. void TrackValue(object metricValue); } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesFilter.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesFilter.cs index 3425b19aa8..8c1ac7762b 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesFilter.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricSeriesFilter.cs @@ -2,14 +2,14 @@ { using System; - /// @ToDo: Complete documentation before stable release. {339} + /// @ToDo: Complete documentation before stable release. {339}. /// @PublicExposureCandidate internal interface IMetricSeriesFilter { - /// @ToDo: Complete documentation before stable release. {600} - /// @ToDo: Complete documentation before stable release. {025} - /// @ToDo: Complete documentation before stable release. {050} - /// @ToDo: Complete documentation before stable release. {100} + /// @ToDo: Complete documentation before stable release. {600}. + /// @ToDo: Complete documentation before stable release. {025}. + /// @ToDo: Complete documentation before stable release. {050}. + /// @ToDo: Complete documentation before stable release. {100}. bool WillConsume(MetricSeries dataSeries, out IMetricValueFilter valueFilter); } } \ No newline at end of file diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricTelemetryPipeline.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricTelemetryPipeline.cs index f103355021..96b90d1a9f 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricTelemetryPipeline.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricTelemetryPipeline.cs @@ -19,12 +19,12 @@ public interface IMetricTelemetryPipeline /// The runtime class of the specified metricAggregate does not match the /// telemetry destination type represented by this instance of IMetricTelemetryPipeline. /// The specified cancelToken has had cancellation requested. - /// @ToDo: Complete documentation before stable release. {034} + /// @ToDo: Complete documentation before stable release. {034}. Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancelToken); - /// @ToDo: Complete documentation before stable release. {453} - /// @ToDo: Complete documentation before stable release. {697} - /// @ToDo: Complete documentation before stable release. {934} + /// @ToDo: Complete documentation before stable release. {453}. + /// @ToDo: Complete documentation before stable release. {697}. + /// @ToDo: Complete documentation before stable release. {934}. Task FlushAsync(CancellationToken cancelToken); } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricValueFilter.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricValueFilter.cs index 29181ab239..dfbd5a91d2 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricValueFilter.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/IMetricValueFilter.cs @@ -1,18 +1,18 @@ namespace Microsoft.ApplicationInsights.Metrics.Extensibility { - /// @ToDo: Complete documentation before stable release. {265} + /// @ToDo: Complete documentation before stable release. {265}. public interface IMetricValueFilter { - /// @ToDo: Complete documentation before stable release. {919} - /// @ToDo: Complete documentation before stable release. {526} - /// @ToDo: Complete documentation before stable release. {095} - /// @ToDo: Complete documentation before stable release. {464} + /// @ToDo: Complete documentation before stable release. {919}. + /// @ToDo: Complete documentation before stable release. {526}. + /// @ToDo: Complete documentation before stable release. {095}. + /// @ToDo: Complete documentation before stable release. {464}. bool WillConsume(MetricSeries dataSeries, double metricValue); - /// @ToDo: Complete documentation before stable release. {704} - /// @ToDo: Complete documentation before stable release. {929} - /// @ToDo: Complete documentation before stable release. {703} - /// @ToDo: Complete documentation before stable release. {497} + /// @ToDo: Complete documentation before stable release. {704}. + /// @ToDo: Complete documentation before stable release. {929}. + /// @ToDo: Complete documentation before stable release. {703}. + /// @ToDo: Complete documentation before stable release. {497}. bool WillConsume(MetricSeries dataSeries, object metricValue); } } \ No newline at end of file diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MemoryMetricTelemetryPipeline.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MemoryMetricTelemetryPipeline.cs index c8590aa72c..ae828b5444 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MemoryMetricTelemetryPipeline.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MemoryMetricTelemetryPipeline.cs @@ -6,12 +6,12 @@ using System.Threading; using System.Threading.Tasks; - /// @ToDo: Complete documentation before stable release. {079} + /// @ToDo: Complete documentation before stable release. {079}. /// @PublicExposureCandidate [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001: Types that own disposable fields should be disposable", Justification = "OK not to explicitly dispose a released SemaphoreSlim.")] internal class MemoryMetricTelemetryPipeline : IMetricTelemetryPipeline, IReadOnlyList { - /// @ToDo: Complete documentation before stable release. {529} + /// @ToDo: Complete documentation before stable release. {529}. public const int CountLimitDefault = 1000; // private readonly Task completedTask = Task.FromResult(true); @@ -19,14 +19,14 @@ internal class MemoryMetricTelemetryPipeline : IMetricTelemetryPipeline, IReadOn private readonly IList metricAgregates = new List(); - /// @ToDo: Complete documentation before stable release. {846} + /// @ToDo: Complete documentation before stable release. {846}. public MemoryMetricTelemetryPipeline() : this(CountLimitDefault) { } - /// @ToDo: Complete documentation before stable release. {195} - /// @ToDo: Complete documentation before stable release. {153} + /// @ToDo: Complete documentation before stable release. {195}. + /// @ToDo: Complete documentation before stable release. {153}. public MemoryMetricTelemetryPipeline(int countLimit) { if (countLimit <= 0) @@ -37,10 +37,10 @@ public MemoryMetricTelemetryPipeline(int countLimit) this.CountLimit = countLimit; } - /// Gets @ToDo: Complete documentation before stable release. {953} + /// Gets @ToDo: Complete documentation before stable release. {953}. public int CountLimit { get; } - /// Gets @ToDo: Complete documentation before stable release. {917} + /// Gets @ToDo: Complete documentation before stable release. {917}. public int Count { get @@ -60,9 +60,9 @@ public int Count } } - /// @ToDo: Complete documentation before stable release. {823} - /// @ToDo: Complete documentation before stable release. {470} - /// @ToDo: Complete documentation before stable release. {699} + /// @ToDo: Complete documentation before stable release. {823}. + /// @ToDo: Complete documentation before stable release. {470}. + /// @ToDo: Complete documentation before stable release. {699}. public MetricAggregate this[int index] { get @@ -82,7 +82,7 @@ public MetricAggregate this[int index] } } - /// @ToDo: Complete documentation before stable release. {169} + /// @ToDo: Complete documentation before stable release. {169}. public void Clear() { this.updateLock.WaitAsync().GetAwaiter().GetResult(); @@ -96,10 +96,10 @@ public void Clear() } } - /// @ToDo: Complete documentation before stable release. {319} - /// @ToDo: Complete documentation before stable release. {915} - /// @ToDo: Complete documentation before stable release. {929} - /// @ToDo: Complete documentation before stable release. {190} + /// @ToDo: Complete documentation before stable release. {319}. + /// @ToDo: Complete documentation before stable release. {915}. + /// @ToDo: Complete documentation before stable release. {929}. + /// @ToDo: Complete documentation before stable release. {190}. public async Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancelToken) { Util.ValidateNotNull(metricAggregate, nameof(metricAggregate)); @@ -120,9 +120,9 @@ public async Task TrackAsync(MetricAggregate metricAggregate, CancellationToken } } - /// @ToDo: Complete documentation before stable release. {094} - /// @ToDo: Complete documentation before stable release. {776} - /// @ToDo: Complete documentation before stable release. {084} + /// @ToDo: Complete documentation before stable release. {094}. + /// @ToDo: Complete documentation before stable release. {776}. + /// @ToDo: Complete documentation before stable release. {084}. public Task FlushAsync(CancellationToken cancelToken) { return Task.FromResult(true); diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToApplicationInsightsPipelineConverterBase.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToApplicationInsightsPipelineConverterBase.cs index 9188dd2bea..202bddb320 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToApplicationInsightsPipelineConverterBase.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToApplicationInsightsPipelineConverterBase.cs @@ -7,19 +7,19 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {533} + /// @ToDo: Complete documentation before stable release. {533}. /// @PublicExposureCandidate internal abstract class MetricAggregateToApplicationInsightsPipelineConverterBase : IMetricAggregateToTelemetryPipelineConverter { - /// @ToDo: Complete documentation before stable release. {918} + /// @ToDo: Complete documentation before stable release. {918}. public const string AggregationIntervalMonikerPropertyKey = "_MS.AggregationIntervalMs"; - /// Gets @ToDo: Complete documentation before stable release. {692}s + /// Gets @ToDo: Complete documentation before stable release. {692}.s public abstract string AggregationKindMoniker { get; } - /// @ToDo: Complete documentation before stable release. {200} - /// @ToDo: Complete documentation before stable release. {793} - /// @ToDo: Complete documentation before stable release. {084} + /// @ToDo: Complete documentation before stable release. {200}. + /// @ToDo: Complete documentation before stable release. {793}. + /// @ToDo: Complete documentation before stable release. {084}. public object Convert(MetricAggregate aggregate) { this.ValidateAggregate(aggregate); @@ -28,9 +28,9 @@ public object Convert(MetricAggregate aggregate) return telemetryItem; } - /// @ToDo: Complete documentation before stable release. {632} - /// @ToDo: Complete documentation before stable release. {469} - /// @ToDo: Complete documentation before stable release. {380} + /// @ToDo: Complete documentation before stable release. {632}. + /// @ToDo: Complete documentation before stable release. {469}. + /// @ToDo: Complete documentation before stable release. {380}. protected abstract void PopulateDataValues(MetricTelemetry telemetryItem, MetricAggregate aggregate); private static void PopulateTelemetryContext( diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToTelemetryPipelineConverters.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToTelemetryPipelineConverters.cs index 5154103328..9c6ed3ac85 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToTelemetryPipelineConverters.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregateToTelemetryPipelineConverters.cs @@ -3,20 +3,20 @@ using System; using System.Collections.Concurrent; - /// @ToDo: Complete documentation before stable release. {573} + /// @ToDo: Complete documentation before stable release. {573}. /// @PublicExposureCandidate internal sealed class MetricAggregateToTelemetryPipelineConverters { - /// @ToDo: Complete documentation before stable release. {097} + /// @ToDo: Complete documentation before stable release. {097}. public static readonly MetricAggregateToTelemetryPipelineConverters Registry = new MetricAggregateToTelemetryPipelineConverters(); private ConcurrentDictionary> pipelineTable = new ConcurrentDictionary>(); - /// @ToDo: Complete documentation before stable release. {109} - /// @ToDo: Complete documentation before stable release. {517} - /// @ToDo: Complete documentation before stable release. {274} - /// @ToDo: Complete documentation before stable release. {912} + /// @ToDo: Complete documentation before stable release. {109}. + /// @ToDo: Complete documentation before stable release. {517}. + /// @ToDo: Complete documentation before stable release. {274}. + /// @ToDo: Complete documentation before stable release. {912}. public void Add(Type pipelineType, string aggregationKindMoniker, IMetricAggregateToTelemetryPipelineConverter converter) { ValidateKeys(pipelineType, aggregationKindMoniker); @@ -29,11 +29,11 @@ public void Add(Type pipelineType, string aggregationKindMoniker, IMetricAggrega converters[aggregationKindMoniker] = converter; } - /// @ToDo: Complete documentation before stable release. {076} - /// @ToDo: Complete documentation before stable release. {807} - /// @ToDo: Complete documentation before stable release. {677} - /// @ToDo: Complete documentation before stable release. {420} - /// @ToDo: Complete documentation before stable release. {143} + /// @ToDo: Complete documentation before stable release. {076}. + /// @ToDo: Complete documentation before stable release. {807}. + /// @ToDo: Complete documentation before stable release. {677}. + /// @ToDo: Complete documentation before stable release. {420}. + /// @ToDo: Complete documentation before stable release. {143}. public bool TryGet(Type pipelineType, string aggregationKindMoniker, out IMetricAggregateToTelemetryPipelineConverter converter) { ValidateKeys(pipelineType, aggregationKindMoniker); diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregationCycleKind.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregationCycleKind.cs index 1dca40ceef..b5b399a33d 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregationCycleKind.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricAggregationCycleKind.cs @@ -2,7 +2,7 @@ { using System; - /// @ToDo: Complete documentation before stable release. {447} + /// @ToDo: Complete documentation before stable release. {447}. public enum MetricAggregationCycleKind : Int32 { /// @@ -18,6 +18,6 @@ public enum MetricAggregationCycleKind : Int32 /// /// The custom aggregation cycle. /// - Custom + Custom, } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricConfigurationExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricConfigurationExtensions.cs index 4f07d68439..8ba5eae262 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricConfigurationExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricConfigurationExtensions.cs @@ -12,10 +12,10 @@ public static class MetricConfigurationExtensions { /// /// Groups constants used my metric aggregates produced by aggregators that are configured by metric configurations represented - /// through instances of . See also MetricConfigurations.Common.Measurement()./> + /// through instances of . See also MetricConfigurations.Common.Measurement()./>. /// - /// @ToDo: Complete documentation before stable release. {071} - /// @ToDo: Complete documentation before stable release. {132} + /// @ToDo: Complete documentation before stable release. {071}. + /// @ToDo: Complete documentation before stable release. {132}. public static MetricSeriesConfigurationForMeasurement.AggregateKindConstants Constants(this MetricSeriesConfigurationForMeasurement measurementConfig) { return MetricSeriesConfigurationForMeasurement.AggregateKindConstants.Instance; @@ -23,10 +23,10 @@ public static MetricSeriesConfigurationForMeasurement.AggregateKindConstants Con /// /// Groups constants used my metric aggregates produced by aggregators that are configured by metric configurations represented - /// through instances of . See also MetricConfigurations.Common.Measurement()./> + /// through instances of . See also MetricConfigurations.Common.Measurement()./>. /// - /// @ToDo: Complete documentation before stable release. {276} - /// @ToDo: Complete documentation before stable release. {564} + /// @ToDo: Complete documentation before stable release. {276}. + /// @ToDo: Complete documentation before stable release. {564}. public static MetricSeriesConfigurationForMeasurement.AggregateKindConstants Constants(this MetricConfigurationForMeasurement measurementConfig) { return MetricSeriesConfigurationForMeasurement.AggregateKindConstants.Instance; diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricExtensions.cs index 6e25070a37..dd393f84ee 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricExtensions.cs @@ -11,8 +11,8 @@ public static class MetricExtensions /// /// Exposes the Configuration property for users who imported the Microsoft.ApplicationInsights.Metrics.Extensibility namespace. /// - /// @ToDo: Complete documentation before stable release. {753} - /// @ToDo: Complete documentation before stable release. {527} + /// @ToDo: Complete documentation before stable release. {753}. + /// @ToDo: Complete documentation before stable release. {527}. public static MetricConfiguration GetConfiguration(this Metric metric) { return metric.configuration; @@ -21,8 +21,8 @@ public static MetricConfiguration GetConfiguration(this Metric metric) ///// ///// Exposes the MetricManager property for users who imported the Microsoft.ApplicationInsights.Metrics.Extensibility namespace. ///// - ///// @ToDo: Complete documentation before stable release. {615} - ///// @ToDo: Complete documentation before stable release. {349} + ///// @ToDo: Complete documentation before stable release. {615}. + ///// @ToDo: Complete documentation before stable release. {349}. ////public static MetricManager GetMetricManager(this Metric metric) ////{ //// return metric._metricManager; diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricManagerExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricManagerExtensions.cs index a6d2e376e8..565b8bfbb5 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricManagerExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricManagerExtensions.cs @@ -10,11 +10,11 @@ /// @PublicExposureCandidate internal static class MetricManagerExtensions { - /// @ToDo: Complete documentation before stable release. {989} - /// @ToDo: Complete documentation before stable release. {335} - /// @ToDo: Complete documentation before stable release. {001} - /// @ToDo: Complete documentation before stable release. {687} - /// @ToDo: Complete documentation before stable release. {620} + /// @ToDo: Complete documentation before stable release. {989}. + /// @ToDo: Complete documentation before stable release. {335}. + /// @ToDo: Complete documentation before stable release. {001}. + /// @ToDo: Complete documentation before stable release. {687}. + /// @ToDo: Complete documentation before stable release. {620}. public static AggregationPeriodSummary StopAggregators( this MetricManager metricManager, MetricAggregationCycleKind aggregationCycleKind, @@ -24,12 +24,12 @@ public static AggregationPeriodSummary StopAggregators( return metricManager.AggregationManager.StopAggregators(aggregationCycleKind, tactTimestamp); } - /// @ToDo: Complete documentation before stable release. {396} - /// @ToDo: Complete documentation before stable release. {784} - /// @ToDo: Complete documentation before stable release. {805} - /// @ToDo: Complete documentation before stable release. {879} - /// @ToDo: Complete documentation before stable release. {735} - /// @ToDo: Complete documentation before stable release. {762} + /// @ToDo: Complete documentation before stable release. {396}. + /// @ToDo: Complete documentation before stable release. {784}. + /// @ToDo: Complete documentation before stable release. {805}. + /// @ToDo: Complete documentation before stable release. {879}. + /// @ToDo: Complete documentation before stable release. {735}. + /// @ToDo: Complete documentation before stable release. {762}. public static AggregationPeriodSummary StartOrCycleAggregators( this MetricManager metricManager, MetricAggregationCycleKind aggregationCycleKind, @@ -52,7 +52,7 @@ public static AggregationPeriodSummary StartOrCycleAggregators( /// the next iteration. However, the background thread will not send any aggregated metrics if it has been notified to stop. /// Therefore, this method flushes current data before sending the notification. /// - /// The metric manager + /// The metric manager. /// /// You can await the returned Task if you want to be sure that the encapsulated thread completed. /// If you just want to notify the thread to stop without waiting for it, do not await this method. diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesAggregatorBase.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesAggregatorBase.cs index 55da60eec9..ec666ee664 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesAggregatorBase.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesAggregatorBase.cs @@ -7,7 +7,7 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {562} + /// @ToDo: Complete documentation before stable release. {562}. /// The actual type of the metric values. For most common metrics it's double. /// However, for example a metric collecting strings to dount the number of distinct entities might have string. /// @PublicExposureCandidate @@ -24,11 +24,11 @@ internal abstract class MetricSeriesAggregatorBase : IMetricSeri private volatile MetricValuesBufferBase metricValuesBuffer; private volatile MetricValuesBufferBase metricValuesBufferRecycle = null; - /// @ToDo: Complete documentation before stable release. {683} - /// @ToDo: Complete documentation before stable release. {573} - /// @ToDo: Complete documentation before stable release. {343} - /// @ToDo: Complete documentation before stable release. {725} - /// @ToDo: Complete documentation before stable release. {361} + /// @ToDo: Complete documentation before stable release. {683}. + /// @ToDo: Complete documentation before stable release. {573}. + /// @ToDo: Complete documentation before stable release. {343}. + /// @ToDo: Complete documentation before stable release. {725}. + /// @ToDo: Complete documentation before stable release. {361}. protected MetricSeriesAggregatorBase( Func> metricValuesBufferFactory, IMetricSeriesConfiguration configuration, @@ -48,15 +48,15 @@ protected MetricSeriesAggregatorBase( this.Reset(default(DateTimeOffset), default(IMetricValueFilter)); } - /// Gets @ToDo: Complete documentation before stable release. {182} + /// Gets @ToDo: Complete documentation before stable release. {182}. public MetricSeries DataSeries { get { return this.dataSeries; } } - /// @ToDo: Complete documentation before stable release. {895} - /// @ToDo: Complete documentation before stable release. {406} - /// @ToDo: Complete documentation before stable release. {839} + /// @ToDo: Complete documentation before stable release. {895}. + /// @ToDo: Complete documentation before stable release. {406}. + /// @ToDo: Complete documentation before stable release. {839}. public MetricAggregate CompleteAggregation(DateTimeOffset periodEnd) { if (!this.isPersistent) @@ -68,8 +68,8 @@ public MetricAggregate CompleteAggregation(DateTimeOffset periodEnd) return aggregate; } - /// @ToDo: Complete documentation before stable release. {121} - /// @ToDo: Complete documentation before stable release. {513} + /// @ToDo: Complete documentation before stable release. {121}. + /// @ToDo: Complete documentation before stable release. {513}. public void Reset(DateTimeOffset periodStart) { this.periodStart = periodStart; @@ -79,17 +79,17 @@ public void Reset(DateTimeOffset periodStart) this.ResetAggregate(); } - /// @ToDo: Complete documentation before stable release. {674} - /// @ToDo: Complete documentation before stable release. {632} - /// @ToDo: Complete documentation before stable release. {637} + /// @ToDo: Complete documentation before stable release. {674}. + /// @ToDo: Complete documentation before stable release. {632}. + /// @ToDo: Complete documentation before stable release. {637}. public void Reset(DateTimeOffset periodStart, IMetricValueFilter valueFilter) { this.valueFilter = valueFilter; this.Reset(periodStart); } - /// @ToDo: Complete documentation before stable release. {461} - /// @ToDo: Complete documentation before stable release. {786} + /// @ToDo: Complete documentation before stable release. {461}. + /// @ToDo: Complete documentation before stable release. {786}. public void TrackValue(double metricValue) { if (Double.IsNaN(metricValue)) @@ -109,8 +109,8 @@ public void TrackValue(double metricValue) this.TrackFilteredConvertedValue(value); } - /// @ToDo: Complete documentation before stable release. {415} - /// @ToDo: Complete documentation before stable release. {635} + /// @ToDo: Complete documentation before stable release. {415}. + /// @ToDo: Complete documentation before stable release. {635}. public void TrackValue(object metricValue) { if (metricValue == null) @@ -129,8 +129,8 @@ public void TrackValue(object metricValue) this.TrackFilteredConvertedValue(value); } - /// @ToDo: Complete documentation before stable release. {040} - /// @ToDo: Complete documentation before stable release. {556} + /// @ToDo: Complete documentation before stable release. {040}. + /// @ToDo: Complete documentation before stable release. {556}. public bool TryRecycle() { if (this.isPersistent) @@ -142,9 +142,9 @@ public bool TryRecycle() return true; } - /// @ToDo: Complete documentation before stable release. {017} - /// @ToDo: Complete documentation before stable release. {120} - /// @ToDo: Complete documentation before stable release. {390} + /// @ToDo: Complete documentation before stable release. {017}. + /// @ToDo: Complete documentation before stable release. {120}. + /// @ToDo: Complete documentation before stable release. {390}. public MetricAggregate CreateAggregateUnsafe(DateTimeOffset periodEnd) { this.UpdateAggregate(this.metricValuesBuffer); @@ -154,22 +154,22 @@ public MetricAggregate CreateAggregateUnsafe(DateTimeOffset periodEnd) #region Abstract Methods - /// @ToDo: Complete documentation before stable release. {238} - /// @ToDo: Complete documentation before stable release. {096} - /// @ToDo: Complete documentation before stable release. {421} + /// @ToDo: Complete documentation before stable release. {238}. + /// @ToDo: Complete documentation before stable release. {096}. + /// @ToDo: Complete documentation before stable release. {421}. protected abstract MetricAggregate CreateAggregate(DateTimeOffset periodEnd); - /// @ToDo: Complete documentation before stable release. {896} + /// @ToDo: Complete documentation before stable release. {896}. protected abstract void ResetAggregate(); - /// @ToDo: Complete documentation before stable release. {878} - /// @ToDo: Complete documentation before stable release. {128} - /// @ToDo: Complete documentation before stable release. {270} + /// @ToDo: Complete documentation before stable release. {878}. + /// @ToDo: Complete documentation before stable release. {128}. + /// @ToDo: Complete documentation before stable release. {270}. protected abstract TBufferedValue ConvertMetricValue(double metricValue); - /// @ToDo: Complete documentation before stable release. {928} - /// @ToDo: Complete documentation before stable release. {941} - /// @ToDo: Complete documentation before stable release. {657} + /// @ToDo: Complete documentation before stable release. {928}. + /// @ToDo: Complete documentation before stable release. {941}. + /// @ToDo: Complete documentation before stable release. {657}. protected abstract TBufferedValue ConvertMetricValue(object metricValue); /// @@ -178,10 +178,10 @@ public MetricAggregate CreateAggregateUnsafe(DateTimeOffset periodEnd) /// a lock on the metric values buffer (e.g. extracting a summary from the buffer). Stage 2 is the part of the update /// that does not need such a lock. /// - /// @ToDo: Complete documentation before stable release. {580} - /// @ToDo: Complete documentation before stable release. {764} - /// @ToDo: Complete documentation before stable release. {497} - /// @ToDo: Complete documentation before stable release. {788} + /// @ToDo: Complete documentation before stable release. {580}. + /// @ToDo: Complete documentation before stable release. {764}. + /// @ToDo: Complete documentation before stable release. {497}. + /// @ToDo: Complete documentation before stable release. {788}. protected abstract object UpdateAggregate_Stage1(MetricValuesBufferBase buffer, int minFlushIndex, int maxFlushIndex); /// @@ -190,14 +190,14 @@ public MetricAggregate CreateAggregateUnsafe(DateTimeOffset periodEnd) /// a lock on the metric values buffer (e.g. extracting a summary from the buffer). Stage 2 is the part of the update /// that does not need such a lock. /// - /// @ToDo: Complete documentation before stable release. {551} + /// @ToDo: Complete documentation before stable release. {551}. protected abstract void UpdateAggregate_Stage2(object stage1Result); #endregion Abstract Methods - /// @ToDo: Complete documentation before stable release. {203} - /// @ToDo: Complete documentation before stable release. {570} - /// @ToDo: Complete documentation before stable release. {632} + /// @ToDo: Complete documentation before stable release. {203}. + /// @ToDo: Complete documentation before stable release. {570}. + /// @ToDo: Complete documentation before stable release. {632}. protected void AddInfo_Timing_Dimensions_Context(MetricAggregate aggregate, DateTimeOffset periodEnd) { if (aggregate == null) @@ -372,7 +372,7 @@ private void TrackFilteredConvertedValue(TBufferedValue metricValue) /// /// Flushes the values buffer to update the aggregate state held by subclasses. /// - /// @ToDo: Complete documentation before stable release. {208} + /// @ToDo: Complete documentation before stable release. {208}. private void UpdateAggregate(MetricValuesBufferBase buffer) { if (buffer == null) diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesExtensions.cs index 13ac183d68..1d0cf71a04 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricSeriesExtensions.cs @@ -12,8 +12,8 @@ public static class MetricSeriesExtensions /// /// Exposes the Configuration property for users who imported the Microsoft.ApplicationInsights.Metrics.Extensibility namespace. /// - /// @ToDo: Complete documentation before stable release. {509} - /// @ToDo: Complete documentation before stable release. {867} + /// @ToDo: Complete documentation before stable release. {509}. + /// @ToDo: Complete documentation before stable release. {867}. public static IMetricSeriesConfiguration GetConfiguration(this MetricSeries metricSeries) { return metricSeries.configuration; diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricValuesBuffer.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricValuesBuffer.cs index 01bed3b104..c147995a52 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricValuesBuffer.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/MetricValuesBuffer.cs @@ -8,7 +8,7 @@ #pragma warning disable SA1649 // File name must match first type name #pragma warning disable SA1402 // File may only contain a single class - /// @ToDo: Complete documentation before stable release. {821} + /// @ToDo: Complete documentation before stable release. {821}. /// The tyoe of values held in the buffer. /// @PublicExposureCandidate internal abstract class MetricValuesBufferBase @@ -18,8 +18,8 @@ internal abstract class MetricValuesBufferBase private int lastWriteIndex = -1; private volatile int nextFlushIndex = 0; - /// @ToDo: Complete documentation before stable release. {327} - /// @ToDo: Complete documentation before stable release. {055} + /// @ToDo: Complete documentation before stable release. {327}. + /// @ToDo: Complete documentation before stable release. {055}. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214: Do not call overridable methods in constructors", Justification = "Call chain has been reviewed.")] public MetricValuesBufferBase(int capacity) { @@ -32,53 +32,53 @@ public MetricValuesBufferBase(int capacity) this.ResetValues(this.values); } - /// Gets @ToDo: Complete documentation before stable release. {982} + /// Gets @ToDo: Complete documentation before stable release. {982}. public int Capacity { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return this.values.Length; } } - /// Gets or sets @ToDo: Complete documentation before stable release. {934} + /// Gets or sets @ToDo: Complete documentation before stable release. {934}. public int NextFlushIndex { get { return this.nextFlushIndex; } set { this.nextFlushIndex = value; } } - /// @ToDo: Complete documentation before stable release. {997} - /// @ToDo: Complete documentation before stable release. {390} + /// @ToDo: Complete documentation before stable release. {997}. + /// @ToDo: Complete documentation before stable release. {390}. [MethodImpl(MethodImplOptions.AggressiveInlining)] public int IncWriteIndex() { return Interlocked.Increment(ref this.lastWriteIndex); } - /// @ToDo: Complete documentation before stable release. {243} - /// @ToDo: Complete documentation before stable release. {695} + /// @ToDo: Complete documentation before stable release. {243}. + /// @ToDo: Complete documentation before stable release. {695}. [MethodImpl(MethodImplOptions.AggressiveInlining)] public int PeekLastWriteIndex() { return Volatile.Read(ref this.lastWriteIndex); } - /// @ToDo: Complete documentation before stable release. {205} - /// @ToDo: Complete documentation before stable release. {545} - /// @ToDo: Complete documentation before stable release. {562} + /// @ToDo: Complete documentation before stable release. {205}. + /// @ToDo: Complete documentation before stable release. {545}. + /// @ToDo: Complete documentation before stable release. {562}. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void WriteValue(int index, TValue value) { this.WriteValueOnce(this.values, index, value); } - /// @ToDo: Complete documentation before stable release. {182} + /// @ToDo: Complete documentation before stable release. {182}. public void ResetIndices() { this.nextFlushIndex = 0; Interlocked.Exchange(ref this.lastWriteIndex, -1); } - /// @ToDo: Complete documentation before stable release. {105} + /// @ToDo: Complete documentation before stable release. {105}. public void ResetIndicesAndData() { Interlocked.Exchange(ref this.lastWriteIndex, this.Capacity); @@ -86,9 +86,9 @@ public void ResetIndicesAndData() this.ResetIndices(); } - /// @ToDo: Complete documentation before stable release. {628} - /// @ToDo: Complete documentation before stable release. {939} - /// @ToDo: Complete documentation before stable release. {285} + /// @ToDo: Complete documentation before stable release. {628}. + /// @ToDo: Complete documentation before stable release. {939}. + /// @ToDo: Complete documentation before stable release. {285}. public TValue GetAndResetValue(int index) { TValue value = this.GetAndResetValueOnce(this.values, index); @@ -118,53 +118,53 @@ public TValue GetAndResetValue(int index) return value; } - /// @ToDo: Complete documentation before stable release. {016} + /// @ToDo: Complete documentation before stable release. {016}. /// . protected abstract void ResetValues(TValue[] values); - /// @ToDo: Complete documentation before stable release. {277} - /// @ToDo: Complete documentation before stable release. {569} - /// @ToDo: Complete documentation before stable release. {193} - /// @ToDo: Complete documentation before stable release. {571} + /// @ToDo: Complete documentation before stable release. {277}. + /// @ToDo: Complete documentation before stable release. {569}. + /// @ToDo: Complete documentation before stable release. {193}. + /// @ToDo: Complete documentation before stable release. {571}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected abstract TValue GetAndResetValueOnce(TValue[] values, int index); - /// @ToDo: Complete documentation before stable release. {016} - /// @ToDo: Complete documentation before stable release. {051} - /// @ToDo: Complete documentation before stable release. {872} - /// @ToDo: Complete documentation before stable release. {963} + /// @ToDo: Complete documentation before stable release. {016}. + /// @ToDo: Complete documentation before stable release. {051}. + /// @ToDo: Complete documentation before stable release. {872}. + /// @ToDo: Complete documentation before stable release. {963}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected abstract void WriteValueOnce(TValue[] values, int index, TValue value); - /// @ToDo: Complete documentation before stable release. {997} - /// @ToDo: Complete documentation before stable release. {863} - /// @ToDo: Complete documentation before stable release. {432} + /// @ToDo: Complete documentation before stable release. {997}. + /// @ToDo: Complete documentation before stable release. {863}. + /// @ToDo: Complete documentation before stable release. {432}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected abstract bool IsInvalidValue(TValue value); } - /// @ToDo: Complete documentation before stable release. {469} + /// @ToDo: Complete documentation before stable release. {469}. /// @PublicExposureCandidate internal sealed class MetricValuesBuffer_Double : MetricValuesBufferBase { - /// @ToDo: Complete documentation before stable release. {923} - /// @ToDo: Complete documentation before stable release. {808} + /// @ToDo: Complete documentation before stable release. {923}. + /// @ToDo: Complete documentation before stable release. {808}. public MetricValuesBuffer_Double(int capacity) : base(capacity) { } - /// @ToDo: Complete documentation before stable release. {611} - /// @ToDo: Complete documentation before stable release. {523} - /// @ToDo: Complete documentation before stable release. {416} + /// @ToDo: Complete documentation before stable release. {611}. + /// @ToDo: Complete documentation before stable release. {523}. + /// @ToDo: Complete documentation before stable release. {416}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override bool IsInvalidValue(double value) { return Double.IsNaN(value); } - /// @ToDo: Complete documentation before stable release. {768} - /// @ToDo: Complete documentation before stable release. {365} + /// @ToDo: Complete documentation before stable release. {768}. + /// @ToDo: Complete documentation before stable release. {365}. protected override void ResetValues(double[] values) { for (int i = 0; i < values.Length; Interlocked.Exchange(ref values[i++], Double.NaN)) @@ -172,20 +172,20 @@ protected override void ResetValues(double[] values) } } - /// @ToDo: Complete documentation before stable release. {913} - /// @ToDo: Complete documentation before stable release. {943} - /// @ToDo: Complete documentation before stable release. {130} - /// @ToDo: Complete documentation before stable release. {880} + /// @ToDo: Complete documentation before stable release. {913}. + /// @ToDo: Complete documentation before stable release. {943}. + /// @ToDo: Complete documentation before stable release. {130}. + /// @ToDo: Complete documentation before stable release. {880}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override double GetAndResetValueOnce(double[] values, int index) { return Interlocked.Exchange(ref values[index], Double.NaN); } - /// @ToDo: Complete documentation before stable release. {684} - /// @ToDo: Complete documentation before stable release. {246} - /// @ToDo: Complete documentation before stable release. {452} - /// @ToDo: Complete documentation before stable release. {035} + /// @ToDo: Complete documentation before stable release. {684}. + /// @ToDo: Complete documentation before stable release. {246}. + /// @ToDo: Complete documentation before stable release. {452}. + /// @ToDo: Complete documentation before stable release. {035}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override void WriteValueOnce(double[] values, int index, double value) { @@ -193,28 +193,28 @@ protected override void WriteValueOnce(double[] values, int index, double value) } } - /// @ToDo: Complete documentation before stable release. {201} + /// @ToDo: Complete documentation before stable release. {201}. /// @PublicExposureCandidate internal sealed class MetricValuesBuffer_Object : MetricValuesBufferBase { - /// @ToDo: Complete documentation before stable release. {314} - /// @ToDo: Complete documentation before stable release. {683} + /// @ToDo: Complete documentation before stable release. {314}. + /// @ToDo: Complete documentation before stable release. {683}. public MetricValuesBuffer_Object(int capacity) : base(capacity) { } - /// @ToDo: Complete documentation before stable release. {922} - /// @ToDo: Complete documentation before stable release. {263} - /// @ToDo: Complete documentation before stable release. {284} + /// @ToDo: Complete documentation before stable release. {922}. + /// @ToDo: Complete documentation before stable release. {263}. + /// @ToDo: Complete documentation before stable release. {284}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override bool IsInvalidValue(object value) { return value == null; } - /// @ToDo: Complete documentation before stable release. {616} - /// @ToDo: Complete documentation before stable release. {931} + /// @ToDo: Complete documentation before stable release. {616}. + /// @ToDo: Complete documentation before stable release. {931}. protected override void ResetValues(object[] values) { for (int i = 0; i < values.Length; Interlocked.Exchange(ref values[i++], null)) @@ -222,20 +222,20 @@ protected override void ResetValues(object[] values) } } - /// @ToDo: Complete documentation before stable release. {940} - /// @ToDo: Complete documentation before stable release. {673} - /// @ToDo: Complete documentation before stable release. {249} - /// @ToDo: Complete documentation before stable release. {311} + /// @ToDo: Complete documentation before stable release. {940}. + /// @ToDo: Complete documentation before stable release. {673}. + /// @ToDo: Complete documentation before stable release. {249}. + /// @ToDo: Complete documentation before stable release. {311}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override object GetAndResetValueOnce(object[] values, int index) { return Interlocked.Exchange(ref values[index], null); } - /// @ToDo: Complete documentation before stable release. {003} - /// @ToDo: Complete documentation before stable release. {110} - /// @ToDo: Complete documentation before stable release. {970} - /// @ToDo: Complete documentation before stable release. {000} + /// @ToDo: Complete documentation before stable release. {003}. + /// @ToDo: Complete documentation before stable release. {110}. + /// @ToDo: Complete documentation before stable release. {970}. + /// @ToDo: Complete documentation before stable release. {000}. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected override void WriteValueOnce(object[] values, int index, object value) { diff --git a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/TelemetryClientExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/TelemetryClientExtensions.cs index 16ff22336e..ebc103c923 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Extensibility/TelemetryClientExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Extensibility/TelemetryClientExtensions.cs @@ -4,19 +4,20 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; + using Microsoft.ApplicationInsights.Extensibility; using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {526} + /// @ToDo: Complete documentation before stable release. {526}. public static class TelemetryClientExtensions { private static ConditionalWeakTable metricManagersForTelemetryClients; - /// @ToDo: Complete documentation before stable release. {811} - /// @ToDo: Complete documentation before stable release. {225} - /// @ToDo: Complete documentation before stable release. {281} - /// @ToDo: Complete documentation before stable release. {736} + /// @ToDo: Complete documentation before stable release. {811}. + /// @ToDo: Complete documentation before stable release. {225}. + /// @ToDo: Complete documentation before stable release. {281}. + /// @ToDo: Complete documentation before stable release. {736}. public static MetricManager GetMetricManager(this TelemetryClient telemetryClient, MetricAggregationScope aggregationScope) { Util.ValidateNotNull(telemetryClient, nameof(telemetryClient)); diff --git a/src/Microsoft.ApplicationInsights/Metrics/IMetricSeriesConfiguration.cs b/src/Microsoft.ApplicationInsights/Metrics/IMetricSeriesConfiguration.cs index ec4e135dc1..3ecc324305 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/IMetricSeriesConfiguration.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/IMetricSeriesConfiguration.cs @@ -3,16 +3,16 @@ using System; using Microsoft.ApplicationInsights.Metrics.Extensibility; - /// @ToDo: Complete documentation before stable release. {510} + /// @ToDo: Complete documentation before stable release. {510}. public interface IMetricSeriesConfiguration : IEquatable { - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {016} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {016}. bool RequiresPersistentAggregation { get; } - /// @ToDo: Complete documentation before stable release. {149} - /// @ToDo: Complete documentation before stable release. {201} - /// @ToDo: Complete documentation before stable release. {841} - /// @ToDo: Complete documentation before stable release. {127} + /// @ToDo: Complete documentation before stable release. {149}. + /// @ToDo: Complete documentation before stable release. {201}. + /// @ToDo: Complete documentation before stable release. {841}. + /// @ToDo: Complete documentation before stable release. {127}. IMetricSeriesAggregator CreateNewAggregator(MetricSeries dataSeries, MetricAggregationCycleKind aggregationCycleKind); } } diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/AutocollectedMetricsExtraction/DependencyMetricsExtractor.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/AutocollectedMetricsExtraction/DependencyMetricsExtractor.cs index fc7b1e7590..947fb05391 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/AutocollectedMetricsExtraction/DependencyMetricsExtractor.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/AutocollectedMetricsExtraction/DependencyMetricsExtractor.cs @@ -52,7 +52,7 @@ internal class DependencyMetricsExtractor : ISpecificAutocollectedMetricsExtract private Metric dependencyCallDurationMetric = null; /// - /// Maximum number of auto-discovered dependency types + /// Maximum number of auto-discovered dependency types. /// private int maxDependencyTypesToDiscover = MaxDependenctTypesToDiscoverDefault; diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/GrowingCollection.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/GrowingCollection.cs index e1f4f64f51..1cec5c05d4 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/GrowingCollection.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/GrowingCollection.cs @@ -8,7 +8,7 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {574} + /// @ToDo: Complete documentation before stable release. {574}. /// Type of collection elements. internal class GrowingCollection : IEnumerable { @@ -16,13 +16,13 @@ internal class GrowingCollection : IEnumerable private Segment dataHead; - /// @ToDo: Complete documentation before stable release. {371} + /// @ToDo: Complete documentation before stable release. {371}. public GrowingCollection() { this.dataHead = new Segment(null); } - /// Gets @ToDo: Complete documentation before stable release. {072} + /// Gets @ToDo: Complete documentation before stable release. {072}. public int Count { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -33,8 +33,8 @@ public int Count } } - /// @ToDo: Complete documentation before stable release. {146} - /// @ToDo: Complete documentation before stable release. {688} + /// @ToDo: Complete documentation before stable release. {146}. + /// @ToDo: Complete documentation before stable release. {688}. public void Add(T item) { Segment currHead = Volatile.Read(ref this.dataHead); @@ -50,8 +50,8 @@ public void Add(T item) } } - /// @ToDo: Complete documentation before stable release. {508} - /// @ToDo: Complete documentation before stable release. {325} + /// @ToDo: Complete documentation before stable release. {508}. + /// @ToDo: Complete documentation before stable release. {325}. [MethodImpl(MethodImplOptions.AggressiveInlining)] public GrowingCollection.Enumerator GetEnumerator() { @@ -59,8 +59,8 @@ public GrowingCollection.Enumerator GetEnumerator() return enumerator; } - /// @ToDo: Complete documentation before stable release. {563} - /// @ToDo: Complete documentation before stable release. {016} + /// @ToDo: Complete documentation before stable release. {563}. + /// @ToDo: Complete documentation before stable release. {016}. [MethodImpl(MethodImplOptions.AggressiveInlining)] IEnumerator IEnumerable.GetEnumerator() { @@ -75,7 +75,7 @@ IEnumerator IEnumerable.GetEnumerator() #region class Enumerator - /// @ToDo: Complete documentation before stable release. {671} + /// @ToDo: Complete documentation before stable release. {671}. public class Enumerator : IEnumerator { private readonly Segment head; @@ -93,7 +93,7 @@ internal Enumerator(Segment head) this.count = this.headOffset + (this.head.NextSegment == null ? 0 : this.head.NextSegment.GlobalCount); } - /// Gets @ToDo: Complete documentation before stable release. {648} + /// Gets @ToDo: Complete documentation before stable release. {648}. public int Count { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -103,7 +103,7 @@ public int Count } } - /// Gets @ToDo: Complete documentation before stable release. {314} + /// Gets @ToDo: Complete documentation before stable release. {314}. public T Current { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -122,7 +122,7 @@ object IEnumerator.Current } } - /// @ToDo: Complete documentation before stable release. {941} + /// @ToDo: Complete documentation before stable release. {941}. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Dispose() { @@ -130,8 +130,8 @@ public void Dispose() GC.SuppressFinalize(this); } - /// @ToDo: Complete documentation before stable release. {168} - /// @ToDo: Complete documentation before stable release. {185} + /// @ToDo: Complete documentation before stable release. {168}. + /// @ToDo: Complete documentation before stable release. {185}. public bool MoveNext() { if (this.currentSegmentOffset == 0) @@ -154,7 +154,7 @@ public bool MoveNext() } } - /// @ToDo: Complete documentation before stable release. {307} + /// @ToDo: Complete documentation before stable release. {307}. public void Reset() { this.currentSegment = this.head; diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube.cs index c10dac732e..320a31bc30 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube.cs @@ -168,35 +168,35 @@ internal class MultidimensionalCube private int totalPointsCount; - /// @ToDo: Complete documentation before stable release. {877} - /// @ToDo: Complete documentation before stable release. {671} - /// @ToDo: Complete documentation before stable release. {849} + /// @ToDo: Complete documentation before stable release. {877}. + /// @ToDo: Complete documentation before stable release. {671}. + /// @ToDo: Complete documentation before stable release. {849}. public MultidimensionalCube(Func pointsFactory, IEnumerable subdimensionsCountLimits) : this(Int32.MaxValue, pointsFactory, subdimensionsCountLimits) { } - /// @ToDo: Complete documentation before stable release. {166} - /// @ToDo: Complete documentation before stable release. {457} - /// @ToDo: Complete documentation before stable release. {362} - /// @ToDo: Complete documentation before stable release. {803} + /// @ToDo: Complete documentation before stable release. {166}. + /// @ToDo: Complete documentation before stable release. {457}. + /// @ToDo: Complete documentation before stable release. {362}. + /// @ToDo: Complete documentation before stable release. {803}. public MultidimensionalCube(int totalPointsCountLimit, Func pointsFactory, IEnumerable subdimensionsCountLimits) : this(totalPointsCountLimit, pointsFactory, subdimensionsCountLimits?.ToArray()) { } - /// @ToDo: Complete documentation before stable release. {973} - /// @ToDo: Complete documentation before stable release. {130} - /// @ToDo: Complete documentation before stable release. {354} + /// @ToDo: Complete documentation before stable release. {973}. + /// @ToDo: Complete documentation before stable release. {130}. + /// @ToDo: Complete documentation before stable release. {354}. public MultidimensionalCube(Func pointsFactory, params int[] subdimensionsCountLimits) : this(Int32.MaxValue, pointsFactory, subdimensionsCountLimits) { } - /// @ToDo: Complete documentation before stable release. {872} - /// @ToDo: Complete documentation before stable release. {021} - /// @ToDo: Complete documentation before stable release. {170} - /// @ToDo: Complete documentation before stable release. {298} + /// @ToDo: Complete documentation before stable release. {872}. + /// @ToDo: Complete documentation before stable release. {021}. + /// @ToDo: Complete documentation before stable release. {170}. + /// @ToDo: Complete documentation before stable release. {298}. public MultidimensionalCube(int totalPointsCountLimit, Func pointsFactory, params int[] subdimensionsCountLimits) { if (totalPointsCountLimit < 1) @@ -234,34 +234,34 @@ public MultidimensionalCube(int totalPointsCountLimit, FuncGets @ToDo: Complete documentation before stable release. {249} + /// Gets @ToDo: Complete documentation before stable release. {249}. public int DimensionsCount { get { return this.subdimensionsCountLimits.Length; } } - /// Gets @ToDo: Complete documentation before stable release. {655} + /// Gets @ToDo: Complete documentation before stable release. {655}. public int TotalPointsCountLimit { get { return this.totalPointsCountLimit; } } - /// Gets @ToDo: Complete documentation before stable release. {994} + /// Gets @ToDo: Complete documentation before stable release. {994}. public int TotalPointsCount { get { return Volatile.Read(ref this.totalPointsCount); } } - /// @ToDo: Complete documentation before stable release. {062} - /// @ToDo: Complete documentation before stable release. {689} - /// @ToDo: Complete documentation before stable release. {912} + /// @ToDo: Complete documentation before stable release. {062}. + /// @ToDo: Complete documentation before stable release. {689}. + /// @ToDo: Complete documentation before stable release. {912}. public int GetSubdimensionsCountLimit(int dimension) { return this.subdimensionsCountLimits[dimension]; } - /// @ToDo: Complete documentation before stable release. {543} - /// @ToDo: Complete documentation before stable release. {784} + /// @ToDo: Complete documentation before stable release. {543}. + /// @ToDo: Complete documentation before stable release. {784}. public IReadOnlyCollection> GetAllPoints() { var vectors = new List>(); @@ -269,8 +269,8 @@ public IReadOnlyCollection> GetAllPoints return vectors; } - /// @ToDo: Complete documentation before stable release. {251} - /// @ToDo: Complete documentation before stable release. {164} + /// @ToDo: Complete documentation before stable release. {251}. + /// @ToDo: Complete documentation before stable release. {164}. public void GetAllPoints(ICollection> pointContainer) { var vectors = new List>(); @@ -289,27 +289,27 @@ public void GetAllPoints(ICollection> po } } - /// @ToDo: Complete documentation before stable release. {924} - /// @ToDo: Complete documentation before stable release. {747} - /// @ToDo: Complete documentation before stable release. {986} + /// @ToDo: Complete documentation before stable release. {924}. + /// @ToDo: Complete documentation before stable release. {747}. + /// @ToDo: Complete documentation before stable release. {986}. public MultidimensionalPointResult TryGetOrCreatePoint(params TDimensionValue[] coordinates) { MultidimensionalPointResult result = this.points.TryGetOrAddVector(coordinates); return result; } - /// @ToDo: Complete documentation before stable release. {438} - /// @ToDo: Complete documentation before stable release. {321} - /// @ToDo: Complete documentation before stable release. {686} + /// @ToDo: Complete documentation before stable release. {438}. + /// @ToDo: Complete documentation before stable release. {321}. + /// @ToDo: Complete documentation before stable release. {686}. public MultidimensionalPointResult TryGetPoint(params TDimensionValue[] coordinates) { MultidimensionalPointResult result = this.points.TryGetVector(coordinates); return result; } - /// @ToDo: Complete documentation before stable release. {585} - /// @ToDo: Complete documentation before stable release. {643} - /// @ToDo: Complete documentation before stable release. {039} + /// @ToDo: Complete documentation before stable release. {585}. + /// @ToDo: Complete documentation before stable release. {643}. + /// @ToDo: Complete documentation before stable release. {039}. public Task> TryGetOrCreatePointAsync(params TDimensionValue[] coordinates) { return this.TryGetOrCreatePointAsync( @@ -319,12 +319,12 @@ public Task> TryGetOrCreatePointAsync(params coordinates: coordinates); } - /// @ToDo: Complete documentation before stable release. {973} - /// @ToDo: Complete documentation before stable release. {859} - /// @ToDo: Complete documentation before stable release. {280} - /// @ToDo: Complete documentation before stable release. {810} - /// @ToDo: Complete documentation before stable release. {522} - /// @ToDo: Complete documentation before stable release. {402} + /// @ToDo: Complete documentation before stable release. {973}. + /// @ToDo: Complete documentation before stable release. {859}. + /// @ToDo: Complete documentation before stable release. {280}. + /// @ToDo: Complete documentation before stable release. {810}. + /// @ToDo: Complete documentation before stable release. {522}. + /// @ToDo: Complete documentation before stable release. {402}. public async Task> TryGetOrCreatePointAsync( TimeSpan sleepDuration, TimeSpan timeout, @@ -444,8 +444,8 @@ internal TPoint InvokePointsFactory(TDimensionValue[] coordinates) } } - /// @ToDo: Complete documentation before stable release. {211} - /// @ToDo: Complete documentation before stable release. {567} + /// @ToDo: Complete documentation before stable release. {211}. + /// @ToDo: Complete documentation before stable release. {567}. internal bool TryIncTotalPointsCount() { int newTotalPointsCount = Interlocked.Increment(ref this.totalPointsCount); diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs index bfc935cd73..eb94bcb482 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalCube2.cs @@ -11,7 +11,7 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {099} + /// @ToDo: Complete documentation before stable release. {099}. /// Type of the set over which the cube is build. For metrics, it is a metric series. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001: Types that own disposable fields should be disposable", Justification = "OK not to explicitly dispose a released SemaphoreSlim.")] internal class MultidimensionalCube2 @@ -36,18 +36,18 @@ internal class MultidimensionalCube2 private int totalPointsCount; - /// @ToDo: Complete documentation before stable release. {016} - /// @ToDo: Complete documentation before stable release. {334} - /// @ToDo: Complete documentation before stable release. {636} + /// @ToDo: Complete documentation before stable release. {016}. + /// @ToDo: Complete documentation before stable release. {334}. + /// @ToDo: Complete documentation before stable release. {636}. public MultidimensionalCube2(Func pointsFactory, params int[] dimensionValuesCountLimits) : this(Int32.MaxValue, pointsFactory, dimensionValuesCountLimits) { } - /// @ToDo: Complete documentation before stable release. {303} - /// @ToDo: Complete documentation before stable release. {393} - /// @ToDo: Complete documentation before stable release. {718} - /// @ToDo: Complete documentation before stable release. {422} + /// @ToDo: Complete documentation before stable release. {303}. + /// @ToDo: Complete documentation before stable release. {393}. + /// @ToDo: Complete documentation before stable release. {718}. + /// @ToDo: Complete documentation before stable release. {422}. public MultidimensionalCube2(int totalPointsCountLimit, Func pointsFactory, params int[] dimensionValuesCountLimits) { if (totalPointsCountLimit < 1) @@ -92,44 +92,44 @@ public MultidimensionalCube2(int totalPointsCountLimit, Func p } } - /// Gets @ToDo: Complete documentation before stable release. {993} + /// Gets @ToDo: Complete documentation before stable release. {993}. public int DimensionsCount { get { return this.dimensionValuesCountLimits.Length; } } - /// Gets @ToDo: Complete documentation before stable release. {319} + /// Gets @ToDo: Complete documentation before stable release. {319}. public int TotalPointsCountLimit { get { return this.totalPointsCountLimit; } } - /// Gets @ToDo: Complete documentation before stable release. {878} + /// Gets @ToDo: Complete documentation before stable release. {878}. public int TotalPointsCount { get { return Volatile.Read(ref this.totalPointsCount); } } - /// @ToDo: Complete documentation before stable release. {479} - /// @ToDo: Complete documentation before stable release. {272} - /// @ToDo: Complete documentation before stable release. {764} + /// @ToDo: Complete documentation before stable release. {479}. + /// @ToDo: Complete documentation before stable release. {272}. + /// @ToDo: Complete documentation before stable release. {764}. public int GetDimensionValuesCountLimit(int dimension) { this.ValidateDimensionIndex(dimension); return this.dimensionValuesCountLimits[dimension]; } - /// @ToDo: Complete documentation before stable release. {093} - /// @ToDo: Complete documentation before stable release. {419} - /// @ToDo: Complete documentation before stable release. {684} + /// @ToDo: Complete documentation before stable release. {093}. + /// @ToDo: Complete documentation before stable release. {419}. + /// @ToDo: Complete documentation before stable release. {684}. public IReadOnlyCollection GetDimensionValues(int dimension) { this.ValidateDimensionIndex(dimension); return (IReadOnlyCollection)this.dimensionValues[dimension]; } - /// @ToDo: Complete documentation before stable release. {241} - /// @ToDo: Complete documentation before stable release. {710} + /// @ToDo: Complete documentation before stable release. {241}. + /// @ToDo: Complete documentation before stable release. {710}. public IReadOnlyList> GetAllPoints() { List> currentPoints = new List>(this.TotalPointsCount); @@ -137,9 +137,9 @@ public IReadOnlyList> GetAllPoints() return currentPoints; } - /// @ToDo: Complete documentation before stable release. {375} - /// @ToDo: Complete documentation before stable release. {365} - /// @ToDo: Complete documentation before stable release. {651} + /// @ToDo: Complete documentation before stable release. {375}. + /// @ToDo: Complete documentation before stable release. {365}. + /// @ToDo: Complete documentation before stable release. {651}. public int GetAllPoints(ICollection> pointContainer) { int count = 0; @@ -154,9 +154,9 @@ public int GetAllPoints(ICollection> pointContain return count; } - /// @ToDo: Complete documentation before stable release. {444} - /// @ToDo: Complete documentation before stable release. {769} - /// @ToDo: Complete documentation before stable release. {229} + /// @ToDo: Complete documentation before stable release. {444}. + /// @ToDo: Complete documentation before stable release. {769}. + /// @ToDo: Complete documentation before stable release. {229}. public MultidimensionalPointResult TryGetOrCreatePoint(params string[] coordinates) { string pointMoniker = this.GetPointMoniker(coordinates); @@ -188,18 +188,18 @@ public MultidimensionalPointResult TryGetOrCreatePoint(params string[] c } } - /// @ToDo: Complete documentation before stable release. {981} - /// @ToDo: Complete documentation before stable release. {197} - /// @ToDo: Complete documentation before stable release. {439} + /// @ToDo: Complete documentation before stable release. {981}. + /// @ToDo: Complete documentation before stable release. {197}. + /// @ToDo: Complete documentation before stable release. {439}. public Task> TryGetOrCreatePointAsync(params string[] coordinates) { return this.TryGetOrCreatePointAsync(CancellationToken.None, coordinates); } - /// @ToDo: Complete documentation before stable release. {969} - /// @ToDo: Complete documentation before stable release. {844} - /// @ToDo: Complete documentation before stable release. {472} - /// @ToDo: Complete documentation before stable release. {660} + /// @ToDo: Complete documentation before stable release. {969}. + /// @ToDo: Complete documentation before stable release. {844}. + /// @ToDo: Complete documentation before stable release. {472}. + /// @ToDo: Complete documentation before stable release. {660}. public async Task> TryGetOrCreatePointAsync(CancellationToken cancelToken, params string[] coordinates) { string pointMoniker = this.GetPointMoniker(coordinates); @@ -231,9 +231,9 @@ public async Task> TryGetOrCreatePointAsync( } } - /// @ToDo: Complete documentation before stable release. {477} - /// @ToDo: Complete documentation before stable release. {344} - /// @ToDo: Complete documentation before stable release. {444} + /// @ToDo: Complete documentation before stable release. {477}. + /// @ToDo: Complete documentation before stable release. {344}. + /// @ToDo: Complete documentation before stable release. {444}. public MultidimensionalPointResult TryGetPoint(params string[] coordinates) { string pointMoniker = this.GetPointMoniker(coordinates); diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalPointResult.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalPointResult.cs index f420008b1f..85297b8244 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalPointResult.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/ConcurrentDatastructures/MultidimensionalPointResult.cs @@ -2,7 +2,7 @@ { using System; - /// @ToDo: Complete documentation before stable release. {768} + /// @ToDo: Complete documentation before stable release. {768}. /// Type of the set over which the cube is build. For metics, it is a metric series. internal struct MultidimensionalPointResult { @@ -24,31 +24,31 @@ internal MultidimensionalPointResult(MultidimensionalPointResultCodes successCod this.point = point; } - /// Gets @ToDo: Complete documentation before stable release. {917} + /// Gets @ToDo: Complete documentation before stable release. {917}. public TPoint Point { get { return this.point; } } - /// Gets @ToDo: Complete documentation before stable release. {528} + /// Gets @ToDo: Complete documentation before stable release. {528}. public int FailureCoordinateIndex { get { return this.failureCoordinateIndex; } } - /// Gets @ToDo: Complete documentation before stable release. {621} + /// Gets @ToDo: Complete documentation before stable release. {621}. public MultidimensionalPointResultCodes ResultCode { get { return this.resultCode; } } - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {353} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {353}. public bool IsPointCreatedNew { get { return (this.ResultCode & MultidimensionalPointResultCodes.Success_NewPointCreated) != 0; } } - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {268} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {268}. public bool IsSuccess { get diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/MeasurementAggregateToApplicationInsightsPipelineConverter.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/MeasurementAggregateToApplicationInsightsPipelineConverter.cs index 8649d6b0fb..611aceacb8 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/MeasurementAggregateToApplicationInsightsPipelineConverter.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/MeasurementAggregateToApplicationInsightsPipelineConverter.cs @@ -4,7 +4,7 @@ using Microsoft.ApplicationInsights.DataContracts; using Microsoft.ApplicationInsights.Metrics.Extensibility; - /// @ToDo: Complete documentation before stable release. {951} + /// @ToDo: Complete documentation before stable release. {951}. internal class MeasurementAggregateToApplicationInsightsPipelineConverter : MetricAggregateToApplicationInsightsPipelineConverterBase { public override string AggregationKindMoniker diff --git a/src/Microsoft.ApplicationInsights/Metrics/Implementation/Util.cs b/src/Microsoft.ApplicationInsights/Metrics/Implementation/Util.cs index e28251616b..06f455ed76 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/Implementation/Util.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/Implementation/Util.cs @@ -306,9 +306,9 @@ public static int CombineHashCodes(int[] arr) return hash; } - /// @ToDo: Complete documentation before stable release. {659} - /// @ToDo: Complete documentation before stable release. {688} - /// @ToDo: Complete documentation before stable release. {859} + /// @ToDo: Complete documentation before stable release. {659}. + /// @ToDo: Complete documentation before stable release. {688}. + /// @ToDo: Complete documentation before stable release. {859}. public static void CopyTelemetryContext(TelemetryContext source, TelemetryContext target) { Util.ValidateNotNull(source, nameof(source)); diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricAggregate.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricAggregate.cs index 6fe9f995b9..c9fb198544 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricAggregate.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricAggregate.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Globalization; - /// @ToDo: Complete documentation before stable release. {406} + /// @ToDo: Complete documentation before stable release. {406}. public class MetricAggregate { // We want to make the aggregate thread safe, but we expect no significant contention, so a simple lock will suffice. @@ -14,10 +14,10 @@ public class MetricAggregate private DateTimeOffset aggregationPeriodStart; private TimeSpan aggregationPeriodDuration; - /// @ToDo: Complete documentation before stable release. {394} - /// @ToDo: Complete documentation before stable release. {704} - /// @ToDo: Complete documentation before stable release. {274} - /// @ToDo: Complete documentation before stable release. {781} + /// @ToDo: Complete documentation before stable release. {394}. + /// @ToDo: Complete documentation before stable release. {704}. + /// @ToDo: Complete documentation before stable release. {274}. + /// @ToDo: Complete documentation before stable release. {781}. public MetricAggregate(string metricNamespace, string metricId, string aggregationKindMoniker) { Util.ValidateNotNull(metricNamespace, nameof(metricNamespace)); @@ -35,16 +35,16 @@ public MetricAggregate(string metricNamespace, string metricId, string aggregati this.Data = new ConcurrentDictionary(); } - /// Gets @ToDo: Complete documentation before stable release. {747} + /// Gets @ToDo: Complete documentation before stable release. {747}. public string MetricNamespace { get; } - /// Gets @ToDo: Complete documentation before stable release. {848} + /// Gets @ToDo: Complete documentation before stable release. {848}. public string MetricId { get; } - /// Gets @ToDo: Complete documentation before stable release. {959} + /// Gets @ToDo: Complete documentation before stable release. {959}. public string AggregationKindMoniker { get; } - /// Gets or sets @ToDo: Complete documentation before stable release. {050} + /// Gets or sets @ToDo: Complete documentation before stable release. {050}. public DateTimeOffset AggregationPeriodStart { get @@ -64,7 +64,7 @@ public DateTimeOffset AggregationPeriodStart } } - /// Gets or sets @ToDo: Complete documentation before stable release. {309} + /// Gets or sets @ToDo: Complete documentation before stable release. {309}. public TimeSpan AggregationPeriodDuration { get @@ -84,10 +84,10 @@ public TimeSpan AggregationPeriodDuration } } - /// Gets @ToDo: Complete documentation before stable release. {840} + /// Gets @ToDo: Complete documentation before stable release. {840}. public IDictionary Dimensions { get; } - /// Gets @ToDo: Complete documentation before stable release. {034} + /// Gets @ToDo: Complete documentation before stable release. {034}. public IDictionary Data { get; } /// @@ -97,7 +97,7 @@ public TimeSpan AggregationPeriodDuration /// Type to which to convert the object at Data[dataKey]. /// Key for the data item. /// The value to return if conversion fails. - /// @ToDo: Complete documentation before stable release. {843} + /// @ToDo: Complete documentation before stable release. {843}. public T GetDataValue(string dataKey, T defaultValue) { object dataValue; diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricConfigurationForMeasurement.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricConfigurationForMeasurement.cs index 963ad3a994..ae93cce0c4 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricConfigurationForMeasurement.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricConfigurationForMeasurement.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; - /// @ToDo: Complete documentation before stable release. {218} + /// @ToDo: Complete documentation before stable release. {218}. public sealed class MetricConfigurationForMeasurement : MetricConfiguration { /// Creates a new instance of MetricConfigurationForMeasurement. diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs index 42e10367d7..137faf0b7e 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricIdentifier.cs @@ -8,10 +8,10 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {085} + /// @ToDo: Complete documentation before stable release. {085}. public sealed class MetricIdentifier : IEquatable { - /// @ToDo: Complete documentation before stable release. {369} + /// @ToDo: Complete documentation before stable release. {369}. public const int MaxDimensionsCount = 10; private const string NoNamespaceIdentifierStringComponent = ""; @@ -19,7 +19,7 @@ public sealed class MetricIdentifier : IEquatable private static readonly char[] InvalidMetricChars = new char[] { '\0', '"', '\'', '(', ')', '[', ']', '{', '}', '<', '>', '=', ',', - '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', '+', '?' + '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', '+', '?', }; private static string defaultMetricNamespace = String.Empty; @@ -41,7 +41,7 @@ public static string DefaultMetricNamespace } } - /// @ToDo: Complete documentation before stable release. {030} + /// @ToDo: Complete documentation before stable release. {030}. /// @PublicExposureCandidate private static void ValidateLiteral(string partValue, string partName, bool allowEmpty) { @@ -91,7 +91,7 @@ private static void ValidateLiteral(string partValue, string partName, bool allo private readonly int hashCode; #pragma warning restore SA1201 // Elements must appear in the correct order - /// @ToDo: Complete documentation before stable release. {150} + /// @ToDo: Complete documentation before stable release. {150}. public MetricIdentifier(string metricId) : this(metricNamespace: null, metricId: metricId, @@ -108,7 +108,7 @@ public MetricIdentifier(string metricId) { } - /// @ToDo: Complete documentation before stable release. {710} + /// @ToDo: Complete documentation before stable release. {710}. public MetricIdentifier(string metricNamespace, string metricId) : this(metricNamespace, metricId, @@ -125,7 +125,7 @@ public MetricIdentifier(string metricNamespace, string metricId) { } - /// @ToDo: Complete documentation before stable release. {080} + /// @ToDo: Complete documentation before stable release. {080}. public MetricIdentifier( string metricNamespace, string metricId, @@ -145,7 +145,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {219} + /// @ToDo: Complete documentation before stable release. {219}. public MetricIdentifier( string metricNamespace, string metricId, @@ -166,7 +166,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {419} + /// @ToDo: Complete documentation before stable release. {419}. public MetricIdentifier( string metricNamespace, string metricId, @@ -188,7 +188,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {852} + /// @ToDo: Complete documentation before stable release. {852}. public MetricIdentifier( string metricNamespace, string metricId, @@ -211,7 +211,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {761} + /// @ToDo: Complete documentation before stable release. {761}. public MetricIdentifier( string metricNamespace, string metricId, @@ -235,7 +235,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {629} + /// @ToDo: Complete documentation before stable release. {629}. public MetricIdentifier( string metricNamespace, string metricId, @@ -260,7 +260,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {522} + /// @ToDo: Complete documentation before stable release. {522}. public MetricIdentifier( string metricNamespace, string metricId, @@ -286,7 +286,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {040} + /// @ToDo: Complete documentation before stable release. {040}. public MetricIdentifier( string metricNamespace, string metricId, @@ -313,7 +313,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {406} + /// @ToDo: Complete documentation before stable release. {406}. public MetricIdentifier( string metricNamespace, string metricId, @@ -341,7 +341,7 @@ public MetricIdentifier( { } - /// @ToDo: Complete documentation before stable release. {144} + /// @ToDo: Complete documentation before stable release. {144}. public MetricIdentifier( string metricNamespace, string metricId, @@ -402,7 +402,7 @@ public MetricIdentifier( this.hashCode = this.identifierString.GetHashCode(); } - /// @ToDo: Complete documentation before stable release. {694} + /// @ToDo: Complete documentation before stable release. {694}. public MetricIdentifier( string metricNamespace, string metricId, @@ -445,7 +445,7 @@ public MetricIdentifier( /// /// Get an enumeration of the dimension names contained in this identity. The enumeration will have DimensionsCount elements. /// - /// @ToDo: Complete documentation before stable release. {589} + /// @ToDo: Complete documentation before stable release. {589}. public IEnumerable GetDimensionNames() { for (int d = 1; d <= this.DimensionsCount; d++) @@ -481,8 +481,8 @@ public string GetDimensionName(int dimensionNumber) } } - /// @ToDo: Complete documentation before stable release. {530} - /// @ToDo: Complete documentation before stable release. {986} + /// @ToDo: Complete documentation before stable release. {530}. + /// @ToDo: Complete documentation before stable release. {986}. public override string ToString() { return this.identifierString; diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricManager.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricManager.cs index 48d2c39410..ab190c105e 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricManager.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricManager.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Microsoft.ApplicationInsights.Metrics.Extensibility; - /// @ToDo: Complete documentation before stable release. {529} + /// @ToDo: Complete documentation before stable release. {529}. public sealed class MetricManager { private readonly MetricAggregationManager aggregationManager; @@ -14,8 +14,8 @@ public sealed class MetricManager private readonly IMetricTelemetryPipeline telemetryPipeline; private readonly MetricsCollection metrics; - /// @ToDo: Complete documentation before stable release. {599} - /// @ToDo: Complete documentation before stable release. {795} + /// @ToDo: Complete documentation before stable release. {599}. + /// @ToDo: Complete documentation before stable release. {795}. public MetricManager(IMetricTelemetryPipeline telemetryPipeline) { Util.ValidateNotNull(telemetryPipeline, nameof(telemetryPipeline)); @@ -41,7 +41,7 @@ public MetricManager(IMetricTelemetryPipeline telemetryPipeline) } } - /// Gets @ToDo: Complete documentation before stable release. {328} + /// Gets @ToDo: Complete documentation before stable release. {328}. public MetricsCollection Metrics { get { return this.metrics; } @@ -57,11 +57,11 @@ internal DefaultAggregationPeriodCycle AggregationCycle get { return this.aggregationCycle; } } - /// @ToDo: Complete documentation before stable release. {362} - /// @ToDo: Complete documentation before stable release. {953} - /// @ToDo: Complete documentation before stable release. {176} - /// @ToDo: Complete documentation before stable release. {016} - /// @ToDo: Complete documentation before stable release. {996} + /// @ToDo: Complete documentation before stable release. {362}. + /// @ToDo: Complete documentation before stable release. {953}. + /// @ToDo: Complete documentation before stable release. {176}. + /// @ToDo: Complete documentation before stable release. {016}. + /// @ToDo: Complete documentation before stable release. {996}. public MetricSeries CreateNewSeries(string metricNamespace, string metricId, IMetricSeriesConfiguration config) { return this.CreateNewSeries( @@ -71,12 +71,12 @@ public MetricSeries CreateNewSeries(string metricNamespace, string metricId, IMe config: config); } - /// @ToDo: Complete documentation before stable release. {064} - /// @ToDo: Complete documentation before stable release. {831} - /// @ToDo: Complete documentation before stable release. {381} - /// @ToDo: Complete documentation before stable release. {374} - /// @ToDo: Complete documentation before stable release. {303} - /// @ToDo: Complete documentation before stable release. {866} + /// @ToDo: Complete documentation before stable release. {064}. + /// @ToDo: Complete documentation before stable release. {831}. + /// @ToDo: Complete documentation before stable release. {381}. + /// @ToDo: Complete documentation before stable release. {374}. + /// @ToDo: Complete documentation before stable release. {303}. + /// @ToDo: Complete documentation before stable release. {866}. public MetricSeries CreateNewSeries( string metricNamespace, string metricId, @@ -100,11 +100,11 @@ public MetricSeries CreateNewSeries( return this.CreateNewSeries(metricIdentifier, dimensionNamesAndValues, config); } - /// @ToDo: Complete documentation before stable release. {569} - /// @ToDo: Complete documentation before stable release. {108} - /// @ToDo: Complete documentation before stable release. {785} - /// @ToDo: Complete documentation before stable release. {275} - /// @ToDo: Complete documentation before stable release. {908} + /// @ToDo: Complete documentation before stable release. {569}. + /// @ToDo: Complete documentation before stable release. {108}. + /// @ToDo: Complete documentation before stable release. {785}. + /// @ToDo: Complete documentation before stable release. {275}. + /// @ToDo: Complete documentation before stable release. {908}. public MetricSeries CreateNewSeries(MetricIdentifier metricIdentifier, IEnumerable> dimensionNamesAndValues, IMetricSeriesConfiguration config) { Util.ValidateNotNull(metricIdentifier, nameof(metricIdentifier)); @@ -114,7 +114,7 @@ public MetricSeries CreateNewSeries(MetricIdentifier metricIdentifier, IEnumerab return dataSeries; } - /// @ToDo: Complete documentation before stable release. {134} + /// @ToDo: Complete documentation before stable release. {134}. public void Flush() { this.Flush(flushDownstreamPipeline: true); diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricSeries.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricSeries.cs index 9a04da74ba..ef0d4e4d24 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricSeries.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricSeries.cs @@ -103,13 +103,13 @@ internal MetricSeries( this.aggregatorCustom = null; } - /// Gets @ToDo: Complete documentation before stable release. {380} + /// Gets @ToDo: Complete documentation before stable release. {380}. public IReadOnlyDictionary DimensionNamesAndValues { get { return this.dimensionNamesAndValues; } } - /// Gets @ToDo: Complete documentation before stable release. {255} + /// Gets @ToDo: Complete documentation before stable release. {255}. public MetricIdentifier MetricIdentifier { get; } /// @@ -196,15 +196,15 @@ public void TrackValue(object metricValue) } } - /// @ToDo: Complete documentation before stable release. {218} + /// @ToDo: Complete documentation before stable release. {218}. /// @PublicExposureCandidate internal void ResetAggregation() { this.ResetAggregation(periodStart: DateTimeOffset.Now); } - /// @ToDo: Complete documentation before stable release. {174} - /// @ToDo: Complete documentation before stable release. {837} + /// @ToDo: Complete documentation before stable release. {174}. + /// @ToDo: Complete documentation before stable release. {837}. /// @PublicExposureCandidate internal void ResetAggregation(DateTimeOffset periodStart) { @@ -234,18 +234,18 @@ internal void ResetAggregation(DateTimeOffset periodStart) } } - /// @ToDo: Complete documentation before stable release. {036} - /// @ToDo: Complete documentation before stable release. {909} + /// @ToDo: Complete documentation before stable release. {036}. + /// @ToDo: Complete documentation before stable release. {909}. /// @PublicExposureCandidate internal MetricAggregate GetCurrentAggregateUnsafe() { return this.GetCurrentAggregateUnsafe(CycleKind.Default, DateTimeOffset.Now); } - /// @ToDo: Complete documentation before stable release. {313} - /// @ToDo: Complete documentation before stable release. {621} - /// @ToDo: Complete documentation before stable release. {851} - /// @ToDo: Complete documentation before stable release. {437} + /// @ToDo: Complete documentation before stable release. {313}. + /// @ToDo: Complete documentation before stable release. {621}. + /// @ToDo: Complete documentation before stable release. {851}. + /// @ToDo: Complete documentation before stable release. {437}. /// @PublicExposureCandidate internal MetricAggregate GetCurrentAggregateUnsafe(MetricAggregationCycleKind aggregationCycleKind, DateTimeOffset dateTime) { @@ -470,8 +470,8 @@ private IMetricSeriesAggregator GetNewOrRecycledAggregatorInstance(MetricAggrega /// Aggregator implementations which believe that they are too expensive to recycle for this, can opt out of this strategy by returning FALSE from /// their CanRecycle property. /// - /// @ToDo: Complete documentation before stable release. {489} - /// @ToDo: Complete documentation before stable release. {036} + /// @ToDo: Complete documentation before stable release. {489}. + /// @ToDo: Complete documentation before stable release. {036}. private IMetricSeriesAggregator GetRecycledAggregatorInstance(MetricAggregationCycleKind aggregationCycleKind) { if (this.requiresPersistentAggregator) diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricSeriesConfigurationForMeasurement.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricSeriesConfigurationForMeasurement.cs index 875e918ebe..97dcaca09e 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricSeriesConfigurationForMeasurement.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricSeriesConfigurationForMeasurement.cs @@ -8,7 +8,7 @@ #pragma warning disable CA1034 // "Do not nest type" - part of the public API and too late to change. - /// @ToDo: Complete documentation before stable release. {023} + /// @ToDo: Complete documentation before stable release. {023}. public class MetricSeriesConfigurationForMeasurement : IMetricSeriesConfiguration { private readonly bool restrictToUInt32Values; @@ -22,8 +22,8 @@ static MetricSeriesConfigurationForMeasurement() new MeasurementAggregateToApplicationInsightsPipelineConverter()); } - /// @ToDo: Complete documentation before stable release. {650} - /// @ToDo: Complete documentation before stable release. {153} + /// @ToDo: Complete documentation before stable release. {650}. + /// @ToDo: Complete documentation before stable release. {153}. public MetricSeriesConfigurationForMeasurement(bool restrictToUInt32Values) { this.restrictToUInt32Values = restrictToUInt32Values; @@ -31,33 +31,33 @@ public MetricSeriesConfigurationForMeasurement(bool restrictToUInt32Values) this.hashCode = Util.CombineHashCodes(this.restrictToUInt32Values.GetHashCode()); } - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {612} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {612}. public bool RequiresPersistentAggregation { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return false; } } - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {691} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {691}. public bool RestrictToUInt32Values { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return this.restrictToUInt32Values; } } - /// @ToDo: Complete documentation before stable release. {287} - /// @ToDo: Complete documentation before stable release. {864} - /// @ToDo: Complete documentation before stable release. {203} - /// @ToDo: Complete documentation before stable release. {983} + /// @ToDo: Complete documentation before stable release. {287}. + /// @ToDo: Complete documentation before stable release. {864}. + /// @ToDo: Complete documentation before stable release. {203}. + /// @ToDo: Complete documentation before stable release. {983}. public IMetricSeriesAggregator CreateNewAggregator(MetricSeries dataSeries, MetricAggregationCycleKind aggregationCycleKind) { IMetricSeriesAggregator aggregator = new MeasurementAggregator(this, dataSeries, aggregationCycleKind); return aggregator; } - /// @ToDo: Complete documentation before stable release. {894} - /// @ToDo: Complete documentation before stable release. {102} - /// @ToDo: Complete documentation before stable release. {488} + /// @ToDo: Complete documentation before stable release. {894}. + /// @ToDo: Complete documentation before stable release. {102}. + /// @ToDo: Complete documentation before stable release. {488}. public override bool Equals(object obj) { if (obj != null) @@ -72,17 +72,17 @@ public override bool Equals(object obj) return false; } - /// @ToDo: Complete documentation before stable release. {278} - /// @ToDo: Complete documentation before stable release. {067} - /// @ToDo: Complete documentation before stable release. {117} + /// @ToDo: Complete documentation before stable release. {278}. + /// @ToDo: Complete documentation before stable release. {067}. + /// @ToDo: Complete documentation before stable release. {117}. public bool Equals(IMetricSeriesConfiguration other) { return this.Equals((object)other); } - /// @ToDo: Complete documentation before stable release. {078} - /// @ToDo: Complete documentation before stable release. {374} - /// @ToDo: Complete documentation before stable release. {070} + /// @ToDo: Complete documentation before stable release. {078}. + /// @ToDo: Complete documentation before stable release. {374}. + /// @ToDo: Complete documentation before stable release. {070}. public bool Equals(MetricSeriesConfigurationForMeasurement other) { if (other == null) @@ -98,8 +98,8 @@ public bool Equals(MetricSeriesConfigurationForMeasurement other) return this.RestrictToUInt32Values == other.RestrictToUInt32Values; } - /// @ToDo: Complete documentation before stable release. {869} - /// @ToDo: Complete documentation before stable release. {755} + /// @ToDo: Complete documentation before stable release. {869}. + /// @ToDo: Complete documentation before stable release. {755}. public override int GetHashCode() { return this.hashCode; diff --git a/src/Microsoft.ApplicationInsights/Metrics/MetricsCollection.cs b/src/Microsoft.ApplicationInsights/Metrics/MetricsCollection.cs index e1f3457bf2..d705995b63 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/MetricsCollection.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/MetricsCollection.cs @@ -7,36 +7,36 @@ using static System.FormattableString; - /// @ToDo: Complete documentation before stable release. {092} + /// @ToDo: Complete documentation before stable release. {092}. public sealed class MetricsCollection : ICollection { private readonly MetricManager metricManager; private readonly ConcurrentDictionary metrics = new ConcurrentDictionary(); - /// @ToDo: Complete documentation before stable release. {109} - /// @ToDo: Complete documentation before stable release. {758} + /// @ToDo: Complete documentation before stable release. {109}. + /// @ToDo: Complete documentation before stable release. {758}. internal MetricsCollection(MetricManager metricManager) { Util.ValidateNotNull(metricManager, nameof(metricManager)); this.metricManager = metricManager; } - /// Gets @ToDo: Complete documentation before stable release. {304} + /// Gets @ToDo: Complete documentation before stable release. {304}. public int Count { get { return this.metrics.Count; } } - /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {712} + /// Gets a value indicating whether @ToDo: Complete documentation before stable release. {712}. public bool IsReadOnly { get { return false; } } - /// @ToDo: Complete documentation before stable release. {799} - /// @ToDo: Complete documentation before stable release. {564} - /// @ToDo: Complete documentation before stable release. {324} - /// @ToDo: Complete documentation before stable release. {708} + /// @ToDo: Complete documentation before stable release. {799}. + /// @ToDo: Complete documentation before stable release. {564}. + /// @ToDo: Complete documentation before stable release. {324}. + /// @ToDo: Complete documentation before stable release. {708}. public Metric GetOrCreate( MetricIdentifier metricIdentifier, MetricConfiguration metricConfiguration) @@ -63,10 +63,10 @@ public Metric GetOrCreate( return metric; } - /// @ToDo: Complete documentation before stable release. {799} - /// @ToDo: Complete documentation before stable release. {564} - /// @ToDo: Complete documentation before stable release. {324} - /// @ToDo: Complete documentation before stable release. {708} + /// @ToDo: Complete documentation before stable release. {799}. + /// @ToDo: Complete documentation before stable release. {564}. + /// @ToDo: Complete documentation before stable release. {324}. + /// @ToDo: Complete documentation before stable release. {708}. public bool TryGet(MetricIdentifier metricIdentifier, out Metric metric) { Util.ValidateNotNull(metricIdentifier, nameof(metricIdentifier)); @@ -74,15 +74,15 @@ public bool TryGet(MetricIdentifier metricIdentifier, out Metric metric) return this.metrics.TryGetValue(metricIdentifier, out metric); } - /// @ToDo: Complete documentation before stable release. {200} + /// @ToDo: Complete documentation before stable release. {200}. public void Clear() { this.metrics.Clear(); } - /// @ToDo: Complete documentation before stable release. {628} - /// @ToDo: Complete documentation before stable release. {398} - /// @ToDo: Complete documentation before stable release. {479} + /// @ToDo: Complete documentation before stable release. {628}. + /// @ToDo: Complete documentation before stable release. {398}. + /// @ToDo: Complete documentation before stable release. {479}. public bool Contains(Metric metric) { if (metric == null) @@ -93,9 +93,9 @@ public bool Contains(Metric metric) return this.metrics.ContainsKey(metric.Identifier); } - /// @ToDo: Complete documentation before stable release. {629} - /// @ToDo: Complete documentation before stable release. {398} - /// @ToDo: Complete documentation before stable release. {479} + /// @ToDo: Complete documentation before stable release. {629}. + /// @ToDo: Complete documentation before stable release. {398}. + /// @ToDo: Complete documentation before stable release. {479}. public bool Contains(MetricIdentifier metricIdentifier) { if (metricIdentifier == null) @@ -106,9 +106,9 @@ public bool Contains(MetricIdentifier metricIdentifier) return this.metrics.ContainsKey(metricIdentifier); } - /// @ToDo: Complete documentation before stable release. {200} - /// @ToDo: Complete documentation before stable release. {377} - /// @ToDo: Complete documentation before stable release. {290} + /// @ToDo: Complete documentation before stable release. {200}. + /// @ToDo: Complete documentation before stable release. {377}. + /// @ToDo: Complete documentation before stable release. {290}. public void CopyTo(Metric[] array, int arrayIndex) { Util.ValidateNotNull(array, nameof(array)); @@ -121,9 +121,9 @@ public void CopyTo(Metric[] array, int arrayIndex) this.metrics.Values.CopyTo(array, arrayIndex); } - /// @ToDo: Complete documentation before stable release. {040} - /// @ToDo: Complete documentation before stable release. {667} - /// @ToDo: Complete documentation before stable release. {197} + /// @ToDo: Complete documentation before stable release. {040}. + /// @ToDo: Complete documentation before stable release. {667}. + /// @ToDo: Complete documentation before stable release. {197}. public bool Remove(Metric metric) { if (metric == null) @@ -135,19 +135,19 @@ public bool Remove(Metric metric) return this.metrics.TryRemove(metric.Identifier, out removedMetric); } - /// @ToDo: Complete documentation before stable release. {041} - /// @ToDo: Complete documentation before stable release. {667} - /// @ToDo: Complete documentation before stable release. {197} + /// @ToDo: Complete documentation before stable release. {041}. + /// @ToDo: Complete documentation before stable release. {667}. + /// @ToDo: Complete documentation before stable release. {197}. public bool Remove(MetricIdentifier metricIdentifier) { Metric removedMetric; return this.Remove(metricIdentifier, out removedMetric); } - /// @ToDo: Complete documentation before stable release. {041} - /// @ToDo: Complete documentation before stable release. {667} - /// @ToDo: Complete documentation before stable release. {668} - /// @ToDo: Complete documentation before stable release. {197} + /// @ToDo: Complete documentation before stable release. {041}. + /// @ToDo: Complete documentation before stable release. {667}. + /// @ToDo: Complete documentation before stable release. {668}. + /// @ToDo: Complete documentation before stable release. {197}. public bool Remove(MetricIdentifier metricIdentifier, out Metric removedMetric) { if (metricIdentifier == null) @@ -159,15 +159,15 @@ public bool Remove(MetricIdentifier metricIdentifier, out Metric removedMetric) return this.metrics.TryRemove(metricIdentifier, out removedMetric); } - /// @ToDo: Complete documentation before stable release. {533} - /// @ToDo: Complete documentation before stable release. {064} + /// @ToDo: Complete documentation before stable release. {533}. + /// @ToDo: Complete documentation before stable release. {064}. public IEnumerator GetEnumerator() { return this.metrics.Values.GetEnumerator(); } - /// @ToDo: Complete documentation before stable release. {222} - /// @ToDo: Complete documentation before stable release. {354} + /// @ToDo: Complete documentation before stable release. {222}. + /// @ToDo: Complete documentation before stable release. {354}. IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); @@ -176,7 +176,7 @@ IEnumerator IEnumerable.GetEnumerator() /// /// The Add(..) method is not supported. To add a new metric, use the GetOrCreate(..) method. /// - /// @ToDo: Complete documentation before stable release. {021} + /// @ToDo: Complete documentation before stable release. {021}. void ICollection.Add(Metric unsupported) { throw new NotSupportedException(Invariant($"The Add(..) method is not supported by this {nameof(MetricsCollection)}.") diff --git a/src/Microsoft.ApplicationInsights/Metrics/TelemetryConfigurationExtensions.cs b/src/Microsoft.ApplicationInsights/Metrics/TelemetryConfigurationExtensions.cs index 66e87b4b4a..8468f61dfa 100644 --- a/src/Microsoft.ApplicationInsights/Metrics/TelemetryConfigurationExtensions.cs +++ b/src/Microsoft.ApplicationInsights/Metrics/TelemetryConfigurationExtensions.cs @@ -3,12 +3,12 @@ using System; using Microsoft.ApplicationInsights.Extensibility; - /// @ToDo: Complete documentation before stable release. {737} + /// @ToDo: Complete documentation before stable release. {737}. public static class TelemetryConfigurationExtensions { - /// @ToDo: Complete documentation before stable release. {923} - /// @ToDo: Complete documentation before stable release. {456} - /// @ToDo: Complete documentation before stable release. {580} + /// @ToDo: Complete documentation before stable release. {923}. + /// @ToDo: Complete documentation before stable release. {456}. + /// @ToDo: Complete documentation before stable release. {580}. public static MetricManager GetMetricManager(this TelemetryConfiguration telemetryPipeline) { return telemetryPipeline?.GetMetricManager(createIfNotExists: true); diff --git a/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj b/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj index 5747a4f6e7..42ee319180 100644 --- a/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj +++ b/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj @@ -23,10 +23,10 @@ All - + All - + All diff --git a/src/Microsoft.ApplicationInsights/TelemetryClient.cs b/src/Microsoft.ApplicationInsights/TelemetryClient.cs index fd69c09c75..941284933f 100644 --- a/src/Microsoft.ApplicationInsights/TelemetryClient.cs +++ b/src/Microsoft.ApplicationInsights/TelemetryClient.cs @@ -294,7 +294,7 @@ public void TrackException(Exception exception, IDictionary prop /// /// Send an for display in Diagnostic Search. - /// Create a separate instance for each call to + /// Create a separate instance for each call to . /// /// /// Learn more @@ -367,7 +367,7 @@ public void TrackDependency(string dependencyTypeName, string target, string dep /// /// Send information about external dependency call in the application. - /// Create a separate instance for each call to + /// Create a separate instance for each call to . /// /// /// Learn more @@ -415,7 +415,7 @@ public void TrackAvailability(string name, DateTimeOffset timeStamp, TimeSpan du /// /// Send information about availability of an application. - /// Create a separate instance for each call to + /// Create a separate instance for each call to . /// /// /// Learn more @@ -624,8 +624,7 @@ public void TrackRequest(RequestTelemetry request) /// public void Flush() { - MetricManager privateMetricManager; - if (this.TryGetMetricManager(out privateMetricManager)) + if (this.TryGetMetricManager(out MetricManager privateMetricManager)) { privateMetricManager.Flush(flushDownstreamPipeline: false); } diff --git a/src/Microsoft.ApplicationInsights/TelemetryClientExtensions.cs b/src/Microsoft.ApplicationInsights/TelemetryClientExtensions.cs index afabb990ed..d51f2fe2ca 100644 --- a/src/Microsoft.ApplicationInsights/TelemetryClientExtensions.cs +++ b/src/Microsoft.ApplicationInsights/TelemetryClientExtensions.cs @@ -3,9 +3,10 @@ using System; using System.ComponentModel; using System.Diagnostics; - using Extensibility; - using Extensibility.Implementation.Tracing; + + using Microsoft.ApplicationInsights.Extensibility; using Microsoft.ApplicationInsights.Extensibility.Implementation; + using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; /// /// Extension class to telemetry client that creates operation object with the respective fields initialized. @@ -155,7 +156,7 @@ public static IOperationHolder StartOperation(this TelemetryClient telemet { ParentOperationId = operationTelemetry.Id, RootOperationId = operationTelemetry.Context.Operation.Id, - RootOperationName = operationTelemetry.Context.Operation.Name + RootOperationName = operationTelemetry.Context.Operation.Name, }; CallContextHelpers.SaveOperationContext(operationContext); } diff --git a/src/ServerTelemetryChannel/AdaptiveSamplingTelemetryProcessor.cs b/src/ServerTelemetryChannel/AdaptiveSamplingTelemetryProcessor.cs index 438ad69b93..599b3f1ab8 100644 --- a/src/ServerTelemetryChannel/AdaptiveSamplingTelemetryProcessor.cs +++ b/src/ServerTelemetryChannel/AdaptiveSamplingTelemetryProcessor.cs @@ -59,7 +59,7 @@ public AdaptiveSamplingTelemetryProcessor( this.estimatorProcessor = new SamplingPercentageEstimatorTelemetryProcessor(settings, this.SamplingPercentageChanged, next); this.samplingProcessor = new SamplingTelemetryProcessor(next, this.estimatorProcessor) { - SamplingPercentage = this.estimatorSettings.InitialSamplingPercentage + SamplingPercentage = this.estimatorSettings.InitialSamplingPercentage, }; } diff --git a/src/ServerTelemetryChannel/Implementation/ErrorHandlingTransmissionPolicy.cs b/src/ServerTelemetryChannel/Implementation/ErrorHandlingTransmissionPolicy.cs index f741314d2a..84c21654dc 100644 --- a/src/ServerTelemetryChannel/Implementation/ErrorHandlingTransmissionPolicy.cs +++ b/src/ServerTelemetryChannel/Implementation/ErrorHandlingTransmissionPolicy.cs @@ -3,8 +3,8 @@ using System; using System.Globalization; using System.Threading.Tasks; - using ApplicationInsights.Channel.Implementation; - using Extensibility.Implementation; + using Microsoft.ApplicationInsights.Channel.Implementation; + using Microsoft.ApplicationInsights.Extensibility.Implementation; internal class ErrorHandlingTransmissionPolicy : TransmissionPolicy, IDisposable { diff --git a/src/ServerTelemetryChannel/Implementation/TaskTimerInternal.cs b/src/ServerTelemetryChannel/Implementation/TaskTimerInternal.cs index d206b9a60f..d9bc7f36db 100644 --- a/src/ServerTelemetryChannel/Implementation/TaskTimerInternal.cs +++ b/src/ServerTelemetryChannel/Implementation/TaskTimerInternal.cs @@ -9,8 +9,7 @@ namespace Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implement using System.Threading.Tasks; using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing; - using WindowsServer.TelemetryChannel.Implementation; - + /// /// Runs a task after a certain delay and log any error. /// @@ -82,9 +81,9 @@ public void Start(Func elapsed) LogException(exception); } }, - CancellationToken.None, - TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, - TaskScheduler.Default); + CancellationToken.None, + TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously, + TaskScheduler.Default); CancelAndDispose(Interlocked.Exchange(ref this.tokenSource, newTokenSource)); } diff --git a/src/ServerTelemetryChannel/Implementation/TransmissionSender.cs b/src/ServerTelemetryChannel/Implementation/TransmissionSender.cs index 7ce45dc948..415d333051 100644 --- a/src/ServerTelemetryChannel/Implementation/TransmissionSender.cs +++ b/src/ServerTelemetryChannel/Implementation/TransmissionSender.cs @@ -5,9 +5,10 @@ using System.Net; using System.Net.Http; using System.Threading; - using System.Threading.Tasks; - using Extensibility; + using System.Threading.Tasks; + using Microsoft.ApplicationInsights.Channel; + using Microsoft.ApplicationInsights.Extensibility; using Microsoft.ApplicationInsights.Extensibility.Implementation; internal class TransmissionSender @@ -198,7 +199,7 @@ private async Task StartSending(Transmission transmission) responseContent = new HttpWebResponseWrapper() { // Expectation is that RetryPolicy will attempt retry for this status. - StatusCode = ResponseStatusCodes.UnknownNetworkError + StatusCode = ResponseStatusCodes.UnknownNetworkError, }; } @@ -289,7 +290,7 @@ private void SendTransmissionThrottleRejection(Transmission rejectedTransmission { StatusCode = ResponseStatusCodes.ResponseCodeTooManyRequests, StatusDescription = "Internally Throttled", - RetryAfterHeader = null + RetryAfterHeader = null, })); } } diff --git a/src/ServerTelemetryChannel/Implementation/WeakConcurrentRandom.cs b/src/ServerTelemetryChannel/Implementation/WeakConcurrentRandom.cs index b49431be63..8ed85e3c13 100644 --- a/src/ServerTelemetryChannel/Implementation/WeakConcurrentRandom.cs +++ b/src/ServerTelemetryChannel/Implementation/WeakConcurrentRandom.cs @@ -67,7 +67,7 @@ public WeakConcurrentRandom() public static WeakConcurrentRandom Instance { #if NET45 || NET46 - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [MethodImpl(MethodImplOptions.AggressiveInlining)] #endif get { diff --git a/src/ServerTelemetryChannel/TelemetryChannel.csproj b/src/ServerTelemetryChannel/TelemetryChannel.csproj index 6384bf3647..6a30b3c5ea 100644 --- a/src/ServerTelemetryChannel/TelemetryChannel.csproj +++ b/src/ServerTelemetryChannel/TelemetryChannel.csproj @@ -30,10 +30,10 @@ All - + all - + All diff --git a/src/ServerTelemetryChannel/TelemetryProcessorChainBuilderExtensions.cs b/src/ServerTelemetryChannel/TelemetryProcessorChainBuilderExtensions.cs index 50358371c4..a0813897c8 100644 --- a/src/ServerTelemetryChannel/TelemetryProcessorChainBuilderExtensions.cs +++ b/src/ServerTelemetryChannel/TelemetryProcessorChainBuilderExtensions.cs @@ -16,13 +16,13 @@ public static class TelemetryProcessorChainBuilderExtensions { /// - /// Adds to the given + /// Adds to the given. /// - /// Instance of + /// 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 . + /// Same instance of . public static TelemetryProcessorChainBuilder UseSampling(this TelemetryProcessorChainBuilder builder, double samplingPercentage, string excludedTypes = null, string includedTypes = null) { if (builder == null) @@ -34,17 +34,17 @@ public static TelemetryProcessorChainBuilder UseSampling(this TelemetryProcessor { SamplingPercentage = samplingPercentage, ExcludedTypes = excludedTypes, - IncludedTypes = includedTypes + IncludedTypes = includedTypes, }); } /// - /// Adds to the + /// Adds to the . /// - /// Instance of + /// 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 . + /// Same instance of . public static TelemetryProcessorChainBuilder UseAdaptiveSampling(this TelemetryProcessorChainBuilder builder, string excludedTypes = null, string includedTypes = null) { if (builder == null) @@ -55,18 +55,18 @@ public static TelemetryProcessorChainBuilder UseAdaptiveSampling(this TelemetryP return builder.Use(next => new AdaptiveSamplingTelemetryProcessor(next) { ExcludedTypes = excludedTypes, - IncludedTypes = includedTypes + IncludedTypes = includedTypes, }); } /// - /// Adds to the + /// Adds to the . /// - /// Instance of + /// 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 . + /// Same instance of . public static TelemetryProcessorChainBuilder UseAdaptiveSampling(this TelemetryProcessorChainBuilder builder, double maxTelemetryItemsPerSecond, string excludedTypes = null, string includedTypes = null) { if (builder == null) @@ -78,19 +78,19 @@ public static TelemetryProcessorChainBuilder UseAdaptiveSampling(this TelemetryP { MaxTelemetryItemsPerSecond = maxTelemetryItemsPerSecond, ExcludedTypes = excludedTypes, - IncludedTypes = includedTypes + IncludedTypes = includedTypes, }); } /// - /// Adds to the + /// Adds to the . /// - /// Instance of + /// 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 . + /// Same instance of . public static TelemetryProcessorChainBuilder UseAdaptiveSampling( this TelemetryProcessorChainBuilder builder, WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings settings, @@ -112,7 +112,7 @@ public static TelemetryProcessorChainBuilder UseAdaptiveSampling( { InitialSamplingPercentage = 100.0 / settings.EffectiveInitialSamplingRate, ExcludedTypes = excludedTypes, - IncludedTypes = includedTypes + IncludedTypes = includedTypes, }); } }