public static void Main(string[] args)
        {
            var directory = Directory.GetCurrentDirectory();

            var host = new WebHostBuilder()
                       .UseKestrel(serverOptions =>
                                   // Explicitly set AllowSynchronousIO to true since the default changes
                                   // between AspNetCore 2.0 and 3.0
                                   serverOptions.AllowSynchronousIO = true
                                   )
                       .UseContentRoot(directory)
                       .UseIISIntegration()
                       .UseStartup <Startup>()
                       .Build();

            var logger = host.Services.GetRequiredService <ILogger <Program> >();

            logger.LogInformation($"Instrumentation.ProfilerAttached = {SampleHelpers.IsProfilerAttached()}");

            var envVars = SampleHelpers.GetDatadogEnvironmentVariables();

            foreach (var kvp in envVars)
            {
                logger.LogInformation($"{kvp.Key} = {kvp.Value}");
            }

            host.Run();
        }
Exemple #2
0
        public IActionResult Index()
        {
            ViewBag.ProfilerAttached       = SampleHelpers.IsProfilerAttached();
            ViewBag.TracerAssemblyLocation = SampleHelpers.GetTracerAssemblyLocation();

            var envVars = SampleHelpers.GetDatadogEnvironmentVariables();

            return(View(envVars.ToList()));
        }
Exemple #3
0
        public IActionResult Index()
        {
            ViewBag.ProfilerAttached       = SampleHelpers.IsProfilerAttached();
            ViewBag.TracerAssemblyLocation = SampleHelpers.GetTracerAssemblyLocation();
            ViewBag.StackTrace             = StackTraceHelper.GetUsefulStack();

            var envVars = SampleHelpers.GetDatadogEnvironmentVariables();

            AddCorrelationIdentifierToResponse();
            return(View(envVars.ToList()));
        }
Exemple #4
0
        public ActionResult Index()
        {
            var envVars = SampleHelpers.GetDatadogEnvironmentVariables();

            return(View(envVars.ToList()));
        }