public void ServerResponse([Object] GrpcEventData eventData) { var span = ContextManager.ActiveSpan; if (span != null && eventData != null) { Tags.StatusCode.Set(span, eventData.ToString()); } ContextManager.StopSpan(span); }
public void ServerRequest([Object] GrpcEventData eventData) { var contextCarrier = _contextCarrierFactory.Create(); foreach (var item in contextCarrier.Items) { item.HeadValue = eventData.Headers.Where(t => t.Key == item.HeadKey).FirstOrDefault()?.Value; } var span = ContextManager.CreateExitSpan(eventData.Operation, contextCarrier, ""); span.Tag("", ""); }