protected virtual ISpan CreateSpan(string activityId, string parentId, string operationName, CommandEventData eventData, IEfCoreSpanMetadataProvider metadataProvider)
        {
            var span = ConcurrentContextManager.CreateExitSpan(operationName, metadataProvider.GetPeer(eventData.Command.Connection), activityId, parentId);

            span.SetComponent(metadataProvider.Component);
            return(span);
        }
        public void HttpRequest([Property(Name = "Request")] HttpRequestMessage request)
        {
//            Console.WriteLine($"{Activity.Current.Id} {Activity.Current.ParentId} {Activity.Current.RootId}");
            var contextCarrier = _contextCarrierFactory.Create();
            var peer           = $"{request.RequestUri.Host}:{request.RequestUri.Port}";
            var span           = ConcurrentContextManager.CreateExitSpan(request.RequestUri.ToString(), contextCarrier, peer, Activity.Current.Id, Activity.Current.ParentId, Activity.Current.FormatRootId());

            Tags.Url.Set(span, request.RequestUri.ToString());
            span.AsHttp();
            span.SetComponent(ComponentsDefine.HttpClient);
            Tags.HTTP.Method.Set(span, request.Method.ToString());
            foreach (var item in contextCarrier.Items)
            {
                request.Headers.Add(item.HeadKey, item.HeadValue);
            }
        }
        public void BeforeExecuteCommand([Property(Name = "Command")] SqlCommand sqlCommand)
        {
            if (ConcurrentContextManager.ContextProperties.ContainsKey(TRACE_ORM))
            {
                return;
            }
            var peer = sqlCommand.Connection.DataSource;
            var span = ConcurrentContextManager.CreateExitSpan(ResolveOperationName(sqlCommand), peer, Activity.Current.Id, Activity.Current.ParentId);

            span.SetLayer(SpanLayer.DB);
            span.SetComponent(ComponentsDefine.SqlClient);
            Tags.DbType.Set(span, "Sql");
            Tags.DbInstance.Set(span, sqlCommand.Connection.Database);
            Tags.DbStatement.Set(span, sqlCommand.CommandText);
            //todo Tags.DbBindVariables
        }