Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTracingToClient ¶ added in v2.8.0
AddTracingToClient wraps the net/http.Client to automatically create child-spans, and append to HTTP Headers.
func WrapClient
deprecated
Types ¶
type Option ¶ added in v2.8.0
type Option func(cfg *config)
Option allows for overriding our default-config.
func WithCustomTag ¶ added in v2.8.0
WithCustomTag will attach the value to the span tagged by the key.
func WithRequestIgnorer ¶ added in v2.8.0
func WithRequestIgnorer(requestIgnorer RequestIgnorer) Option
WithRequestIgnorer specifies a function that will be called to determined if the request should be traced or not.
func WithResourceNamer ¶ added in v2.8.0
func WithResourceNamer(resourceNamer ResourceNamer) Option
WithResourceNamer specifies a function that will be called to determine what the ResourceName of the span should be. For example, in the span "http.client https://coop.no/", the ResourceName is "https://coop.no/"
func WithServiceName ¶ added in v2.8.0
WithServiceName overrides the service-name set in environment-variable "DD_SERVICE".
type RequestIgnorer ¶ added in v2.8.0
RequestIgnorer is a function that will be called to determine if the request should be traced or not.
type ResourceNamer ¶ added in v2.8.0
ResourceNamer is a function that will be called to determine what the ResourceName of the span should be.
func FullURLResourceNamer ¶ added in v2.8.0
func FullURLResourceNamer() ResourceNamer
FullURLResourceNamer will name the ResourceName to "GET https://www.coop.no/api/some-service/some-endpoint" NOTE! This might leak unintended user-ids, if they are part of the URL-path.
func FullURLWithParamsResourceNamer ¶ added in v2.8.0
func FullURLWithParamsResourceNamer() ResourceNamer
FullURLWithParamsResourceNamer will name the ResourceName to "GET https://www.coop.no/api/some-service/some-endpoint?foo=bar" NOTE! This might leak unintended user-ids, credentials, or other things that are part of a URL.
func HostResourceNamer ¶ added in v2.8.0
func HostResourceNamer() ResourceNamer
HostResourceNamer will name the ResourceName to "www.coop.no"
func StaticResourceNamer ¶ added in v2.8.0
func StaticResourceNamer(str string) ResourceNamer
StaticResourceNamer will set every span's ResourceName to str.