Documentation ¶
Overview ¶
Package globalconfig stores configuration which applies globally to both the tracer and integrations.
Index ¶
- func AnalyticsRate() float64
- func ClearHeaderTags()
- func HeaderTag(header string) string
- func HeaderTagMap() *internal.LockMap
- func HeaderTagsLen() int
- func PushStat(stat internal.Stat)
- func RuntimeID() string
- func ServiceName() string
- func SetAnalyticsRate(rate float64)
- func SetHeaderTag(from, to string)
- func SetServiceName(name string)
- func SetStatsCarrier(sc *internal.StatsCarrier)
- func StatsCarrier() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyticsRate ¶
func AnalyticsRate() float64
AnalyticsRate returns the sampling rate at which events should be marked. It uses synchronizing mechanisms, meaning that for optimal performance it's best to read it once and store it.
func ClearHeaderTags ¶ added in v1.53.0
func ClearHeaderTags()
ClearHeaderTags assigns headersAsTags to a new, empty map It is invoked when WithHeaderTags is called, in order to overwrite the config
func HeaderTag ¶ added in v1.53.0
HeaderTag returns the configured tag for a given header. This function exists for testing purposes, for performance you may want to use `HeaderTagMap`
func HeaderTagMap ¶ added in v1.53.0
HeaderTagMap returns the mappings of headers to their tag values
func HeaderTagsLen ¶ added in v1.53.0
func HeaderTagsLen() int
HeaderTagsLen returns the length of globalconfig's headersAsTags map, 0 for empty map
func PushStat ¶ added in v1.62.0
PushStat pushes the stat onto the StatsCarrier's stats channel, via the Add method
func RuntimeID ¶ added in v1.26.0
func RuntimeID() string
RuntimeID returns this process's unique runtime id.
func ServiceName ¶ added in v1.24.0
func ServiceName() string
ServiceName returns the default service name used by non-client integrations such as servers and frameworks.
func SetAnalyticsRate ¶
func SetAnalyticsRate(rate float64)
SetAnalyticsRate sets the given event sampling rate globally.
func SetHeaderTag ¶ added in v1.53.0
func SetHeaderTag(from, to string)
SetHeaderTag adds config for header `from` with tag value `to`
func SetServiceName ¶ added in v1.24.0
func SetServiceName(name string)
SetServiceName sets the global service name set for this application.
func SetStatsCarrier ¶ added in v1.62.0
func SetStatsCarrier(sc *internal.StatsCarrier)
SetStatsCarrier sets the provided StatsCarrier onto the globalconfig
func StatsCarrier ¶ added in v1.62.0
func StatsCarrier() bool
StatsCarrier returns true if there is a StatsCarrier on the globalconfig, else false
Types ¶
This section is empty.