You've already forked opentelemetry-go
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:
committed by
GitHub
parent
9674c81cb7
commit
85751428a3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user