Skip to content
New issue

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

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

Already on GitHub? # to your account

Sanitize HTTP headers when the agent reads them #1286

Merged
merged 2 commits into from
May 4, 2021
Merged

Sanitize HTTP headers when the agent reads them #1286

merged 2 commits into from
May 4, 2021

Conversation

gregkalapos
Copy link
Contributor

This PR changes a few things around HTTP header sanitization

  • In case of HTTP calls, when the agent reads the headers, we already apply sanitization (prior to this, this only happened right before serialization).
  • Also added a filter to sanitize HTTP headers on the captured errors.

@gregkalapos gregkalapos self-assigned this May 3, 2021
@apmmachine
Copy link
Contributor

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1286 opened

  • Start Time: 2021-05-03T17:47:25.568+0000

  • Duration: 47 min 54 sec

  • Commit: 4001fdd

Test stats 🧪

Test Results
Failed 114
Passed 19280
Skipped 92
Total 19486

Trends 🧪

Image of Build Times

Image of Tests

Test errors 114

Expand to view the tests failures

> Show only the first 10 test failures

Initializing / Parallel / Windows .NET Core / Test / CgroupMetricsProviderTests.Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests.TestUnlimitedCgroup2 – Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests
    Expand to view the error details

     System.ArgumentNullException : Value cannot be null.
    Parameter name: source 
    

    Expand to view the stacktrace

     System.ArgumentNullException : Value cannot be null.
    Parameter name: source
    Stack Trace:
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests.TestUnlimitedCgroup2() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests\Metrics\CgroupMetricsProviderTests.cs:line 101 
    

Initializing / Parallel / Windows .NET Core / Test / CentralConfigFetcherTests.Elastic.Apm.Tests.BackendCommTests.CentralConfig.CentralConfigFetcherTests.Should_Update_Logger_That_Is_ILogLevelSwitchable – Elastic.Apm.Tests.BackendCommTests.CentralConfig.CentralConfigFetcherTests
    Expand to view the error details

     Expected object to be Error, but found Trace. 
    

    Expand to view the stacktrace

     Expected object to be Error, but found Trace.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
       at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs)
       at Elastic.Apm.Tests.BackendCommTests.CentralConfig.CentralConfigFetcherTests.Should_Update_Logger_That_Is_ILogLevelSwitchable() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests\BackendCommTests\CentralConfig\CentralConfigFetcherTests.cs:line 72
    Standard Output:
        Elastic APM .NET Tests> 249> Xunit> [2021-05-03 18:15:36.244 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.Tests.BackendCommTests.CentralConfig.CentralConfigFetcherTests.Should_Update_Logger_That_Is_ILogLevelSwitchable...
        Elastic APM .NET Tests> 249> Xunit> [2021-05-03 18:16:36.626 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.Tests.BackendCommTests.CentralConfig.CentralConfigFetcherTests.Should_Update_Logger_That_Is_ILogLevelSwitchable 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureHeadersConfigDisabledTest.Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test – Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest
    Expand to view the error details

     Expected response.StatusCode to be 200, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 200, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureHeadersConfigDisabledTest.cs:line 25
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 1> Xunit> [2021-05-03 18:22:20.610 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "", SpansCount = 0, StatusCode = 200, ... })...
        Elastic APM .NET Tests> 1> Xunit> [2021-05-03 18:22:23.909 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 200, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 1> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 1> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 1> Xunit> <head>
        Elastic APM .NET Tests> 1> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 1> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 1> Xunit> <!--
        Elastic APM .NET Tests> 1> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 1> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 1> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 1> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 1> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 1> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 1> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 1> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 1> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 1> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 1> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 1> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 1> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 1> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 1> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 1> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 1> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 1> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 1> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 1> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 1> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 1> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 1> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 1> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 1> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 1> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 1> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 1> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 1> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 1> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 1> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 1> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 1> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 1> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 1> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 1> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 1> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 1> Xunit> -->
        Elastic APM .NET Tests> 1> Xunit> </style>
        Elastic APM .NET Tests> 1> Xunit>
        Elastic APM .NET Tests> 1> Xunit> </head>
        Elastic APM .NET Tests> 1> Xunit> <body>
        Elastic APM .NET Tests> 1> Xunit> <div id="content">
        Elastic APM .NET Tests> 1> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 1> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 1> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 1> Xunit> </div>
        Elastic APM .NET Tests> 1> Xunit>
        Elastic APM .NET Tests> 1> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 1> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 1> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 1> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 1> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 1> Xunit> </td></tr>
        Elastic APM .NET Tests> 1> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 1> Xunit>    </table>
        Elastic APM .NET Tests> 1> Xunit>   </div>
        Elastic APM .NET Tests> 1> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 1> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 1> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 1> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 1> Xunit>
        Elastic APM .NET Tests> 1> Xunit>    </table>
        Elastic APM .NET Tests> 1> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 1> Xunit>   </div>
        Elastic APM .NET Tests> 1> Xunit>  </fieldset>
        Elastic APM .NET Tests> 1> Xunit> </div>
        Elastic APM .NET Tests> 1> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 1> Xunit>     <fieldset>
        Elastic APM .NET Tests> 1> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 1> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 1> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 1> Xunit> </code></pre>
        Elastic APM .NET Tests> 1> Xunit>     </fieldset>
        Elastic APM .NET Tests> 1> Xunit>   </div>
        Elastic APM .NET Tests> 1> Xunit>
        Elastic APM .NET Tests> 1> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 1> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 1> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 1> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 1> Xunit>
        Elastic APM .NET Tests> 1> Xunit>  </fieldset>
        Elastic APM .NET Tests> 1> Xunit> </div>
        Elastic APM .NET Tests> 1> Xunit> </div>
        Elastic APM .NET Tests> 1> Xunit> </body>
        Elastic APM .NET Tests> 1> Xunit> </html>
        Elastic APM .NET Tests> 1> Xunit> [2021-05-03 18:22:25.369 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "", SpansCount = 0, StatusCode = 200, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureHeadersConfigDisabledTest.Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test – Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest
    Expand to view the error details

     Expected response.StatusCode to be 200, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 200, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureHeadersConfigDisabledTest.cs:line 25
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 2> Xunit> [2021-05-03 18:22:25.394 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home", SpansCount = 0, StatusCode = 200, ... })...
        Elastic APM .NET Tests> 2> Xunit> [2021-05-03 18:22:27.916 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 200, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 2> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 2> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 2> Xunit> <head>
        Elastic APM .NET Tests> 2> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 2> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 2> Xunit> <!--
        Elastic APM .NET Tests> 2> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 2> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 2> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 2> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 2> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 2> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 2> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 2> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 2> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 2> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 2> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 2> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 2> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 2> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 2> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 2> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 2> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 2> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 2> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 2> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 2> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 2> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 2> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 2> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 2> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 2> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 2> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 2> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 2> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 2> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 2> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 2> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 2> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 2> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 2> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 2> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 2> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 2> Xunit> -->
        Elastic APM .NET Tests> 2> Xunit> </style>
        Elastic APM .NET Tests> 2> Xunit>
        Elastic APM .NET Tests> 2> Xunit> </head>
        Elastic APM .NET Tests> 2> Xunit> <body>
        Elastic APM .NET Tests> 2> Xunit> <div id="content">
        Elastic APM .NET Tests> 2> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 2> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 2> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 2> Xunit> </div>
        Elastic APM .NET Tests> 2> Xunit>
        Elastic APM .NET Tests> 2> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 2> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 2> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 2> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 2> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 2> Xunit> </td></tr>
        Elastic APM .NET Tests> 2> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 2> Xunit>    </table>
        Elastic APM .NET Tests> 2> Xunit>   </div>
        Elastic APM .NET Tests> 2> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 2> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 2> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/Home</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\Home</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 2> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 2> Xunit>
        Elastic APM .NET Tests> 2> Xunit>    </table>
        Elastic APM .NET Tests> 2> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 2> Xunit>   </div>
        Elastic APM .NET Tests> 2> Xunit>  </fieldset>
        Elastic APM .NET Tests> 2> Xunit> </div>
        Elastic APM .NET Tests> 2> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 2> Xunit>     <fieldset>
        Elastic APM .NET Tests> 2> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 2> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 2> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 2> Xunit> </code></pre>
        Elastic APM .NET Tests> 2> Xunit>     </fieldset>
        Elastic APM .NET Tests> 2> Xunit>   </div>
        Elastic APM .NET Tests> 2> Xunit>
        Elastic APM .NET Tests> 2> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 2> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 2> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 2> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 2> Xunit>
        Elastic APM .NET Tests> 2> Xunit>  </fieldset>
        Elastic APM .NET Tests> 2> Xunit> </div>
        Elastic APM .NET Tests> 2> Xunit> </div>
        Elastic APM .NET Tests> 2> Xunit> </body>
        Elastic APM .NET Tests> 2> Xunit> </html>
        Elastic APM .NET Tests> 2> Xunit> [2021-05-03 18:22:29.329 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home", SpansCount = 0, StatusCode = 200, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureHeadersConfigDisabledTest.Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test – Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest
    Expand to view the error details

     Expected response.StatusCode to be 200, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 200, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureHeadersConfigDisabledTest.cs:line 25
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 3> Xunit> [2021-05-03 18:22:29.330 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home/Contact", SpansCount = 2, StatusCode = 200, ... })...
        Elastic APM .NET Tests> 3> Xunit> [2021-05-03 18:22:31.050 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 200, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 3> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 3> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 3> Xunit> <head>
        Elastic APM .NET Tests> 3> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 3> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 3> Xunit> <!--
        Elastic APM .NET Tests> 3> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 3> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 3> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 3> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 3> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 3> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 3> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 3> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 3> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 3> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 3> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 3> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 3> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 3> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 3> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 3> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 3> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 3> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 3> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 3> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 3> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 3> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 3> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 3> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 3> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 3> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 3> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 3> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 3> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 3> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 3> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 3> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 3> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 3> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 3> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 3> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 3> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 3> Xunit> -->
        Elastic APM .NET Tests> 3> Xunit> </style>
        Elastic APM .NET Tests> 3> Xunit>
        Elastic APM .NET Tests> 3> Xunit> </head>
        Elastic APM .NET Tests> 3> Xunit> <body>
        Elastic APM .NET Tests> 3> Xunit> <div id="content">
        Elastic APM .NET Tests> 3> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 3> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 3> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 3> Xunit> </div>
        Elastic APM .NET Tests> 3> Xunit>
        Elastic APM .NET Tests> 3> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 3> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 3> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 3> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 3> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 3> Xunit> </td></tr>
        Elastic APM .NET Tests> 3> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 3> Xunit>    </table>
        Elastic APM .NET Tests> 3> Xunit>   </div>
        Elastic APM .NET Tests> 3> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 3> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 3> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/Home/Contact</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\Home\Contact</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 3> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 3> Xunit>
        Elastic APM .NET Tests> 3> Xunit>    </table>
        Elastic APM .NET Tests> 3> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 3> Xunit>   </div>
        Elastic APM .NET Tests> 3> Xunit>  </fieldset>
        Elastic APM .NET Tests> 3> Xunit> </div>
        Elastic APM .NET Tests> 3> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 3> Xunit>     <fieldset>
        Elastic APM .NET Tests> 3> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 3> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 3> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 3> Xunit> </code></pre>
        Elastic APM .NET Tests> 3> Xunit>     </fieldset>
        Elastic APM .NET Tests> 3> Xunit>   </div>
        Elastic APM .NET Tests> 3> Xunit>
        Elastic APM .NET Tests> 3> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 3> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 3> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 3> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 3> Xunit>
        Elastic APM .NET Tests> 3> Xunit>  </fieldset>
        Elastic APM .NET Tests> 3> Xunit> </div>
        Elastic APM .NET Tests> 3> Xunit> </div>
        Elastic APM .NET Tests> 3> Xunit> </body>
        Elastic APM .NET Tests> 3> Xunit> </html>
        Elastic APM .NET Tests> 3> Xunit> [2021-05-03 18:22:32.452 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home/Contact", SpansCount = 2, StatusCode = 200, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureHeadersConfigDisabledTest.Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test – Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest
    Expand to view the error details

     System.InvalidOperationException : The given header was not found. 
    

    Expand to view the stacktrace

     System.InvalidOperationException : The given header was not found.
    Stack Trace:
       at System.Net.Http.Headers.HttpHeaders.GetValues(HeaderDescriptor descriptor)
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 315
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureHeadersConfigDisabledTest.cs:line 25
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 4> Xunit> [2021-05-03 18:22:32.453 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 2, Outcome = Failure, RelativePath = "Home/CustomSpanThrows", SpansCount = 1, StatusCode = 500, ... })...
        Elastic APM .NET Tests> 4> Xunit> [2021-05-03 18:22:35.927 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 2, Outcome = Failure, RelativePath = "Home/CustomSpanThrows", SpansCount = 1, StatusCode = 500, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureHeadersConfigDisabledTest.Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test – Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest
    Expand to view the error details

     Expected response.StatusCode to be 404, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 404, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureHeadersConfigDisabledTest.cs:line 25
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 5> Xunit> [2021-05-03 18:22:35.928 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 1, Outcome = Success, RelativePath = "dummy_URL_path_to_page_that_does_not_exist", SpansCount = 0, StatusCode = 404, ... })...
        Elastic APM .NET Tests> 5> Xunit> [2021-05-03 18:22:37.438 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 404, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 5> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 5> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 5> Xunit> <head>
        Elastic APM .NET Tests> 5> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 5> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 5> Xunit> <!--
        Elastic APM .NET Tests> 5> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 5> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 5> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 5> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 5> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 5> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 5> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 5> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 5> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 5> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 5> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 5> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 5> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 5> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 5> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 5> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 5> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 5> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 5> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 5> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 5> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 5> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 5> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 5> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 5> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 5> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 5> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 5> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 5> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 5> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 5> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 5> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 5> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 5> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 5> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 5> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 5> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 5> Xunit> -->
        Elastic APM .NET Tests> 5> Xunit> </style>
        Elastic APM .NET Tests> 5> Xunit>
        Elastic APM .NET Tests> 5> Xunit> </head>
        Elastic APM .NET Tests> 5> Xunit> <body>
        Elastic APM .NET Tests> 5> Xunit> <div id="content">
        Elastic APM .NET Tests> 5> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 5> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 5> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 5> Xunit> </div>
        Elastic APM .NET Tests> 5> Xunit>
        Elastic APM .NET Tests> 5> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 5> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 5> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 5> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 5> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 5> Xunit> </td></tr>
        Elastic APM .NET Tests> 5> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 5> Xunit>    </table>
        Elastic APM .NET Tests> 5> Xunit>   </div>
        Elastic APM .NET Tests> 5> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 5> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 5> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/dummy_URL_path_to_page_that_does_not_exist</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\dummy_URL_path_to_page_that_does_not_exist</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 5> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 5> Xunit>
        Elastic APM .NET Tests> 5> Xunit>    </table>
        Elastic APM .NET Tests> 5> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 5> Xunit>   </div>
        Elastic APM .NET Tests> 5> Xunit>  </fieldset>
        Elastic APM .NET Tests> 5> Xunit> </div>
        Elastic APM .NET Tests> 5> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 5> Xunit>     <fieldset>
        Elastic APM .NET Tests> 5> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 5> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 5> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 5> Xunit> </code></pre>
        Elastic APM .NET Tests> 5> Xunit>     </fieldset>
        Elastic APM .NET Tests> 5> Xunit>   </div>
        Elastic APM .NET Tests> 5> Xunit>
        Elastic APM .NET Tests> 5> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 5> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 5> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 5> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 5> Xunit>
        Elastic APM .NET Tests> 5> Xunit>  </fieldset>
        Elastic APM .NET Tests> 5> Xunit> </div>
        Elastic APM .NET Tests> 5> Xunit> </div>
        Elastic APM .NET Tests> 5> Xunit> </body>
        Elastic APM .NET Tests> 5> Xunit> </html>
        Elastic APM .NET Tests> 5> Xunit> [2021-05-03 18:22:38.850 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureHeadersConfigDisabledTest.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 1, Outcome = Success, RelativePath = "dummy_URL_path_to_page_that_does_not_exist", SpansCount = 0, StatusCode = 404, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CaptureUserTests.Elastic.Apm.AspNetFullFramework.Tests.CaptureUserTests.User_Should_Contain_Id_And_Email_When_Using_Authenticated_ClaimsPrincipal – Elastic.Apm.AspNetFullFramework.Tests.CaptureUserTests
    Expand to view the error details

     System.ArgumentNullException : Value cannot be null.
    Parameter name: form 
    

    Expand to view the stacktrace

     System.ArgumentNullException : Value cannot be null.
    Parameter name: form
    Stack Trace:
       at AngleSharp.Html.Dom.FormExtensions.SetValues(IHtmlFormElement form, IDictionary`2 fields, Boolean createMissing)
       at Elastic.Apm.AspNetFullFramework.Tests.CaptureUserTests.User_Should_Contain_Id_And_Email_When_Using_Authenticated_ClaimsPrincipal() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CaptureUserTests.cs:line 38
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 6> Xunit> [2021-05-03 18:22:38.865 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CaptureUserTests.User_Should_Contain_Id_And_Email_When_Using_Authenticated_ClaimsPrincipal...
        Elastic APM .NET Tests> 6> Xunit> [2021-05-03 18:22:42.330 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CaptureUserTests.User_Should_Contain_Id_And_Email_When_Using_Authenticated_ClaimsPrincipal 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CustomEnvironmentViaSettings.Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test – Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings
    Expand to view the error details

     Expected response.StatusCode to be 200, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 200, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CustomEnvironmentViaSettings.cs:line 27
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 7> Xunit> [2021-05-03 18:22:42.334 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "", SpansCount = 0, StatusCode = 200, ... })...
        Elastic APM .NET Tests> 7> Xunit> [2021-05-03 18:22:44.047 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 200, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 7> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 7> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 7> Xunit> <head>
        Elastic APM .NET Tests> 7> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 7> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 7> Xunit> <!--
        Elastic APM .NET Tests> 7> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 7> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 7> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 7> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 7> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 7> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 7> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 7> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 7> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 7> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 7> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 7> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 7> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 7> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 7> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 7> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 7> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 7> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 7> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 7> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 7> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 7> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 7> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 7> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 7> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 7> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 7> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 7> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 7> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 7> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 7> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 7> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 7> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 7> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 7> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 7> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 7> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 7> Xunit> -->
        Elastic APM .NET Tests> 7> Xunit> </style>
        Elastic APM .NET Tests> 7> Xunit>
        Elastic APM .NET Tests> 7> Xunit> </head>
        Elastic APM .NET Tests> 7> Xunit> <body>
        Elastic APM .NET Tests> 7> Xunit> <div id="content">
        Elastic APM .NET Tests> 7> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 7> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 7> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 7> Xunit> </div>
        Elastic APM .NET Tests> 7> Xunit>
        Elastic APM .NET Tests> 7> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 7> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 7> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 7> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 7> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 7> Xunit> </td></tr>
        Elastic APM .NET Tests> 7> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 7> Xunit>    </table>
        Elastic APM .NET Tests> 7> Xunit>   </div>
        Elastic APM .NET Tests> 7> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 7> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 7> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 7> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 7> Xunit>
        Elastic APM .NET Tests> 7> Xunit>    </table>
        Elastic APM .NET Tests> 7> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 7> Xunit>   </div>
        Elastic APM .NET Tests> 7> Xunit>  </fieldset>
        Elastic APM .NET Tests> 7> Xunit> </div>
        Elastic APM .NET Tests> 7> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 7> Xunit>     <fieldset>
        Elastic APM .NET Tests> 7> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 7> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 7> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 7> Xunit> </code></pre>
        Elastic APM .NET Tests> 7> Xunit>     </fieldset>
        Elastic APM .NET Tests> 7> Xunit>   </div>
        Elastic APM .NET Tests> 7> Xunit>
        Elastic APM .NET Tests> 7> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 7> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 7> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 7> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 7> Xunit>
        Elastic APM .NET Tests> 7> Xunit>  </fieldset>
        Elastic APM .NET Tests> 7> Xunit> </div>
        Elastic APM .NET Tests> 7> Xunit> </div>
        Elastic APM .NET Tests> 7> Xunit> </body>
        Elastic APM .NET Tests> 7> Xunit> </html>
        Elastic APM .NET Tests> 7> Xunit> [2021-05-03 18:22:45.449 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "", SpansCount = 0, StatusCode = 200, ... }) 
    

Initializing / Parallel / Windows .NET Framework / IIS Tests / CustomEnvironmentViaSettings.Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test – Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings
    Expand to view the error details

     Expected response.StatusCode to be 200, but found InternalServerError. 
    

    Expand to view the stacktrace

     Expected response.StatusCode to be 200, but found InternalServerError.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Primitives\ObjectAssertions.cs:line 38
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 306
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponseImpl(HttpRequestMessage httpRequestMessage, Int32 expectedStatusCode) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 312
       at Elastic.Apm.AspNetFullFramework.Tests.TestsBase.SendGetRequestToSampleAppAndVerifyResponse(Uri uri, Int32 expectedStatusCode, Boolean timeHttpCall, Boolean addTraceContextHeaders) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\TestsBase.cs:line 275
       at Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(SampleAppUrlPathData sampleAppUrlPathData) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetFullFramework.Tests\CustomEnvironmentViaSettings.cs:line 27
    --- End of stack trace from previous location where exception was thrown ---
    Standard Output:
        Elastic APM .NET Tests> 8> Xunit> [2021-05-03 18:22:45.450 +00:00][Info] - {LoggingTestBase} Starting test: Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home", SpansCount = 0, StatusCode = 200, ... })...
        Elastic APM .NET Tests> 8> Xunit> [2021-05-03 18:22:46.988 +00:00][Error] - {AspNetFullFramework.Tests.TestsBase} Expected response.StatusCode to be 200, but found InternalServerError.. Response content:
        Elastic APM .NET Tests> 8> Xunit> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        Elastic APM .NET Tests> 8> Xunit> <html xmlns="http://www.w3.org/1999/xhtml">
        Elastic APM .NET Tests> 8> Xunit> <head>
        Elastic APM .NET Tests> 8> Xunit> <title>IIS 10.0 Detailed Error - 500.19 - Internal Server Error</title>
        Elastic APM .NET Tests> 8> Xunit> <style type="text/css">
        Elastic APM .NET Tests> 8> Xunit> <!--
        Elastic APM .NET Tests> 8> Xunit> body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}
        Elastic APM .NET Tests> 8> Xunit> code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
        Elastic APM .NET Tests> 8> Xunit> .config_source code{font-size:.8em;color:#000000;}
        Elastic APM .NET Tests> 8> Xunit> pre{margin:0;font-size:1.4em;word-wrap:break-word;}
        Elastic APM .NET Tests> 8> Xunit> ul,ol{margin:10px 0 10px 5px;}
        Elastic APM .NET Tests> 8> Xunit> ul.first,ol.first{margin-top:5px;}
        Elastic APM .NET Tests> 8> Xunit> fieldset{padding:0 15px 10px 15px;word-break:break-all;}
        Elastic APM .NET Tests> 8> Xunit> .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
        Elastic APM .NET Tests> 8> Xunit> legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
        Elastic APM .NET Tests> 8> Xunit> legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;
        Elastic APM .NET Tests> 8> Xunit> font-weight:bold;font-size:1em;}
        Elastic APM .NET Tests> 8> Xunit> a:link,a:visited{color:#007EFF;font-weight:bold;}
        Elastic APM .NET Tests> 8> Xunit> a:hover{text-decoration:none;}
        Elastic APM .NET Tests> 8> Xunit> h1{font-size:2.4em;margin:0;color:#FFF;}
        Elastic APM .NET Tests> 8> Xunit> h2{font-size:1.7em;margin:0;color:#CC0000;}
        Elastic APM .NET Tests> 8> Xunit> h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
        Elastic APM .NET Tests> 8> Xunit> h4{font-size:1.2em;margin:10px 0 5px 0;
        Elastic APM .NET Tests> 8> Xunit> }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
        Elastic APM .NET Tests> 8> Xunit>  color:#FFF;background-color:#5C87B2;
        Elastic APM .NET Tests> 8> Xunit> }#content{margin:0 0 0 2%;position:relative;}
        Elastic APM .NET Tests> 8> Xunit> .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
        Elastic APM .NET Tests> 8> Xunit> .content-container p{margin:0 0 10px 0;
        Elastic APM .NET Tests> 8> Xunit> }#details-left{width:35%;float:left;margin-right:2%;
        Elastic APM .NET Tests> 8> Xunit> }#details-right{width:63%;float:left;overflow:hidden;
        Elastic APM .NET Tests> 8> Xunit> }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
        Elastic APM .NET Tests> 8> Xunit>  background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;
        Elastic APM .NET Tests> 8> Xunit>  font-size:1em;color:#FFF;text-align:right;
        Elastic APM .NET Tests> 8> Xunit> }#server_version p{margin:5px 0;}
        Elastic APM .NET Tests> 8> Xunit> table{margin:4px 0 4px 0;width:100%;border:none;}
        Elastic APM .NET Tests> 8> Xunit> td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}
        Elastic APM .NET Tests> 8> Xunit> th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}
        Elastic APM .NET Tests> 8> Xunit> thead th{background-color:#ebebeb;width:25%;
        Elastic APM .NET Tests> 8> Xunit> }#details-right th{width:20%;}
        Elastic APM .NET Tests> 8> Xunit> table tr.alt td,table tr.alt th{}
        Elastic APM .NET Tests> 8> Xunit> .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}
        Elastic APM .NET Tests> 8> Xunit> .clear{clear:both;}
        Elastic APM .NET Tests> 8> Xunit> .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}
        Elastic APM .NET Tests> 8> Xunit> -->
        Elastic APM .NET Tests> 8> Xunit> </style>
        Elastic APM .NET Tests> 8> Xunit>
        Elastic APM .NET Tests> 8> Xunit> </head>
        Elastic APM .NET Tests> 8> Xunit> <body>
        Elastic APM .NET Tests> 8> Xunit> <div id="content">
        Elastic APM .NET Tests> 8> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 8> Xunit>   <h3>HTTP Error 500.19 - Internal Server Error</h3>
        Elastic APM .NET Tests> 8> Xunit>   <h4>The requested page cannot be accessed because the related configuration data for the page is invalid.</h4>
        Elastic APM .NET Tests> 8> Xunit> </div>
        Elastic APM .NET Tests> 8> Xunit>
        Elastic APM .NET Tests> 8> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 8> Xunit>  <fieldset><h4>Detailed Error Information:</h4>
        Elastic APM .NET Tests> 8> Xunit>   <div id="details-left">
        Elastic APM .NET Tests> 8> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 8> Xunit>     <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;IIS Web Core</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;BeginRequest</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070005</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr class="alt"><th>Config Error</th><td>&nbsp;&nbsp;&nbsp;Cannot read configuration file due to insufficient permissions
        Elastic APM .NET Tests> 8> Xunit> </td></tr>
        Elastic APM .NET Tests> 8> Xunit> <tr><th>Config File</th><td>&nbsp;&nbsp;&nbsp;\\?\C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\web.config</td></tr>
        Elastic APM .NET Tests> 8> Xunit>    </table>
        Elastic APM .NET Tests> 8> Xunit>   </div>
        Elastic APM .NET Tests> 8> Xunit>   <div id="details-right">
        Elastic APM .NET Tests> 8> Xunit>    <table border="0" cellpadding="0" cellspacing="0">
        Elastic APM .NET Tests> 8> Xunit>     <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/Elastic.Apm.AspNetFullFramework.Tests.SampleApp/Home</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\sample\AspNetFullFrameworkSampleApp\Home</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 8> Xunit>     <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr>
        Elastic APM .NET Tests> 8> Xunit>
        Elastic APM .NET Tests> 8> Xunit>    </table>
        Elastic APM .NET Tests> 8> Xunit>    <div class="clear"></div>
        Elastic APM .NET Tests> 8> Xunit>   </div>
        Elastic APM .NET Tests> 8> Xunit>  </fieldset>
        Elastic APM .NET Tests> 8> Xunit> </div>
        Elastic APM .NET Tests> 8> Xunit>   <div class="config_source content-container">
        Elastic APM .NET Tests> 8> Xunit>     <fieldset>
        Elastic APM .NET Tests> 8> Xunit>     <h4>Config Source:</h4>
        Elastic APM .NET Tests> 8> Xunit>     <pre><code>   -1:
        Elastic APM .NET Tests> 8> Xunit> <span class="highlight-code">    0: </span>
        Elastic APM .NET Tests> 8> Xunit> </code></pre>
        Elastic APM .NET Tests> 8> Xunit>     </fieldset>
        Elastic APM .NET Tests> 8> Xunit>   </div>
        Elastic APM .NET Tests> 8> Xunit>
        Elastic APM .NET Tests> 8> Xunit> <div class="content-container">
        Elastic APM .NET Tests> 8> Xunit>  <fieldset><h4>More Information:</h4>
        Elastic APM .NET Tests> 8> Xunit>   This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
        Elastic APM .NET Tests> 8> Xunit>   <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,19,0x80070005,17763">View more information &raquo;</a></p>
        Elastic APM .NET Tests> 8> Xunit>
        Elastic APM .NET Tests> 8> Xunit>  </fieldset>
        Elastic APM .NET Tests> 8> Xunit> </div>
        Elastic APM .NET Tests> 8> Xunit> </div>
        Elastic APM .NET Tests> 8> Xunit> </body>
        Elastic APM .NET Tests> 8> Xunit> </html>
        Elastic APM .NET Tests> 8> Xunit> [2021-05-03 18:22:48.387 +00:00][Info] - {LoggingTestBase} Finished test: Elastic.Apm.AspNetFullFramework.Tests.CustomEnvironmentViaSettings.Test(sampleAppUrlPathData: SampleAppUrlPathData { ErrorsCount = 0, Outcome = Success, RelativePath = "Home", SpansCount = 0, StatusCode = 200, ... }) 
    

Steps errors 4

Expand to view the steps failures

Test IIS
  • Took 6 min 4 sec . View more details on here
  • Description: .ci/windows/test-iis.bat
Test & coverage
  • Took 14 min 15 sec . View more details on here
  • Description: .ci/windows/test.bat
Archive the artifacts
  • Took 0 min 0 sec . View more details on here
  • Description: [2021-05-03T18:21:24.764Z] Archiving artifacts withAzureCredentials: error hudson.AbortException: s
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: withAzureCredentials: error hudson.AbortException: script returned exit code 1

Log output

Expand to view the last 100 lines of log output

[2021-05-03T18:33:36.662Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Schema/ValidationEventArgs.cs. 
[2021-05-03T18:33:36.662Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Converters/StringEnumConverter.cs. 
[2021-05-03T18:33:36.742Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Converters/StringEnumConverter.cs. 
[2021-05-03T18:33:36.742Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs. 
[2021-05-03T18:33:36.827Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs. 
[2021-05-03T18:33:36.827Z] Starting copy source file Libraries/Newtonsoft.Json/Converters/StringEnumConverter.cs. 
[2021-05-03T18:33:36.907Z] Copied Libraries/Newtonsoft.Json/Converters/StringEnumConverter.cs. 
[2021-05-03T18:33:36.907Z] Starting copy source file Libraries/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs. 
[2021-05-03T18:33:36.984Z] Copied Libraries/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs. 
[2021-05-03T18:33:36.984Z] Starting copy source file Elastic.Apm/Config/AbstractConfigurationReader.cs. 
[2021-05-03T18:33:37.080Z] Copied Elastic.Apm/Config/AbstractConfigurationReader.cs. 
[2021-05-03T18:33:37.080Z] Starting copy source file Elastic.Apm/Filters/SpanStackTraceCapturingFilter.cs. 
[2021-05-03T18:33:37.152Z] Copied Elastic.Apm/Filters/SpanStackTraceCapturingFilter.cs. 
[2021-05-03T18:33:37.152Z] Starting copy source file Elastic.Apm/Helpers/ContractExtensions.cs. 
[2021-05-03T18:33:37.224Z] Copied Elastic.Apm/Helpers/ContractExtensions.cs. 
[2021-05-03T18:33:37.224Z] Starting copy source file Libraries/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs. 
[2021-05-03T18:33:37.311Z] Copied Libraries/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs. 
[2021-05-03T18:33:37.311Z] Starting copy source file Report/Serialization/MetricSetConverter.cs. 
[2021-05-03T18:33:37.391Z] Copied Report/Serialization/MetricSetConverter.cs. 
[2021-05-03T18:33:37.391Z] Starting copy source file Libraries/Newtonsoft.Json/Utilities/DynamicProxy.cs. 
[2021-05-03T18:33:37.467Z] Copied Libraries/Newtonsoft.Json/Utilities/DynamicProxy.cs. 
[2021-05-03T18:33:37.468Z] Starting copy source file Cloud/AzureCloudMetadataProvider.cs. 
[2021-05-03T18:33:37.543Z] Copied Cloud/AzureCloudMetadataProvider.cs. 
[2021-05-03T18:33:37.543Z] Starting copy source file Api/Context.cs. 
[2021-05-03T18:33:37.625Z] Copied Api/Context.cs. 
[2021-05-03T18:33:37.625Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Serialization/DefaultContractResolver.cs. 
[2021-05-03T18:33:37.734Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Serialization/DefaultContractResolver.cs. 
[2021-05-03T18:33:37.734Z] Starting copy source file Elastic.Apm/Logging/LogValuesFormatter.cs. 
[2021-05-03T18:33:37.824Z] Copied Elastic.Apm/Logging/LogValuesFormatter.cs. 
[2021-05-03T18:33:37.825Z] Starting copy source file Config/AbstractConfigurationReader.cs. 
[2021-05-03T18:33:37.933Z] Copied Config/AbstractConfigurationReader.cs. 
[2021-05-03T18:34:14.162Z] [Checks API] No suitable checks publisher found.
[2021-05-03T18:34:14.285Z] [INFO] getVaultSecret: Getting secrets
[2021-05-03T18:34:14.347Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-03T18:34:15.122Z] Running in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1286/apm-agent-dotnet
[2021-05-03T18:34:15.184Z] [INFO] Codecov: Getting branch ref...
[2021-05-03T18:34:15.378Z] Masking supported pattern matches of $GITHUB_TOKEN
[2021-05-03T18:34:16.139Z] [INFO] Codecov: Sending data...
[2021-05-03T18:34:16.706Z] + echo curl -sSLo codecov.sh https://codecov.io/bash
[2021-05-03T18:34:16.706Z] curl -sSLo codecov.sh https://codecov.io/bash
[2021-05-03T18:34:17.109Z] + echo bash codecov.sh
[2021-05-03T18:34:17.109Z] bash codecov.sh
[2021-05-03T18:34:17.338Z] Archiving artifacts
[2021-05-03T18:34:17.436Z] java.lang.InterruptedException: no matches found within 10000
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath$ValidateAntFileMask.hasMatch(FilePath.java:3069)
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2978)
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2929)
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3317)
[2021-05-03T18:34:17.437Z] Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to apm-ci-immutable-ubuntu-1804-1620064061395332329
[2021-05-03T18:34:17.437Z] 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
[2021-05-03T18:34:17.437Z] 		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
[2021-05-03T18:34:17.437Z] 		at hudson.remoting.Channel.call(Channel.java:1001)
[2021-05-03T18:34:17.437Z] 		at hudson.FilePath.act(FilePath.java:1159)
[2021-05-03T18:34:17.437Z] 		at hudson.FilePath.act(FilePath.java:1148)
[2021-05-03T18:34:17.437Z] 		at hudson.FilePath.validateAntFileMask(FilePath.java:2927)
[2021-05-03T18:34:17.437Z] 		at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:270)
[2021-05-03T18:34:17.437Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
[2021-05-03T18:34:17.437Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
[2021-05-03T18:34:17.437Z] 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2021-05-03T18:34:17.437Z] 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2021-05-03T18:34:17.437Z] 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2021-05-03T18:34:17.437Z] 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2021-05-03T18:34:17.437Z] 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2021-05-03T18:34:17.437Z] Caused: hudson.FilePath$TunneledInterruptedException
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3319)
[2021-05-03T18:34:17.437Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
[2021-05-03T18:34:17.437Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[2021-05-03T18:34:17.437Z] 	at hudson.remoting.Request$2.run(Request.java:375)
[2021-05-03T18:34:17.437Z] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2021-05-03T18:34:17.437Z] 	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:118)
[2021-05-03T18:34:17.437Z] Caused: java.lang.InterruptedException: java.lang.InterruptedException: no matches found within 10000
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath.act(FilePath.java:1161)
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath.act(FilePath.java:1148)
[2021-05-03T18:34:17.437Z] 	at hudson.FilePath.validateAntFileMask(FilePath.java:2927)
[2021-05-03T18:34:17.437Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:270)
[2021-05-03T18:34:17.437Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
[2021-05-03T18:34:17.437Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
[2021-05-03T18:34:17.437Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2021-05-03T18:34:17.437Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2021-05-03T18:34:17.437Z] 	at java.lang.Thread.run(Thread.java:748)
[2021-05-03T18:34:17.437Z] No artifacts found that match the file pattern "/var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1286/**/MSBuild_*.failure.txt". Configuration error?
[2021-05-03T18:34:18.036Z] Stage "Release to feedz.io" skipped due to earlier failure(s)
[2021-05-03T18:34:18.158Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-03T18:34:18.210Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-03T18:34:18.338Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-03T18:34:18.521Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-05-03T18:34:18.573Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-05-03T18:34:18.989Z] Running on Jenkins in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1286
[2021-05-03T18:34:19.112Z] [INFO] getVaultSecret: Getting secrets
[2021-05-03T18:34:19.175Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-03T18:34:20.251Z] + chmod 755 generate-build-data.sh
[2021-05-03T18:34:20.251Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/1 FAILURE 2814408
[2021-05-03T18:34:20.251Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/1/steps/?limit=10000 -o steps-info.json
[2021-05-03T18:34:20.802Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/1/tests/?status=FAILED -o tests-errors.json

@gregkalapos gregkalapos requested a review from russcam May 3, 2021 19:44
Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM 👍

{
if (realError.Context.Request?.Headers != null && realError.ConfigSnapshot != null)
{
foreach (var key in realError.Context?.Request?.Headers?.Keys.ToList())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the ToList() be removed, and avoid the allocation?

foreach (var key in realError.Context?.Request?.Headers?.Keys.ToList())
{
if (WildcardMatcher.IsAnyMatch(realError.ConfigSnapshot.SanitizeFieldNames, key)
&& realError.Context.Request.Headers[key] != Consts.Redacted)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this redacted check is worth making, because the value is going to be redacted whether it has already been redacted or not, so I think it could be skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you made me to measure this :) I wasn't totally sure either. tlds: yeah, it's better to remove.

The reason for the check and my thinking was that with this PR now we redact immediately when we read the headers, so in most cases, like with a default ASP.NET Core app, when this code runs values are already redacted, so this will only redact things with a public API usage scenario.

Anyways, I had this numbers - this is with 8 headers, all redacted.

|                 Method |     Mean |   Error |  StdDev |  Gen 0 | Gen 1 | Gen 2 | Allocated |
|----------------------- |---------:|--------:|--------:|-------:|------:|------:|----------:|
| CheckForRedactedString | 497.0 ns | 3.88 ns | 3.63 ns | 0.2785 |     - |     - |   1.71 KB |
|                NoCheck | 502.5 ns | 4.76 ns | 4.22 ns | 0.2785 |     - |     - |   1.71 KB |

The difference is close to nothing.

But then I tested with 8 headers again, but only 2 of them were redacted (and this is more like a usual case - typically most headers aren't redacted, only a few of them).

|                 Method |     Mean |    Error |   StdDev |  Gen 0 | Gen 1 | Gen 2 | Allocated |
|----------------------- |---------:|---------:|---------:|-------:|------:|------:|----------:|
| CheckForRedactedString | 513.9 ns | 10.16 ns | 14.90 ns | 0.2785 |     - |     - |   1.71 KB |
|                NoCheck | 500.2 ns |  9.54 ns | 10.61 ns | 0.2785 |     - |     - |   1.71 KB |

With this, there is really no benefit, so I remove the check.

Code: (NoCheck is the same, except the check is removed).

[Benchmark]
public void CheckForRedactedString()
{
	var context = new Context()
	{
		Request = new Request("GET", new Url())
		{
			Headers = new Dictionary<string, string>
			{
                                // these are values for the 1. measurement above, the 2. one ran with 6 values which we do not redacted.
				{ "password", Consts.Redacted },
				{ "atoken", Consts.Redacted },
				{ "btoken", Consts.Redacted },
				{ "ctoken", Consts.Redacted },
				{ "dtoken", Consts.Redacted },
				{ "etoken", Consts.Redacted },
				{ "ftoken", Consts.Redacted },
				{ "gtoken", Consts.Redacted },
			}
		}
	};
	var transaction = new Transaction(context, "foo", "bar", 0.0, 0l, "a", "a", "a", false, "ok", null);
	if (transaction is Transaction realTransaction)
	{
		if (realTransaction.IsContextCreated && realTransaction.Context.Request?.Headers != null)
		{
			foreach (var key in realTransaction.Context?.Request?.Headers?.Keys)
			{
				if (WildcardMatcher.IsAnyMatch(realTransaction.ConfigSnapshot.SanitizeFieldNames, key)
					&& string.CompareOrdinal(realTransaction.Context.Request.Headers[key], Consts.Redacted) != 0)
					realTransaction.Context.Request.Headers[key] = Consts.Redacted;
			}
		}
	}
}

@@ -24,7 +24,8 @@ public ITransaction Filter(ITransaction transaction)
{
foreach (var key in realTransaction.Context?.Request?.Headers?.Keys.ToList())
{
if (WildcardMatcher.IsAnyMatch(realTransaction.ConfigSnapshot.SanitizeFieldNames, key))
if (WildcardMatcher.IsAnyMatch(realTransaction.ConfigSnapshot.SanitizeFieldNames, key)
&& realTransaction.Context.Request.Headers[key] != Consts.Redacted)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, I wonder if this redacted check is worth making, because the value is going to be redacted whether it has already been redacted or not, so I think it could be skipped.

@gregkalapos gregkalapos merged commit c2b519a into elastic:master May 4, 2021
@gregkalapos gregkalapos added this to the 7.14 milestone May 4, 2021
@apmmachine
Copy link
Contributor

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1286 updated

  • Start Time: 2021-05-04T20:49:48.546+0000

  • Duration: 124 min 7 sec

  • Commit: 71aa0a3

Test stats 🧪

Test Results
Failed 412
Passed 18310
Skipped 92
Total 18814

Trends 🧪

Image of Build Times

Image of Tests

Test errors 412

Expand to view the tests failures

> Show only the first 10 test failures

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "secret", useOnlyDiagnosticSource: True) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty. 
    

    Expand to view the stacktrace

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.ContainSingle(String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Collections\SelfReferencingCollectionAssertions.cs:line 611
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 295
    --- End of stack trace from previous location where exception was thrown --- 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "usersessionid", useOnlyDiagnosticSource: True) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty. 
    

    Expand to view the stacktrace

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.ContainSingle(String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Collections\SelfReferencingCollectionAssertions.cs:line 611
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 295
    --- End of stack trace from previous location where exception was thrown --- 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "secret", useOnlyDiagnosticSource: False) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 
    

    Expand to view the stacktrace

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
    Stack Trace:
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
       at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 292
    --- End of stack trace from previous location where exception was thrown ---
    ----- Inner Stack Trace -----
       at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
       at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
       at System.IO.Pipelines.Pipe.GetReadAsyncResult()
       at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
       at Microsoft.AspNetCore.TestHost.ResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.StreamToStreamCopy.<>c.<DisposeSourceWhenCompleteAsync>b__1_0(Task completed, Object innerSource)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
    ----- Inner Stack Trace -----
       at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
       at Elastic.Apm.Filters.HeaderDictionarySanitizerFilter.Filter(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Filters\HeaderDictionarySanitizerFilter.cs:line 25
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       at Elastic.Apm.Tests.Utilities.MockPayloadSender.QueueTransaction(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests.Utilities\MockPayloadSender.cs:line 185
       at Elastic.Apm.Model.Transaction.End() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Model\Transaction.cs:line 480
       at Elastic.Apm.AspNetCore.WebRequestTransactionCreator.StopTransaction(Transaction transaction, HttpContext context, IApmLogger logger)
       at Elastic.Apm.AspNetCore.ApmMiddleware.InvokeAsync(HttpContext context) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm.AspNetCore\ApmMiddleware.cs:line 58
       at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass10_0.<<SendAsync>b__0>d.MoveNext() 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "password", useOnlyDiagnosticSource: True) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty. 
    

    Expand to view the stacktrace

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.ContainSingle(String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Collections\SelfReferencingCollectionAssertions.cs:line 611
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 295
    --- End of stack trace from previous location where exception was thrown --- 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "pwd", useOnlyDiagnosticSource: False) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 
    

    Expand to view the stacktrace

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
    Stack Trace:
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
       at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 292
    --- End of stack trace from previous location where exception was thrown ---
    ----- Inner Stack Trace -----
       at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
       at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
       at System.IO.Pipelines.Pipe.GetReadAsyncResult()
       at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
       at Microsoft.AspNetCore.TestHost.ResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.StreamToStreamCopy.<>c.<DisposeSourceWhenCompleteAsync>b__1_0(Task completed, Object innerSource)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
    ----- Inner Stack Trace -----
       at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
       at Elastic.Apm.Filters.HeaderDictionarySanitizerFilter.Filter(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Filters\HeaderDictionarySanitizerFilter.cs:line 25
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       at Elastic.Apm.Tests.Utilities.MockPayloadSender.QueueTransaction(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests.Utilities\MockPayloadSender.cs:line 185
       at Elastic.Apm.Model.Transaction.End() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Model\Transaction.cs:line 480
       at Elastic.Apm.AspNetCore.WebRequestTransactionCreator.StopTransaction(Transaction transaction, HttpContext context, IApmLogger logger)
       at Elastic.Apm.AspNetCore.ApmMiddleware.InvokeAsync(HttpContext context) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm.AspNetCore\ApmMiddleware.cs:line 58
       at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass10_0.<<SendAsync>b__0>d.MoveNext() 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "usertokensecret", useOnlyDiagnosticSource: True) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty. 
    

    Expand to view the stacktrace

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.ContainSingle(String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Collections\SelfReferencingCollectionAssertions.cs:line 611
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 295
    --- End of stack trace from previous location where exception was thrown --- 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "usertokensecret", useOnlyDiagnosticSource: False) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 
    

    Expand to view the stacktrace

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
    Stack Trace:
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
       at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 292
    --- End of stack trace from previous location where exception was thrown ---
    ----- Inner Stack Trace -----
       at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
       at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
       at System.IO.Pipelines.Pipe.GetReadAsyncResult()
       at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
       at Microsoft.AspNetCore.TestHost.ResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.StreamToStreamCopy.<>c.<DisposeSourceWhenCompleteAsync>b__1_0(Task completed, Object innerSource)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
    ----- Inner Stack Trace -----
       at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
       at Elastic.Apm.Filters.HeaderDictionarySanitizerFilter.Filter(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Filters\HeaderDictionarySanitizerFilter.cs:line 25
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       at Elastic.Apm.Tests.Utilities.MockPayloadSender.QueueTransaction(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests.Utilities\MockPayloadSender.cs:line 185
       at Elastic.Apm.Model.Transaction.End() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Model\Transaction.cs:line 480
       at Elastic.Apm.AspNetCore.WebRequestTransactionCreator.StopTransaction(Transaction transaction, HttpContext context, IApmLogger logger)
       at Elastic.Apm.AspNetCore.ApmMiddleware.InvokeAsync(HttpContext context) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm.AspNetCore\ApmMiddleware.cs:line 58
       at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass10_0.<<SendAsync>b__0>d.MoveNext() 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "secretcreditcard", useOnlyDiagnosticSource: True) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty. 
    

    Expand to view the stacktrace

     Expected _capturedPayload.Transactions to contain a single item, but the collection is empty.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\XUnit2TestFramework.cs:line 32
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Execution\AssertionScope.cs:line 181
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.ContainSingle(String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions\Collections\SelfReferencingCollectionAssertions.cs:line 611
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 295
    --- End of stack trace from previous location where exception was thrown --- 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "usersessionid", useOnlyDiagnosticSource: False) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 
    

    Expand to view the stacktrace

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
    Stack Trace:
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
       at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 292
    --- End of stack trace from previous location where exception was thrown ---
    ----- Inner Stack Trace -----
       at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
       at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
       at System.IO.Pipelines.Pipe.GetReadAsyncResult()
       at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
       at Microsoft.AspNetCore.TestHost.ResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.StreamToStreamCopy.<>c.<DisposeSourceWhenCompleteAsync>b__1_0(Task completed, Object innerSource)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
    ----- Inner Stack Trace -----
       at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
       at Elastic.Apm.Filters.HeaderDictionarySanitizerFilter.Filter(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Filters\HeaderDictionarySanitizerFilter.cs:line 25
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       at Elastic.Apm.Tests.Utilities.MockPayloadSender.QueueTransaction(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests.Utilities\MockPayloadSender.cs:line 185
       at Elastic.Apm.Model.Transaction.End() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Model\Transaction.cs:line 480
       at Elastic.Apm.AspNetCore.WebRequestTransactionCreator.StopTransaction(Transaction transaction, HttpContext context, IApmLogger logger)
       at Elastic.Apm.AspNetCore.ApmMiddleware.InvokeAsync(HttpContext context) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm.AspNetCore\ApmMiddleware.cs:line 58
       at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass10_0.<<SendAsync>b__0>d.MoveNext() 
    

Initializing / Parallel / Windows .NET Core / Test / SanitizeFieldNamesTests.Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(headerName: "secretcreditcard", useOnlyDiagnosticSource: False) – Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests
    Expand to view the error details

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 
    

    Expand to view the stacktrace

     System.Net.Http.HttpRequestException : Error while copying content to a stream.
    ---- System.IO.IOException : 
    -------- System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
    Stack Trace:
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
       at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Elastic.Apm.AspNetCore.Tests.SanitizeFieldNamesTests.DefaultsWithHeaders(String headerName, Boolean useOnlyDiagnosticSource) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.AspNetCore.Tests\SanitizeFieldNamesTests.cs:line 292
    --- End of stack trace from previous location where exception was thrown ---
    ----- Inner Stack Trace -----
       at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
       at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
       at System.IO.Pipelines.Pipe.GetReadAsyncResult()
       at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)
       at Microsoft.AspNetCore.TestHost.ResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at System.Net.Http.StreamToStreamCopy.<>c.<DisposeSourceWhenCompleteAsync>b__1_0(Task completed, Object innerSource)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
    ----- Inner Stack Trace -----
       at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
       at Elastic.Apm.Filters.HeaderDictionarySanitizerFilter.Filter(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Filters\HeaderDictionarySanitizerFilter.cs:line 25
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       at Elastic.Apm.Tests.Utilities.MockPayloadSender.QueueTransaction(ITransaction transaction) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\test\Elastic.Apm.Tests.Utilities\MockPayloadSender.cs:line 185
       at Elastic.Apm.Model.Transaction.End() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm\Model\Transaction.cs:line 480
       at Elastic.Apm.AspNetCore.WebRequestTransactionCreator.StopTransaction(Transaction transaction, HttpContext context, IApmLogger logger)
       at Elastic.Apm.AspNetCore.ApmMiddleware.InvokeAsync(HttpContext context) in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1286\apm-agent-dotnet\src\Elastic.Apm.AspNetCore\ApmMiddleware.cs:line 58
       at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass10_0.<<SendAsync>b__0>d.MoveNext() 
    

Steps errors 5

Expand to view the steps failures

Archive the artifacts
  • Took 0 min 0 sec . View more details on here
  • Description: [2021-05-04T22:53:54.629Z] Archiving artifacts withAzureCredentials: error org.jenkinsci.plugins.wo
Test IIS
  • Took 6 min 16 sec . View more details on here
  • Description: .ci/windows/test-iis.bat
Build
  • Took 1 min 38 sec . View more details on here
  • Description: .ci/windows/dotnet.bat
Archive the artifacts
  • Took 0 min 0 sec . View more details on here
  • Description: [2021-05-04T22:53:10.828Z] Archiving artifacts withAzureCredentials: error org.jenkinsci.plugins.wo
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: withAzureCredentials: error org.jenkinsci.plugins.workflow.steps.FlowInterruptedException

Log output

Expand to view the last 100 lines of log output

[2021-05-04T22:53:51.879Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JConstructor.Async.cs. 
[2021-05-04T22:53:51.880Z] Starting copy source file Libraries/Newtonsoft.Json/Utilities/NullableAttributes.cs. 
[2021-05-04T22:53:51.956Z] Copied Libraries/Newtonsoft.Json/Utilities/NullableAttributes.cs. 
[2021-05-04T22:53:51.956Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JsonPath/FieldFilter.cs. 
[2021-05-04T22:53:52.032Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JsonPath/FieldFilter.cs. 
[2021-05-04T22:53:52.032Z] Starting copy source file Elastic.Apm/Libraries/Ben.Demystifier/EnhancedStackFrame.cs. 
[2021-05-04T22:53:52.108Z] Copied Elastic.Apm/Libraries/Ben.Demystifier/EnhancedStackFrame.cs. 
[2021-05-04T22:53:52.109Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JEnumerable.cs. 
[2021-05-04T22:53:52.191Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JEnumerable.cs. 
[2021-05-04T22:53:52.191Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JsonPath/ScanFilter.cs. 
[2021-05-04T22:53:52.266Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JsonPath/ScanFilter.cs. 
[2021-05-04T22:53:52.266Z] Starting copy source file DiagnosticListeners/HttpDiagnosticListenerFullFrameworkImpl.cs. 
[2021-05-04T22:53:52.351Z] Copied DiagnosticListeners/HttpDiagnosticListenerFullFrameworkImpl.cs. 
[2021-05-04T22:53:52.351Z] Starting copy source file Elastic.Apm/Libraries/Ben.Demystifier/Internal/ILReader.cs. 
[2021-05-04T22:53:52.447Z] Copied Elastic.Apm/Libraries/Ben.Demystifier/Internal/ILReader.cs. 
[2021-05-04T22:53:52.447Z] Starting copy source file Libraries/Newtonsoft.Json/Linq/JsonPath/FieldFilter.cs. 
[2021-05-04T22:53:52.521Z] Copied Libraries/Newtonsoft.Json/Linq/JsonPath/FieldFilter.cs. 
[2021-05-04T22:53:52.521Z] Starting copy source file Elastic.Apm/Reflection/CascadePropertyFetcher.cs. 
[2021-05-04T22:53:52.595Z] Copied Elastic.Apm/Reflection/CascadePropertyFetcher.cs. 
[2021-05-04T22:53:52.595Z] Starting copy source file Elastic.Apm.Azure.Storage/AzureBlobStorageDiagnosticsSubscriber.cs. 
[2021-05-04T22:53:52.671Z] Copied Elastic.Apm.Azure.Storage/AzureBlobStorageDiagnosticsSubscriber.cs. 
[2021-05-04T22:53:52.671Z] Starting copy source file Elastic.Apm.StackExchange.Redis/ElasticApmProfiler.cs. 
[2021-05-04T22:53:52.748Z] Copied Elastic.Apm.StackExchange.Redis/ElasticApmProfiler.cs. 
[2021-05-04T22:53:52.748Z] Starting copy source file Elastic.Apm/Api/Response.cs. 
[2021-05-04T22:53:52.824Z] Copied Elastic.Apm/Api/Response.cs. 
[2021-05-04T22:53:52.824Z] Starting copy source file Libraries/Ben.Demystifier/StringBuilderExtentions.cs. 
[2021-05-04T22:53:52.902Z] Copied Libraries/Ben.Demystifier/StringBuilderExtentions.cs. 
[2021-05-04T22:53:52.902Z] Starting copy source file Elastic.Apm/Model/Error.cs. 
[2021-05-04T22:53:52.981Z] Copied Elastic.Apm/Model/Error.cs. 
[2021-05-04T22:53:52.981Z] Starting copy source file Elastic.Apm/Helpers/SingleThreadTaskScheduler.cs. 
[2021-05-04T22:53:53.065Z] Copied Elastic.Apm/Helpers/SingleThreadTaskScheduler.cs. 
[2021-05-04T22:53:53.065Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Serialization/DefaultNamingStrategy.cs. 
[2021-05-04T22:53:53.142Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Serialization/DefaultNamingStrategy.cs. 
[2021-05-04T22:53:53.142Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JConstructor.cs. 
[2021-05-04T22:53:53.222Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Linq/JConstructor.cs. 
[2021-05-04T22:53:53.222Z] Starting copy source file Metrics/MetricSet.cs. 
[2021-05-04T22:53:53.297Z] Copied Metrics/MetricSet.cs. 
[2021-05-04T22:53:53.297Z] Starting copy source file Metrics/MetricsProvider/FreeAndTotalMemoryProvider.cs. 
[2021-05-04T22:53:53.376Z] Copied Metrics/MetricsProvider/FreeAndTotalMemoryProvider.cs. 
[2021-05-04T22:53:53.376Z] Starting copy source file Elastic.Apm/Api/MetricSample.cs. 
[2021-05-04T22:53:53.452Z] Copied Elastic.Apm/Api/MetricSample.cs. 
[2021-05-04T22:53:53.452Z] Starting copy source file Libraries/Newtonsoft.Json/JsonReader.cs. 
[2021-05-04T22:53:53.556Z] Copied Libraries/Newtonsoft.Json/JsonReader.cs. 
[2021-05-04T22:53:53.556Z] Starting copy source file Logging/LogLevelSwitch.cs. 
[2021-05-04T22:53:53.651Z] Copied Logging/LogLevelSwitch.cs. 
[2021-05-04T22:53:53.651Z] Starting copy source file Logging/IApmLoggingExtensions.cs. 
[2021-05-04T22:53:53.736Z] Copied Logging/IApmLoggingExtensions.cs. 
[2021-05-04T22:53:53.736Z] Starting copy source file Libraries/Newtonsoft.Json/Serialization/KebabCaseNamingStrategy.cs. 
[2021-05-04T22:53:53.813Z] Copied Libraries/Newtonsoft.Json/Serialization/KebabCaseNamingStrategy.cs. 
[2021-05-04T22:53:53.813Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/AsyncUtils.cs. 
[2021-05-04T22:53:53.893Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/AsyncUtils.cs. 
[2021-05-04T22:53:53.893Z] Starting copy source file Libraries/Newtonsoft.Json/Linq/JArray.Async.cs. 
[2021-05-04T22:53:53.970Z] Copied Libraries/Newtonsoft.Json/Linq/JArray.Async.cs. 
[2021-05-04T22:53:53.970Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/JsonException.cs. 
[2021-05-04T22:53:54.045Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/JsonException.cs. 
[2021-05-04T22:53:54.045Z] Starting copy source file Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/DynamicUtils.cs. 
[2021-05-04T22:53:54.124Z] Copied Elastic.Apm/Libraries/Newtonsoft.Json/Utilities/DynamicUtils.cs. 
[2021-05-04T22:53:54.124Z] Starting copy source file Elastic.Apm.Elasticsearch/ElasticsearchDiagnosticsSubscriber.cs. 
[2021-05-04T22:53:54.206Z] Copied Elastic.Apm.Elasticsearch/ElasticsearchDiagnosticsSubscriber.cs. 
[2021-05-04T22:53:54.206Z] Starting copy source file Libraries/Ben.Demystifier/EnhancedStackTrace.cs. 
[2021-05-04T22:53:54.282Z] Copied Libraries/Ben.Demystifier/EnhancedStackTrace.cs. 
[2021-05-04T22:53:54.282Z] Starting copy source file Libraries/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs. 
[2021-05-04T22:53:54.360Z] Copied Libraries/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs. 
[2021-05-04T22:53:54.360Z] Starting copy source file Libraries/Newtonsoft.Json/Linq/JProperty.Async.cs. 
[2021-05-04T22:53:54.437Z] Copied Libraries/Newtonsoft.Json/Linq/JProperty.Async.cs. 
[2021-05-04T22:53:54.437Z] Starting copy source file Libraries/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs. 
[2021-05-04T22:53:54.516Z] Copied Libraries/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs. 
[2021-05-04T22:53:54.516Z] Starting copy source file DiagnosticListeners/HttpTraceConfiguration.cs. 
[2021-05-04T22:53:54.571Z] Body did not finish within grace period; terminating with extreme prejudice
[2021-05-04T22:53:54.586Z] Error when executing always post condition:
[2021-05-04T22:53:54.591Z] Copied DiagnosticListeners/HttpTraceConfiguration.cs. 
[2021-05-04T22:53:54.592Z] Starting copy source file Elastic.Apm/Libraries/Ben.Demystifier/ResolvedMethod.cs. 
[2021-05-04T22:53:54.595Z] org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
[2021-05-04T22:53:54.595Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.cancel(TimeoutStepExecution.java:165)
[2021-05-04T22:53:54.595Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.access$100(TimeoutStepExecution.java:38)
[2021-05-04T22:53:54.595Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution$1.run(TimeoutStepExecution.java:139)
[2021-05-04T22:53:54.595Z] 	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2021-05-04T22:53:54.595Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2021-05-04T22:53:54.595Z] 	at java.lang.Thread.run(Thread.java:748)
[2021-05-04T22:53:54.595Z] 
[2021-05-04T22:53:54.629Z] Archiving artifacts
[2021-05-04T22:53:54.717Z] Failed in branch Linux
[2021-05-04T22:53:54.815Z] Stage "Release to feedz.io" skipped due to earlier failure(s)
[2021-05-04T22:53:54.871Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-04T22:53:54.890Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-04T22:53:54.938Z] Stage "Release" skipped due to earlier failure(s)
[2021-05-04T22:53:55.016Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-05-04T22:53:55.034Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-05-04T22:53:55.356Z] Running on Jenkins in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1286
[2021-05-04T22:53:55.424Z] [INFO] getVaultSecret: Getting secrets
[2021-05-04T22:53:55.470Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-05-04T22:53:56.227Z] + chmod 755 generate-build-data.sh
[2021-05-04T22:53:56.227Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/2 FAILURE 7447419
[2021-05-04T22:53:56.227Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/2/steps/?limit=10000 -o steps-info.json
[2021-05-04T22:53:57.139Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-dotnet/apm-agent-dotnet-mbp/PR-1286/runs/2/tests/?status=FAILED -o tests-errors.json

@bertvan
Copy link
Contributor

bertvan commented Jun 2, 2021

@gregkalapos
Copy link
Contributor Author

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants