Example #1
0
        /// <summary>
        /// Starts a transaction from the specified trace header.
        /// </summary>
        public static ITransaction StartTransaction(
            this IHub hub,
            string name,
            string operation,
            SentryTraceHeader traceHeader)
        {
            var context = new TransactionContext(
                // SpanId from the header becomes ParentSpanId on this transaction
                traceHeader.SpanId,
                traceHeader.TraceId,
                name,
                operation,
                traceHeader.IsSampled
                );

            return(hub.StartTransaction(context));
        }
        /// <summary>
        /// Starts a transaction from the specified trace header.
        /// </summary>
        public static ITransaction StartTransaction(
            this IHub hub,
            string name,
            string operation,
            SentryTraceHeader traceHeader)
        {
            var parentSpanId    = traceHeader.SpanId;
            var isParentSampled = traceHeader.IsSampled;

            var context = new TransactionContext(
                parentSpanId,
                traceHeader.TraceId,
                name,
                operation,
                isParentSampled
                );

            return(hub.StartTransaction(context));
        }
Example #3
0
 /// <summary>
 /// Starts a transaction from the specified trace header.
 /// </summary>
 public static ITransaction StartTransaction(
     this IHub hub,
     string name,
     string operation,
     SentryTraceHeader traceHeader) =>
 hub.StartTransaction(new TransactionContext(name, operation, traceHeader));