public static ProfileTracer CreateAsOperation(string operationName, string uniqueOperationID = null)
        {
            ProfileTracer tracer = new ProfileTracer(operationName, null, null);

            tracer.IsOperation = true;

            if (!string.IsNullOrEmpty(uniqueOperationID))
            {
                tracer._transactionID = uniqueOperationID;
            }

            return(tracer);
        }
        /// <summary>
        /// Used by non web apps to define transactions in code that are turned in to operations to be tracked in Stackify APM or Prefix
        /// </summary>
        /// <param name="operationName"></param>
        /// <param name="uniqueOperationID"></param>
        /// <returns></returns>
        public static ProfileTracer CreateAsOperation(string operationName, string uniqueOperationID = null)
        {
#if NET45 || NETSTANDARD1_3
            if (_etwEventListener == null)
            {
                _etwEventListener = new EtwEventListener();
            }
#endif
            ProfileTracer tracer = new ProfileTracer(operationName, null, null);
            tracer.IsOperation = true;

            if (!string.IsNullOrEmpty(uniqueOperationID))
            {
                tracer._RequestID = uniqueOperationID;
            }

            return(tracer);
        }
        /// <summary>
        /// Used by non web apps to define transactions in code that are turned in to operations to be tracked in Stackify APM or Prefix
        /// </summary>
        /// <param name="operationName"></param>
        /// <param name="uniqueOperationID"></param>
        /// <returns></returns>
        public static ProfileTracer CreateAsOperation(string operationName, string uniqueOperationID = null)
        {
#if NETFULL
#if !NET40
            if (_etwEventListener == null)
            {
                _etwEventListener = new EtwEventListener();
            }
#endif
#endif

            var tracer = new ProfileTracer(operationName, null, null);
            tracer.IsOperation = true;

            if (string.IsNullOrEmpty(uniqueOperationID) == false)
            {
                tracer._requestId = uniqueOperationID;
            }

            return(tracer);
        }
        public static ProfileTracer CreateAsCodeBlock(string methodDisplayText)
        {
            ProfileTracer tracer = new ProfileTracer(methodDisplayText, null, null);

            return(tracer);
        }
        public static ProfileTracer CreateAsCodeBlock(string methodDisplayText, string requestLevelReportingCategory, string appLevelReportingCategory = null)
        {
            ProfileTracer tracer = new ProfileTracer(methodDisplayText, requestLevelReportingCategory, appLevelReportingCategory);

            return(tracer);
        }
        /// <summary>
        /// Used by non web apps to define transactions in code that are turned in to operations to be tracked in Stackify APM or Prefix
        /// </summary>
        /// <param name="functionName"></param>
        /// <returns></returns>
        public static ProfileTracer CreateAsTrackedFunction(string functionName)
        {
            var tracer = new ProfileTracer(functionName, "Tracked Function", null);

            return(tracer);
        }
 public static ProfileTracer Create(string methodDisplayText, string requestLevelReportingCategory, string appLevelReportingCategory = null)
 {
     ProfileTracer tracer = new ProfileTracer(methodDisplayText, requestLevelReportingCategory, appLevelReportingCategory);
     return tracer;
 }
 public static ProfileTracer Create(string methodDisplayText)
 {
     ProfileTracer tracer = new ProfileTracer(methodDisplayText, null, null);
     return tracer;
 }