public async Task <IActionResult> DelayAsync(int seconds)
        {
            ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();
            await Task.Delay(TimeSpan.FromSeconds(seconds));

            return(View("Delay", seconds));
        }
Exemple #2
0
 public IActionResult Delay(int seconds)
 {
     ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();
     Thread.Sleep(TimeSpan.FromSeconds(seconds));
     AddCorrelationIdentifierToResponse();
     return(View(seconds));
 }
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 IActionResult Index()
        {
            ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();
            var prefixes = new[] { "COR_", "CORECLR_", "DD_", "DATADOG_" };

            var envVars = from envVar in Environment.GetEnvironmentVariables().Cast <DictionaryEntry>()
                          from prefix in prefixes
                          let key                         = (envVar.Key as string)?.ToUpperInvariant()
                                                let value = envVar.Value as string
                                                            where key.StartsWith(prefix)
                                                            orderby key
                                                            select new KeyValuePair <string, string>(key, value);

            return(View(envVars.ToList()));
        }
        public IActionResult Index()
        {
            var instrumentationType = Type.GetType("Datadog.Trace.ClrProfiler.Instrumentation, SignalFx.Tracing.ClrProfiler.Managed");

            ViewBag.ProfilerAttached            = instrumentationType?.GetProperty("ProfilerAttached", BindingFlags.Public | BindingFlags.Static)?.GetValue(null) ?? false;
            ViewBag.TracerAssemblyLocation      = Type.GetType("SignalFx.Tracing.Tracer, SignalFx.Tracing")?.Assembly.Location;
            ViewBag.ClrProfilerAssemblyLocation = instrumentationType?.Assembly.Location;
            ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();

            var prefixes = new[] { "COR_", "CORECLR_", "DD_", "DATADOG_", "SIGNALFX_" };

            var envVars = from envVar in Environment.GetEnvironmentVariables().Cast <DictionaryEntry>()
                          from prefix in prefixes
                          let key                         = (envVar.Key as string)?.ToUpperInvariant()
                                                let value = envVar.Value as string
                                                            where key.StartsWith(prefix)
                                                            orderby key
                                                            select new KeyValuePair <string, string>(key, value);

            return(View(envVars.ToList()));
        }
Exemple #6
0
    public IActionResult Index()
    {
        var instrumentationType = Type.GetType("OpenTelemetry.AutoInstrumentation.Instrumentation, OpenTelemetry.AutoInstrumentation");

        ViewBag.ProfilerAttached            = instrumentationType?.GetProperty("ProfilerAttached", BindingFlags.Public | BindingFlags.Static)?.GetValue(null) ?? false;
        ViewBag.TracerAssemblyLocation      = Type.GetType("OpenTelemetry.Trace.Tracer, OpenTelemetry.Api")?.Assembly.Location;
        ViewBag.ClrProfilerAssemblyLocation = instrumentationType?.Assembly.Location;
        ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();

        var prefixes = new[] { "COR_", "CORECLR_", "DOTNET_", "OTEL_" };

        var envVars = from envVar in Environment.GetEnvironmentVariables().Cast <DictionaryEntry>()
                      from prefix in prefixes
                      let key                         = (envVar.Key as string)?.ToUpperInvariant()
                                            let value = envVar.Value as string
                                                        where key.StartsWith(prefix)
                                                        orderby key
                                                        select new KeyValuePair <string, string>(key, value);

        AddCorrelationIdentifierToResponse();
        return(View(envVars.ToList()));
    }
 public IActionResult Delay(int seconds)
 {
     ViewBag.StackTrace = StackTraceHelper.GetUsefulStack();
     Thread.Sleep(TimeSpan.FromSeconds(seconds));
     return(View(seconds));
 }