Esempio n. 1
0
        public void BeforeDbSessionDispose([Object] DbSessionDisposeBeforeEventData eventData)
        {
            var context = _tracingContext.CreateLocalSegmentContext(eventData.Operation);

            context.Span.SpanLayer = Tracing.Segments.SpanLayer.DB;
            context.Span.Component = Common.Components.SMART_SQL;
            context.Span.Peer      = new Common.StringOrIntValue(eventData.DbSession.Connection?.DataSource);
            context.Span.AddTag(Common.Tags.DB_INSTANCE, eventData.DbSession.Connection?.Database);
            context.Span.AddTag(Common.Tags.DB_TYPE, "Sql");
        }
        public void BeforeDbSessionDispose([Object] DbSessionDisposeBeforeEventData eventData)
        {
            var context = CreateSmartSqlLocalSegmentContext(eventData.Operation);

            AddConnectionTag(context, eventData.DbSession.Connection);
        }