1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-25 22:41:46 +02:00

add shorter version for global providers (#538)

This commit is contained in:
Gustavo Silva Paiva
2020-03-11 12:23:32 -03:00
committed by GitHub
parent 9674c81cb7
commit 85751428a3
16 changed files with 49 additions and 29 deletions

View File

@@ -59,7 +59,7 @@ func main() {
var body []byte
tr := global.TraceProvider().Tracer("example/client")
tr := global.Tracer("example/client")
err := tr.WithSpan(ctx, "say hello",
func(ctx context.Context) error {
req, _ := http.NewRequest("GET", "http://localhost:7777/hello", nil)