diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/ActivityExtensions.cs b/src/Microsoft.AspNet.TelemetryCorrelation/ActivityExtensions.cs
index ea282615675..b7a18a0461b 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/ActivityExtensions.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/ActivityExtensions.cs
@@ -22,7 +22,7 @@
namespace Microsoft.AspNet.TelemetryCorrelation
{
///
- /// Extensions of Activity class
+ /// Extensions of Activity class.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public static class ActivityExtensions
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/ActivityHelper.cs b/src/Microsoft.AspNet.TelemetryCorrelation/ActivityHelper.cs
index 1b8d2ccc12a..9bfd9b1a8dd 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/ActivityHelper.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/ActivityHelper.cs
@@ -22,7 +22,7 @@
namespace Microsoft.AspNet.TelemetryCorrelation
{
///
- /// Activity helper class
+ /// Activity helper class.
///
internal static class ActivityHelper
{
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/AspNetTelemetryCorrelationEventSource.cs b/src/Microsoft.AspNet.TelemetryCorrelation/AspNetTelemetryCorrelationEventSource.cs
index 0c9b50e319e..d2b576de95f 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/AspNetTelemetryCorrelationEventSource.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/AspNetTelemetryCorrelationEventSource.cs
@@ -34,76 +34,76 @@ internal sealed class AspNetTelemetryCorrelationEventSource : EventSource
[NonEvent]
public void ActivityException(string id, string eventName, Exception ex)
{
- if (IsEnabled(EventLevel.Error, (EventKeywords)(-1)))
+ if (this.IsEnabled(EventLevel.Error, EventKeywords.All))
{
- ActivityException(id, eventName, ex.ToString());
+ this.ActivityException(id, eventName, ex.ToString());
}
}
[Event(1, Message = "Callback='{0}'", Level = EventLevel.Verbose)]
public void TraceCallback(string callback)
{
- WriteEvent(1, callback);
+ this.WriteEvent(1, callback);
}
[Event(2, Message = "Activity started, Id='{0}'", Level = EventLevel.Verbose)]
public void ActivityStarted(string id)
{
- WriteEvent(2, id);
+ this.WriteEvent(2, id);
}
[Event(3, Message = "Activity stopped, Id='{0}', Name='{1}'", Level = EventLevel.Verbose)]
public void ActivityStopped(string id, string eventName)
{
- WriteEvent(3, id, eventName);
+ this.WriteEvent(3, id, eventName);
}
[Event(4, Message = "Failed to parse header '{0}', value: '{1}'", Level = EventLevel.Informational)]
public void HeaderParsingError(string headerName, string headerValue)
{
- WriteEvent(4, headerName, headerValue);
+ this.WriteEvent(4, headerName, headerValue);
}
[Event(5, Message = "Failed to extract activity, reason '{0}'", Level = EventLevel.Error)]
public void ActvityExtractionError(string reason)
{
- WriteEvent(5, reason);
+ this.WriteEvent(5, reason);
}
[Event(6, Message = "Finished Activity is detected on the stack, Id: '{0}', Name: '{1}'", Level = EventLevel.Error)]
public void FinishedActivityIsDetected(string id, string name)
{
- WriteEvent(6, id, name);
+ this.WriteEvent(6, id, name);
}
[Event(7, Message = "System.Diagnostics.Activity stack is too deep. This is a code authoring error, Activity will not be stopped.", Level = EventLevel.Error)]
public void ActivityStackIsTooDeepError()
{
- WriteEvent(7);
+ this.WriteEvent(7);
}
[Event(8, Message = "Activity restored, Id='{0}'", Level = EventLevel.Informational)]
public void ActivityRestored(string id)
{
- WriteEvent(8, id);
+ this.WriteEvent(8, id);
}
[Event(9, Message = "Failed to invoke OnExecuteRequestStep, Error='{0}'", Level = EventLevel.Error)]
public void OnExecuteRequestStepInvokationError(string error)
{
- WriteEvent(9, error);
+ this.WriteEvent(9, error);
}
[Event(10, Message = "System.Diagnostics.Activity stack is too deep. Current Id: '{0}', Name: '{1}'", Level = EventLevel.Warning)]
public void ActivityStackIsTooDeepDetails(string id, string name)
{
- WriteEvent(10, id, name);
+ this.WriteEvent(10, id, name);
}
[Event(11, Message = "Activity exception, Id='{0}', Name='{1}': {2}", Level = EventLevel.Error)]
public void ActivityException(string id, string eventName, string ex)
{
- WriteEvent(11, id, eventName, ex);
+ this.WriteEvent(11, id, eventName, ex);
}
}
}
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/BaseHeaderParser.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/BaseHeaderParser.cs
index a6256c6278f..5f152f67fba 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/BaseHeaderParser.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/BaseHeaderParser.cs
@@ -35,29 +35,29 @@ public sealed override bool TryParseValue(string value, ref int index, out T par
// Accept: text/plain; q=0.2
if (string.IsNullOrEmpty(value) || (index == value.Length))
{
- return SupportsMultipleValues;
+ return this.SupportsMultipleValues;
}
var separatorFound = false;
- var current = HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(value, index, SupportsMultipleValues, out separatorFound);
+ var current = HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(value, index, this.SupportsMultipleValues, out separatorFound);
- if (separatorFound && !SupportsMultipleValues)
+ if (separatorFound && !this.SupportsMultipleValues)
{
return false; // leading separators not allowed if we don't support multiple values.
}
if (current == value.Length)
{
- if (SupportsMultipleValues)
+ if (this.SupportsMultipleValues)
{
index = current;
}
- return SupportsMultipleValues;
+ return this.SupportsMultipleValues;
}
T result;
- var length = GetParsedValueLength(value, current, out result);
+ var length = this.GetParsedValueLength(value, current, out result);
if (length == 0)
{
@@ -65,10 +65,10 @@ public sealed override bool TryParseValue(string value, ref int index, out T par
}
current = current + length;
- current = HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(value, current, SupportsMultipleValues, out separatorFound);
+ current = HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(value, current, this.SupportsMultipleValues, out separatorFound);
// If we support multiple values and we've not reached the end of the string, then we must have a separator.
- if ((separatorFound && !SupportsMultipleValues) || (!separatorFound && (current < value.Length)))
+ if ((separatorFound && !this.SupportsMultipleValues) || (!separatorFound && (current < value.Length)))
{
return false;
}
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/GenericHeaderParser.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/GenericHeaderParser.cs
index 46b0f86848c..78b90508f75 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/GenericHeaderParser.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/GenericHeaderParser.cs
@@ -37,7 +37,7 @@ internal GenericHeaderParser(bool supportsMultipleValues, GetParsedValueLengthDe
protected override int GetParsedValueLength(string value, int startIndex, out T parsedValue)
{
- return getParsedValueLength(value, startIndex, out parsedValue);
+ return this.getParsedValueLength(value, startIndex, out parsedValue);
}
}
}
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpHeaderParser.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpHeaderParser.cs
index 2685734f40a..435eee12c07 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpHeaderParser.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpHeaderParser.cs
@@ -27,7 +27,7 @@ protected HttpHeaderParser(bool supportsMultipleValues)
public bool SupportsMultipleValues
{
- get { return supportsMultipleValues; }
+ get { return this.supportsMultipleValues; }
}
// If a parser supports multiple values, a call to ParseValue/TryParseValue should return a value for 'index'
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpParseResult.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpParseResult.cs
index 05f20f0de1e..a0105e9b4cc 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpParseResult.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpParseResult.cs
@@ -20,7 +20,7 @@ namespace Microsoft.AspNet.TelemetryCorrelation
internal enum HttpParseResult
{
///
- /// Parsed succesfully.
+ /// Parsed successfully.
///
Parsed,
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpRuleParser.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpRuleParser.cs
index fc24d5adb63..de5e3339e27 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpRuleParser.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/HttpRuleParser.cs
@@ -133,7 +133,7 @@ internal static HttpParseResult GetQuotedPairLength(string input, int startIndex
return HttpParseResult.NotParsed;
}
- // Quoted-char has 2 characters. Check wheter there are 2 chars left ('\' + char)
+ // Quoted-char has 2 characters. Check whether there are 2 chars left ('\' + char)
// If so, check whether the character is in the range 0-127. If not, it's an invalid value.
if ((startIndex + 2 > input.Length) || (input[startIndex + 1] > 127))
{
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/NameValueHeaderValue.cs b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/NameValueHeaderValue.cs
index 3ab7812bb92..a0dd899445b 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Internal/NameValueHeaderValue.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Internal/NameValueHeaderValue.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,12 +38,12 @@ private NameValueHeaderValue()
public string Name
{
- get { return name; }
+ get { return this.name; }
}
public string Value
{
- get { return value; }
+ get { return this.value; }
}
public static bool TryParse(string input, out NameValueHeaderValue parsedValue)
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/Microsoft.AspNet.TelemetryCorrelation.csproj b/src/Microsoft.AspNet.TelemetryCorrelation/Microsoft.AspNet.TelemetryCorrelation.csproj
index 1d119876928..ed41c1df670 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/Microsoft.AspNet.TelemetryCorrelation.csproj
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/Microsoft.AspNet.TelemetryCorrelation.csproj
@@ -1,85 +1,19 @@
-
-
+
- {4C8E592C-C532-4CF2-80EF-3BDD0D788D12}
- Library
- Properties
- Microsoft.AspNet.TelemetryCorrelation
- Microsoft.AspNet.TelemetryCorrelation
- net45
- 512
- true
- $(OutputPath)$(AssemblyName).xml
- ..\..\
- Microsoft.AspNet.TelemetryCorrelation.ruleset
- true
- prompt
- 4
- true
- $(OutputPath)/$(TargetFramework)/$(AssemblyName).xml
-
-
- true
- $(RepositoryRoot)tools\35MSSharedLib1024.snk
- $(DefineConstants);PUBLIC_RELEASE
-
-
- false
- $(RepositoryRoot)tools\Debug.snk
-
-
- full
- false
- $(DefineConstants);DEBUG;TRACE
-
-
- pdbonly
- true
- $(DefineConstants);TRACE
-
-
- Microsoft Corporation
-
- True
- True
- snupkg
-
- Microsoft.AspNet.TelemetryCorrelation
-
-
- Microsoft
- Microsoft Asp.Net telemetry correlation
+ net461
A module that instruments incoming request with System.Diagnostics.Activity and notifies listeners with DiagnosticsSource.
- © Microsoft Corporation. All rights reserved.
- Apache-2.0
- http://www.asp.net/
- http://go.microsoft.com/fwlink/?LinkID=288859
- Diagnostics DiagnosticSource Correlation Activity ASP.NET
- https://github.com/aspnet/Microsoft.AspNet.TelemetryCorrelation/
- Git
- Dependency
- content
+
+ $(NoWarn),1591,CS0618
+ core-
+
-
-
- All
-
-
- All
-
-
- All
-
-
- All
-
-
-
-
-
+
+
diff --git a/src/Microsoft.AspNet.TelemetryCorrelation/TelemetryCorrelationHttpModule.cs b/src/Microsoft.AspNet.TelemetryCorrelation/TelemetryCorrelationHttpModule.cs
index 7cc233efaa8..86f985184d0 100644
--- a/src/Microsoft.AspNet.TelemetryCorrelation/TelemetryCorrelationHttpModule.cs
+++ b/src/Microsoft.AspNet.TelemetryCorrelation/TelemetryCorrelationHttpModule.cs
@@ -56,9 +56,9 @@ public void Dispose()
///
public void Init(HttpApplication context)
{
- context.BeginRequest += Application_BeginRequest;
- context.EndRequest += Application_EndRequest;
- context.Error += Application_Error;
+ context.BeginRequest += this.Application_BeginRequest;
+ context.EndRequest += this.Application_EndRequest;
+ context.Error += this.Application_Error;
// OnExecuteRequestStep is availabile starting with 4.7.1
// If this is executed in 4.7.1 runtime (regardless of targeted .NET version),
@@ -67,7 +67,7 @@ public void Init(HttpApplication context)
{
try
{
- onStepMethodInfo.Invoke(context, new object[] { (Action)OnExecuteRequestStep });
+ onStepMethodInfo.Invoke(context, new object[] { (Action)this.OnExecuteRequestStep });
}
catch (Exception e)
{
@@ -76,7 +76,7 @@ public void Init(HttpApplication context)
}
else
{
- context.PreRequestHandlerExecute += Application_PreRequestHandlerExecute;
+ context.PreRequestHandlerExecute += this.Application_PreRequestHandlerExecute;
}
}
@@ -106,7 +106,7 @@ private void Application_BeginRequest(object sender, EventArgs e)
{
var context = ((HttpApplication)sender).Context;
AspNetTelemetryCorrelationEventSource.Log.TraceCallback("Application_BeginRequest");
- ActivityHelper.CreateRootActivity(context, ParseHeaders);
+ ActivityHelper.CreateRootActivity(context, this.ParseHeaders);
context.Items[BeginCalledFlag] = true;
}
@@ -141,7 +141,7 @@ private void Application_EndRequest(object sender, EventArgs e)
else
{
// Activity has never been started
- ActivityHelper.CreateRootActivity(context, ParseHeaders);
+ ActivityHelper.CreateRootActivity(context, this.ParseHeaders);
}
}
@@ -162,7 +162,7 @@ private void Application_Error(object sender, EventArgs e)
{
if (!context.Items.Contains(BeginCalledFlag))
{
- ActivityHelper.CreateRootActivity(context, ParseHeaders);
+ ActivityHelper.CreateRootActivity(context, this.ParseHeaders);
}
ActivityHelper.WriteActivityException(context.Items, exception);