Example #1
0
        public Task StartSpan(ClientSpan args)
        {
            //todo validate and throw ex
            var requestUri = _config.GetRequestUri(nameof(StartSpan));

            return(_webApiHelper.PostAsJson(requestUri, args));
        }
Example #2
0
 public Task StartSpan(ClientSpan args)
 {
     if (!args.ValidateNewClientSpan())
     {
         return(Task.FromResult(0));
     }
     return(_commandQueue.Enqueue(StartSpanCommand.Create(args)));
 }
        public Task StartSpan(ClientSpan args)
        {
            var isOk = CheckApiStatusOkSmart();

            if (!isOk)
            {
                return(_nullApiProxy.StartSpan(args));
            }
            return(SafeInvokeTask(Proxy.StartSpan(args)));
        }
Example #4
0
        private ClientSpan CreateSaveClientSpans(string tracerId, string traceId, string parentSpanId, string spanId, string opName, bool withLogs = false)
        {
            var clientSpan     = ClientSpan.Create(tracerId, traceId, parentSpanId, spanId, opName);
            var saveClientSpan = new ClientSpan();

            MyModelHelper.SetProperties(saveClientSpan, clientSpan);
            if (withLogs)
            {
                saveClientSpan.Logs.Add("foo-log-key", LogItem.Create("foo-log-key", "foo-log-value", null));
                saveClientSpan.Tags.Add("foo-tag-key", "foo-tag-value");
            }
            return(saveClientSpan);
        }
Example #5
0
 public Task StartSpan(ClientSpan args)
 {
     return(_clientTracerApi.StartSpan(args));
 }
Example #6
0
 public Task StartSpan(ClientSpan args)
 {
     return(Task.FromResult(0));
 }
Example #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TraceId.Length != 0)
            {
                hash ^= TraceId.GetHashCode();
            }
            if (SpanId.Length != 0)
            {
                hash ^= SpanId.GetHashCode();
            }
            if (ParentSpanId.Length != 0)
            {
                hash ^= ParentSpanId.GetHashCode();
            }
            if (SpanName.Length != 0)
            {
                hash ^= SpanName.GetHashCode();
            }
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            hash ^= SpanTags.GetHashCode();
            if (HttpStatusCode != 0L)
            {
                hash ^= HttpStatusCode.GetHashCode();
            }
            if (ClientSpan != false)
            {
                hash ^= ClientSpan.GetHashCode();
            }
            if (RewriteClientSpanId != false)
            {
                hash ^= RewriteClientSpanId.GetHashCode();
            }
            if (SourceName.Length != 0)
            {
                hash ^= SourceName.GetHashCode();
            }
            if (sourceIp_ != null)
            {
                hash ^= SourceIp.GetHashCode();
            }
            if (DestinationName.Length != 0)
            {
                hash ^= DestinationName.GetHashCode();
            }
            if (destinationIp_ != null)
            {
                hash ^= DestinationIp.GetHashCode();
            }
            if (RequestSize != 0L)
            {
                hash ^= RequestSize.GetHashCode();
            }
            if (RequestTotalSize != 0L)
            {
                hash ^= RequestTotalSize.GetHashCode();
            }
            if (ResponseSize != 0L)
            {
                hash ^= ResponseSize.GetHashCode();
            }
            if (ResponseTotalSize != 0L)
            {
                hash ^= ResponseTotalSize.GetHashCode();
            }
            if (ApiProtocol.Length != 0)
            {
                hash ^= ApiProtocol.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public Task StartSpan(ClientSpan args)
 {
     StartSpanInvoked = true;
     return(Task.FromResult(0));
 }