Skip to content

Remove KestrelEventSource events with broken ActivityId tracking #26684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,54 +144,12 @@ public void ConnectionRejected(string connectionId)
public void ConnectionQueuedStart(BaseConnectionContext connection)
{
Interlocked.Increment(ref _connectionQueueLength);
if (IsEnabled())
{
ConnectionQueuedStart(
connection.ConnectionId,
connection.LocalEndPoint?.ToString(),
connection.RemoteEndPoint?.ToString());
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(6, Level = EventLevel.Informational)]
private void ConnectionQueuedStart(string connectionId,
string localEndPoint,
string remoteEndPoint)
{
WriteEvent(
6,
connectionId,
localEndPoint,
remoteEndPoint
);
}

[NonEvent]
public void ConnectionQueuedStop(BaseConnectionContext connection)
{
Interlocked.Decrement(ref _connectionQueueLength);
if (IsEnabled())
{
ConnectionQueuedStop(
connection.ConnectionId,
connection.LocalEndPoint?.ToString(),
connection.RemoteEndPoint?.ToString());
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(7, Level = EventLevel.Informational)]
private void ConnectionQueuedStop(string connectionId,
string localEndPoint,
string remoteEndPoint)
{
WriteEvent(
7,
connectionId,
localEndPoint,
remoteEndPoint
);
}

[NonEvent]
Expand Down Expand Up @@ -245,70 +203,24 @@ public void TlsHandshakeFailed(string connectionId)
public void RequestQueuedStart(HttpProtocol httpProtocol, string httpVersion)
{
Interlocked.Increment(ref _httpRequestQueueLength);
// avoid allocating the trace identifier unless logging is enabled
if (IsEnabled())
{
RequestQueuedStart(httpProtocol.ConnectionIdFeature, httpProtocol.TraceIdentifier, httpVersion);
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(11, Level = EventLevel.Informational)]
private void RequestQueuedStart(string connectionId, string requestId, string httpVersion)
{
WriteEvent(11, connectionId, requestId, httpVersion);
}

[NonEvent]
public void RequestQueuedStop(HttpProtocol httpProtocol, string httpVersion)
{
Interlocked.Decrement(ref _httpRequestQueueLength);
// avoid allocating the trace identifier unless logging is enabled
if (IsEnabled())
{
RequestQueuedStop(httpProtocol.ConnectionIdFeature, httpProtocol.TraceIdentifier, httpVersion);
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(12, Level = EventLevel.Informational)]
private void RequestQueuedStop(string connectionId, string requestId, string httpVersion)
{
WriteEvent(12, connectionId, requestId, httpVersion);
}

[NonEvent]
public void RequestUpgradedStart(HttpProtocol httpProtocol)
{
Interlocked.Increment(ref _currentUpgradedHttpRequests);
if (IsEnabled())
{
RequestUpgradedStart(httpProtocol.ConnectionIdFeature, httpProtocol.TraceIdentifier, httpProtocol.HttpVersion, httpProtocol.Path, httpProtocol.MethodText);
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(13, Level = EventLevel.Informational)]
private void RequestUpgradedStart(string connectionId, string requestId, string httpVersion, string path, string method)
{
WriteEvent(13, connectionId, requestId, httpVersion, path, method);
}

[NonEvent]
public void RequestUpgradedStop(HttpProtocol httpProtocol)
{
Interlocked.Decrement(ref _currentUpgradedHttpRequests);
if (IsEnabled())
{
RequestUpgradedStop(httpProtocol.ConnectionIdFeature, httpProtocol.TraceIdentifier, httpProtocol.HttpVersion, httpProtocol.Path, httpProtocol.MethodText);
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
[Event(14, Level = EventLevel.Informational)]
private void RequestUpgradedStop(string connectionId, string requestId, string httpVersion, string path, string method)
{
WriteEvent(14, connectionId, requestId, httpVersion, path, method);
}

protected override void OnEventCommand(EventCommandEventArgs command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public HandshakeTests()

[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.Windows)]
// Mac SslStream is missing ALPN support: https://github.com/dotnet/corefx/issues/30492
// Mac SslStream is missing ALPN support: https://github.com/dotnet/runtime/issues/27727
public void TlsAndHttp2NotSupportedOnMac()
{
var ex = Assert.Throws<NotSupportedException>(() => new TestServer(context =>
Expand Down Expand Up @@ -79,7 +79,7 @@ public void TlsAndHttp2NotSupportedOnWin7()
}

[ConditionalFact]
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
}

[ConditionalFact]
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
public async Task TlsAlpnHandshakeSelectsHttp2()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2
{
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/runtime/issues/27727")]
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
public class ShutdownTests : TestApplicationErrorLoggerLoggedTest
{
Expand Down
Loading