Beispiel #1
0
 public SampleAppUrlPathData(string relativePathAndQuery, int statusCode, int transactionsCount = 1, int spansCount = 0,
                             int errorsCount = 0,
                             Outcome outcome = Outcome.Success
                             )
 {
     _sampleAppUri         = new SampleAppUri(relativePathAndQuery);
     _relativePathAndQuery = relativePathAndQuery;
     StatusCode            = statusCode;
     TransactionsCount     = transactionsCount;
     SpansCount            = spansCount;
     ErrorsCount           = errorsCount;
     Outcome = outcome;
 }
Beispiel #2
0
        private async Task LogSampleAppDiagnosticsPage()
        {
            var url = new SampleAppUri(DiagnosticsController.DiagnosticsPageRelativePath);

            _logger.Debug()?.Log("Getting content of sample application diagnostics page ({url})...", url);
            var response = await HttpClient.GetAsync(url);

            _logger.Debug()
            ?.Log("Received sample application's diagnostics page. Status code: {HttpStatusCode} ({HttpStatusCodeEnum})",
                  (int)response.StatusCode, response.StatusCode);

            _logger.Info()
            ?.Log("Sample application's diagnostics page content:\n{DiagnosticsPageContent}",
                  TextUtils.Indent(await response.Content.ReadAsStringAsync()));
        }