private void Application_EndRequest(Object source, EventArgs e) { HttpApplication application = (HttpApplication)source; HttpContext context = application.Context; if (_client == null && HttpContext.Current != null && HttpContext.Current.Handler != null) { var zipkinConfig = new ZipkinConfig { Domain = request => new Uri( "https://product.hepsiburada.com"), ZipkinBaseUri = new Uri("http://192.168.99.100:32772"), SpanProcessorBatchSize = 1, SampleRate = 1 }; _client = new ZipkinClient(zipkinConfig, HttpContext.Current); } if (_client != null) { var spanData = context.Items["span"]; if (spanData != null) { var span = spanData as Span; _client.EndServerTrace(span); context.Items.Remove("span"); } } }
private void Application_BeginRequest(Object source, EventArgs e) { HttpApplication application = (HttpApplication)source; HttpContext context = application.Context; if (_client == null && HttpContext.Current != null && HttpContext.Current.Handler != null) { var zipkinConfig = new ZipkinConfig { Domain = request => new Uri( "https://product.hepsiburada.com"), ZipkinBaseUri = new Uri("http://192.168.99.100:32772"), SpanProcessorBatchSize = 1, SampleRate = 1 }; _client = new ZipkinClient(zipkinConfig, HttpContext.Current); } if (_client != null) { Span span = _client.StartServerTrace(context.Request.Url, context.Request.HttpMethod); context.Items.Add("span", span); } }
public void Init() { fixture = new Fixture(); zipkinClient = MockRepository.GenerateStub <IZipkinClient>(); logger = MockRepository.GenerateStub <IMDLogger>(); requestContextModule = new ZipkinRequestContextModule(); requestContextModule.logger = logger; }
public void Init() { fixture = new Fixture(); zipkinClient = MockRepository.GenerateStub<IZipkinClient>(); logger = MockRepository.GenerateStub<IMDLogger>(); requestContextModule = new ZipkinRequestContextModule(); requestContextModule.logger = logger; }
public ListingController(IZipkinClient client) { _client = client; }
public ZipkinMessageHandler(IZipkinClient client, HttpMessageHandler innerHandler) : base(innerHandler) { _client = client; }
public ZipkinMessageHandler(IZipkinClient client) : this(client, new HttpClientHandler()) { }