contrib/hashicorp/vault
Those integration are enabled by having the
following import in the project’s orchestrion.tool.go file:
import (
_ "github.com/DataDog/orchestrion"
_ "github.com/DataDog/dd-trace-go/contrib/hashicorp/vault/v2" // integration
//...
)Official package for interacting with a Vault server.
Config
Struct literal
api.Config- Pointer or Value
Replace the expression using the template:
// Using the following synthetic imports:
import (
vaulttrace "github.com/DataDog/dd-trace-go/contrib/hashicorp/vault/v2"
){{- .AST.Type -}}{
{{- $hasField := false -}}
{{ range .AST.Elts }}
{{- if eq .Key.Name "HttpClient" }}
{{- $hasField = true -}}
HttpClient: vaulttrace.WrapHTTPClient({{ .Value }}),
{{- else -}}
{{ . }},
{{ end -}}
{{ end }}
{{- if not $hasField -}}
HttpClient: vaulttrace.NewHTTPClient(),
{{- end }}
}