...

Source file src/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport_example_test.go

Documentation: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp

     1  // Copyright The OpenTelemetry Authors
     2  // SPDX-License-Identifier: Apache-2.0
     3  
     4  package otelhttp
     5  
     6  import (
     7  	"net/http"
     8  )
     9  
    10  func ExampleNewTransport() {
    11  	// Create an http.Client that uses the (ot)http.Transport
    12  	// wrapped around the http.DefaultTransport
    13  	_ = http.Client{
    14  		Transport: NewTransport(http.DefaultTransport),
    15  	}
    16  }
    17  

View as plain text