Documentation
¶
Index ¶
Constants ¶
const (
// PropagationKey is the key to use to propagate the pathway between services.
PropagationKey = "dd-pathway-ctx"
)
Variables ¶
This section is empty.
Functions ¶
func MergeContexts ¶
MergeContexts returns the first context which includes the pathway resulting from merging the pathways contained in all contexts.
func Start ¶
func Start(opts ...StartOption)
Start starts the pipeline processor that will record pipeline stats and send them to the agent.
Types ¶
type Pathway ¶
type Pathway struct {
// contains filtered or unexported fields
}
Pathway represents a path points can take. It is defined as nodes (services) linked together with edges. To reduce the size of the propagated serialized pathway, instead of storing a list of edges and services, a hash of the path is computed. The hash is then resolved in the Datadog backend.
func FromContext ¶
FromContext returns the pathway contained in the given context.
func SetCheckpoint ¶
SetCheckpoint sets a checkpoint on the pathway in the context. if there is no pathway in the context, it creates a new one.
func (Pathway) SetCheckpoint ¶
SetCheckpoint sets a checkpoint on a pathway.
type StartOption ¶
type StartOption func(*config)
StartOption represents a function that can be provided as a parameter to Start.
func WithAgentAddr ¶
func WithAgentAddr(addr string) StartOption
WithAgentAddr sets the address where the agent is located. The default is localhost:8126. It should contain both host and port.
func WithAgentLess ¶
func WithAgentLess(apiKey string) StartOption
WithAgentLess starts the pipeline processor in a mode where stats are sent directly to the datadog backend instead of going through the agent.
func WithDogstatsdAddress ¶
func WithDogstatsdAddress(addr string) StartOption
WithDogstatsdAddress specifies the address to connect to for sending metrics to the Datadog Agent. If not set, it defaults to "localhost:8125" or to the combination of the environment variables DD_AGENT_HOST and DD_DOGSTATSD_PORT. This option is in effect when WithRuntimeMetrics is enabled.
func WithEnv ¶
func WithEnv(env string) StartOption
WithEnv sets the environment to which all traces started by the tracer will be submitted. The default value is the environment variable DD_ENV, if it is set.
func WithService ¶
func WithService(name string) StartOption
WithService sets the default service name for the program.
func WithSite ¶
func WithSite(site string) StartOption
WithSite starts the pipeline processor with a given site to send data to.