globalconfig

package
v2.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package globalconfig stores configuration which applies globally to both the tracer and integrations.

Index

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

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

func HeaderTag(header string) string

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

func HeaderTagMap() *internal.LockMap

HeaderTagMap returns the mappings of headers to their tag values

func HeaderTagsLen

func HeaderTagsLen() int

HeaderTagsLen returns the length of globalconfig's headersAsTags map, 0 for empty map

func RuntimeID

func RuntimeID() string

RuntimeID returns this process's unique runtime id.

func ServiceName

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

func SetHeaderTag(from, to string)

SetHeaderTag adds config for header `from` with tag value `to`

func SetServiceName

func SetServiceName(name string)

SetServiceName sets the global service name set for this application.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL