distributed-tracing

SpanContext not found in Extract carrier in microservice

南笙酒味 提交于 2020-02-05 06:31:28
问题 I am trying to implement a Go-based microservice system. I have two service and I try to Inject and Extract span data. In my first service, I have: func (apitracer apiTracer) validatemail(res http.ResponseWriter, req *http.Request) { validateEmailSpan := apitracer.tracer.StartSpan("Validate Email") apitracer.tracer.Inject( validateEmailSpan.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(req.Header)) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") resp,

Distributed tracing with golang http.PostForm

倖福魔咒の 提交于 2020-01-30 11:05:55
问题 In my project, I try to implement distributed tracing using opentracing . My microservice has following structure. -- API-Gateway |_ User-Service |_ Notification In my API-gateway, I start and in API gateway, I use a to a function to start tracing, code is taken from Setting up your tracer in main() : gatewayTracer := &apiTracer{tracer: startTracing("API Gateway")} http.HandleFunc("/getemail", gatewayTracer.validatemail) func (apitracer apiTracer) validatemail(res http.ResponseWriter, req

Distributed tracing with golang http.PostForm

我是研究僧i 提交于 2020-01-30 11:04:44
问题 In my project, I try to implement distributed tracing using opentracing . My microservice has following structure. -- API-Gateway |_ User-Service |_ Notification In my API-gateway, I start and in API gateway, I use a to a function to start tracing, code is taken from Setting up your tracer in main() : gatewayTracer := &apiTracer{tracer: startTracing("API Gateway")} http.HandleFunc("/getemail", gatewayTracer.validatemail) func (apitracer apiTracer) validatemail(res http.ResponseWriter, req

Distributed tracing with golang http.PostForm

吃可爱长大的小学妹 提交于 2020-01-30 11:04:31
问题 In my project, I try to implement distributed tracing using opentracing . My microservice has following structure. -- API-Gateway |_ User-Service |_ Notification In my API-gateway, I start and in API gateway, I use a to a function to start tracing, code is taken from Setting up your tracer in main() : gatewayTracer := &apiTracer{tracer: startTracing("API Gateway")} http.HandleFunc("/getemail", gatewayTracer.validatemail) func (apitracer apiTracer) validatemail(res http.ResponseWriter, req

How to pass opentracing data using json

时光毁灭记忆、已成空白 提交于 2020-01-22 02:35:53
问题 My API-gateway starts a tracer and a span for validate email. Then its passed to user-service for validation. I want to pass this span details to user-service as a json object and start another span as a tracer.start_span('Validate Email', child_of=API_gateway_span) To do it, I have used following struct: type checkEmail struct { GatewayTracerSpan opentracing.SpanContext `json: gatewayTracerSpan` Email string `json: email` Uuid string `json: uuid` } In function() validateEmailSpan :=

POST data faild using http.NewRequest

空扰寡人 提交于 2020-01-21 19:15:09
问题 I am trying to pass data from one golang service to another using http.NewRequest() . To do it I used following code: httpClient := http.Client{} userserviceUrl := "http://user:7071/checkemail" form := url.Values{} form.Set("uuid", uuid) form.Set("email", email) b := bytes.NewBufferString(form.Encode()) req, err := http.NewRequest("POST", userserviceUrl, b) if err != nil { log.Println(err) } opentracing.GlobalTracer().Inject( validateEmailSpan.Context(), opentracing.HTTPHeaders, opentracing

How to tracing a request through a chain of microservices end-to-end?

喜夏-厌秋 提交于 2020-01-13 17:10:13
问题 I am using OpenCensus in Go to push tracing data to Stackdriver for calls involving a chain of 2 or more micro services and I noticed that I get many traces which contain spans only for certain services but not the entire end to end call. At the moment I attribute this to the fact that not all calls are traced (only a certain sample) and each service decides whether to trace its current span or not. Is this the way it is intended to work? Is there any way to make sure when a trace is sampled,

Istio distributed tracing with Jaeger not working

筅森魡賤 提交于 2020-01-02 08:24:17
问题 I'm trying to set up a local k8s cluster and on minikube with installed istio and I have an issue with enabling distributed tracing with Jaeger. I have 3 microservices A -> B -> C . I am propagating the all the headers that are needed: {"x-request-id", "x-b3-traceid", "x-b3-spanid", "x-b3-parentspanid", "x-b3-sampled", "x-b3-flags", "x-ot-span-context"} But on Jaeger interface, I can only see the request to the service A and I cannot see the request going to service B. I have logged the

How to configure Jaeger with elasticsearch?

夙愿已清 提交于 2019-12-19 02:48:07
问题 I have tried executing this docker command to setup Jaeger Agent and jaeger collector with elasticsearch. sudo docker run \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -e SPAN_STORAGE_TYPE=elasticsearch \ --name=jaeger \ jaegertracing/all-in-one:latest but this command gives the below error. How to configure Jaeger with ElasticSearch? "msg":"Failed to init storage factory","error":"health check timeout: no Elasticsearch node

Istio distributed tracing with Jaeger not working

邮差的信 提交于 2019-12-06 03:19:04
I'm trying to set up a local k8s cluster and on minikube with installed istio and I have an issue with enabling distributed tracing with Jaeger. I have 3 microservices A -> B -> C . I am propagating the all the headers that are needed: {"x-request-id", "x-b3-traceid", "x-b3-spanid", "x-b3-parentspanid", "x-b3-sampled", "x-b3-flags", "x-ot-span-context"} But on Jaeger interface, I can only see the request to the service A and I cannot see the request going to service B. I have logged the headers that are sent in the request. Headers from service A: Header - x-request-id: c2804368-2ff0-9d90-a2aa