public static void AddOperation(IActivityScope scope, ActivityOperationType operation, string instance, float value = 0f, int count = 1)
        {
            bool           flag          = false;
            IActivityScope activityScope = ActivityContext.globalScope;

            TimeInResourcePerfCounter.AddOperation(operation, value);
            if (scope != null && scope.Status == ActivityContextStatus.ActivityStarted)
            {
                flag = scope.AddOperation(operation, instance, value, count);
            }
            if (!ActivityContext.IsGlobalScopeEnabled)
            {
                return;
            }
            if (flag)
            {
                activityScope.AddOperation(operation, "INSTR", value, count);
                return;
            }
            if (scope != null || SingleContext.Singleton.LocalId != null)
            {
                activityScope.AddOperation(operation, "MISSED", value, count);
                return;
            }
            if (DebugContext.GetDebugProperty(DebugProperties.ActivityId) == null)
            {
                activityScope.AddOperation(operation, "UNINSTR", value, count);
                return;
            }
            activityScope.AddOperation(operation, "SUPPR", value, count);
        }