mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 10:00:44 -05:00
[OpenTelemetry] Add module init tracing (#2711)
Signed-off-by: James Humphries <james@james-humphries.co.uk>
This commit is contained in:
@@ -9,12 +9,15 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
cleanhttp "github.com/hashicorp/go-cleanhttp"
|
||||
getter "github.com/hashicorp/go-getter"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
|
||||
"github.com/opentofu/opentofu/internal/copy"
|
||||
)
|
||||
|
||||
@@ -109,7 +112,9 @@ var goGetterGetters = map[string]getter.Getter{
|
||||
"s3": new(getter.S3Getter),
|
||||
}
|
||||
|
||||
var getterHTTPClient = cleanhttp.DefaultClient()
|
||||
var getterHTTPClient = &http.Client{
|
||||
Transport: otelhttp.NewTransport(cleanhttp.DefaultTransport()),
|
||||
}
|
||||
|
||||
var getterHTTPGetter = &getter.HttpGetter{
|
||||
Client: getterHTTPClient,
|
||||
|
||||
Reference in New Issue
Block a user