public async Task Test(SampleAppUrlPathData sampleAppUrlPathDataForSampled) { var sampleAppUrlPathData = sampleAppUrlPathDataForSampled.Clone(spansCount: 0); await SendGetRequestToSampleAppAndVerifyResponse(sampleAppUrlPathData.RelativeUrlPath, sampleAppUrlPathData.StatusCode); await WaitAndCustomVerifyReceivedData(receivedData => { VerifyReceivedDataSharedConstraints(sampleAppUrlPathData, receivedData); AssertReceivedDataSampledStatus(receivedData, /* isSampled */ false); }); }
public async Task Test(SampleAppUrlPathData sampleAppUrlPathDataForSampled) { var sampleAppUrlPathData = sampleAppUrlPathDataForSampled.Clone(spansCount: 0); await SendGetRequestToSampleAppAndVerifyResponseStatusCode(sampleAppUrlPathData.RelativeUrlPath, sampleAppUrlPathData.StatusCode); VerifyDataReceivedFromAgent(receivedData => { TryVerifyDataReceivedFromAgent(sampleAppUrlPathData, receivedData); foreach (var transaction in receivedData.Transactions) { transaction.Context.Should().BeNull(); transaction.SpanCount.Started.Should().Be(0); transaction.IsSampled.Should().BeFalse(); } foreach (var error in receivedData.Errors) { error.Context.Should().BeNull(); error.Transaction.IsSampled.Should().BeFalse(); } }); }