Ejemplo n.º 1
0
        public static bool IsProfilerAttached()
        {
            if (IsWindows)
            {
                return(Windows.IsProfilerAttached());
            }

            return(NonWindows.IsProfilerAttached());
        }
Ejemplo n.º 2
0
        public static bool IsProfilerAttached()
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return(Windows.IsProfilerAttached());
            }

            return(NonWindows.IsProfilerAttached());
        }
Ejemplo n.º 3
0
 public static void EnableCallTargetStateByRef()
 {
     if (IsWindows)
     {
         Windows.EnableCallTargetStateByRef();
     }
     else
     {
         NonWindows.EnableCallTargetStateByRef();
     }
 }
Ejemplo n.º 4
0
 public static void EnableByRefInstrumentation()
 {
     if (IsWindows)
     {
         Windows.EnableByRefInstrumentation();
     }
     else
     {
         NonWindows.EnableByRefInstrumentation();
     }
 }
Ejemplo n.º 5
0
 public static void SignalFxSetNativeContext(ulong traceIdHigh, ulong traceIdLow, ulong spanId, int managedThreadId)
 {
     if (IsWindows)
     {
         Windows.SignalFxSetNativeContext(traceIdHigh, traceIdLow, spanId, managedThreadId);
     }
     else
     {
         NonWindows.SignalFxSetNativeContext(traceIdHigh, traceIdLow, spanId, managedThreadId);
     }
 }
Ejemplo n.º 6
0
        public static void AddDerivedInstrumentations(string id, NativeCallTargetDefinition[] methodArrays)
        {
            if (methodArrays is null || methodArrays.Length == 0)
            {
                return;
            }

            if (IsWindows)
            {
                Windows.AddDerivedInstrumentations(id, methodArrays, methodArrays.Length);
            }
            else
            {
                NonWindows.AddDerivedInstrumentations(id, methodArrays, methodArrays.Length);
            }
        }
Ejemplo n.º 7
0
        public static void InitializeProfiler(string id, NativeCallTargetDefinition[] methodArrays)
        {
            if (methodArrays is null || methodArrays.Length == 0)
            {
                return;
            }

            if (IsWindows)
            {
                Windows.InitializeProfiler(id, methodArrays, methodArrays.Length);
            }
            else
            {
                NonWindows.InitializeProfiler(id, methodArrays, methodArrays.Length);
            }
        }
Ejemplo n.º 8
0
        public static void AddTraceAttributeInstrumentation(string id, string assemblyName, string typeName)
        {
            if (string.IsNullOrWhiteSpace(assemblyName) ||
                string.IsNullOrWhiteSpace(typeName))
            {
                return;
            }

            if (IsWindows)
            {
                Windows.AddTraceAttributeInstrumentation(id, assemblyName, typeName);
            }
            else
            {
                NonWindows.AddTraceAttributeInstrumentation(id, assemblyName, typeName);
            }
        }
Ejemplo n.º 9
0
        public static void InitializeTraceMethods(string id, string assemblyName, string typeName, string configuration)
        {
            if (string.IsNullOrWhiteSpace(configuration) ||
                string.IsNullOrWhiteSpace(assemblyName) ||
                string.IsNullOrWhiteSpace(typeName))
            {
                return;
            }

            if (IsWindows)
            {
                Windows.InitializeTraceMethods(id, assemblyName, typeName, configuration);
            }
            else
            {
                NonWindows.InitializeTraceMethods(id, assemblyName, typeName, configuration);
            }
        }
Ejemplo n.º 10
0
 public static int SignalFxReadThreadSamples(int len, byte[] buf)
 {
     return(IsWindows ? Windows.SignalFxReadThreadSamples(len, buf) : NonWindows.SignalFxReadThreadSamples(len, buf));
 }