Example #1
0
        internal Span StartSpan(IApmAgent agent, IDbCommand dbCommand, InstrumentationFlag instrumentationFlag, string subType = null,
                                bool captureStackTraceOnStart = false
                                )
        {
            var spanName = dbCommand.CommandText.Replace(Environment.NewLine, " ");

            return(ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, spanName, ApiConstants.TypeDb, subType, instrumentationFlag,
                                                                             captureStackTraceOnStart));
        }
Example #2
0
        internal ISpan StartSpan(IApmAgent agent, IDbCommand dbCommand, InstrumentationFlag instrumentationFlag, string subType = null,
                                 bool captureStackTraceOnStart = false
                                 )
        {
            var spanName = GetDbSpanName(dbCommand);

            return(ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, spanName, ApiConstants.TypeDb, subType, instrumentationFlag,
                                                                             captureStackTraceOnStart, true));
        }