*http.Request) { client := &http.Client{Transport: &ochttp.Transport{ Propagation: &tracecontext.HTTPFormat{}, }} ctx, span := trace.StartSpan(req.Context(), "in a") defer span.End() r, _ := http.NewRequest("GET", "http://localhost:50030/b", nil) resp, err := client.Do(r.WithContext(ctx)) if err != nil { log.Println(err) } _ = resp fmt.Fprintf(w, "I am /a") }) http.HandleFunc("/b", func(w http.ResponseWriter, req *http.Request) { _, span := trace.StartSpan(req.Context(), "in b") defer span.End() fmt.Fprintf(w, "I am /b") }) log.Fatal(http.ListenAndServe(":50030", &ochttp.Handler{ Propagation: &tracecontext.HTTPFormat{}, }))