diff --git a/contrib/hashicorp/vault/option.go b/contrib/hashicorp/vault/option.go index d6f4312d78..3d25e7867b 100644 --- a/contrib/hashicorp/vault/option.go +++ b/contrib/hashicorp/vault/option.go @@ -24,7 +24,7 @@ type Option interface { apply(*config) } -// OptionFn represents options applicable to NewHTTPClient and WrapHTTPClient. +// OptionFn represents options applicable to [NewHTTPClient] and [WrapHTTPClient]. type OptionFn func(*config) func (fn OptionFn) apply(cfg *config) { @@ -52,7 +52,7 @@ func WithAnalyticsRate(rate float64) OptionFn { } } -// WithService sets the given service name for the http.Client. +// WithService sets the given service name for the [*http.Client]. func WithService(name string) OptionFn { return func(c *config) { c.serviceName = name diff --git a/contrib/hashicorp/vault/vault.go b/contrib/hashicorp/vault/vault.go index 78bb65abe3..b8c0c0fe37 100644 --- a/contrib/hashicorp/vault/vault.go +++ b/contrib/hashicorp/vault/vault.go @@ -3,16 +3,17 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016 Datadog, Inc. -// Package vault contains functions to construct or augment an http.Client that -// will integrate with the github.com/hashicorp/vault/api and collect traces to +// Package vault contains functions to construct or augment an [*http.Client] that +// will integrate with the [github.com/hashicorp/vault/api] and collect traces to // send to Datadog. // -// The easiest way to use this package is to create an http.Client with -// NewHTTPClient, and put it in the Vault API config that is passed to the +// The easiest way to use this package is to create an [*http.Client] with +// [NewHTTPClient], and put it in the Vault [api.Config] that is passed to +// [api.NewClient]. // -// If you are already using your own http.Client with the Vault API, you can -// use the WrapHTTPClient function to wrap the client with the tracer code. -// Your http.Client will continue to work as before, but will also capture +// If you are already using your own [*http.Client] with the Vault API, you can +// use the [WrapHTTPClient] function to wrap the client with the tracer code. +// Your [*http.Client] will continue to work as before, but will also capture // traces. package vault @@ -36,8 +37,8 @@ func init() { instr = instrumentation.Load(instrumentation.PackageHashicorpVaultAPI) } -// NewHTTPClient returns an http.Client for use in the Vault API config -// Client. A set of options can be passed in for further configuration. +// NewHTTPClient returns an [*http.Client] for use in the Vault API config +// [*api.Client]. A set of options can be passed in for further configuration. func NewHTTPClient(opts ...Option) *http.Client { dc := api.DefaultConfig() c := dc.HttpClient @@ -45,7 +46,7 @@ func NewHTTPClient(opts ...Option) *http.Client { return c } -// WrapHTTPClient takes an existing http.Client and wraps the underlying +// WrapHTTPClient takes an existing [*http.Client] and wraps the underlying // transport with tracing. func WrapHTTPClient(c *http.Client, opts ...Option) *http.Client { if c.Transport == nil {