datadog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "datadog"

Variables

This section is empty.

Functions

func New

func New(tree config.Tree, o ...tracing.TracerOption) (tracing.Tracer, error)

Types

type AnalyticsConfig

type AnalyticsConfig struct {
	// Enabled tells whether Trace Search & Analytics should be enabled for integrations.
	Enabled bool `toml:"enabled"`
	// Rate sets the global sampling rate for sampling APM events.
	Rate *float64 `toml:"rate"`
}

type Config

type Config struct {
	// AgentAddr sets address where the agent is located. The default is
	// localhost:8126. It should contain both host and port.
	AgentAddr string `toml:"agent_addr"`
	// Service-related configuration, such as name and version
	Service ServiceConfig `toml:"service"`
	// DataDog Analytics-related configuration
	Analytics AnalyticsConfig `toml:"analytics"`
	// Tags sets a key/value pair which will be set as a tag on all spans
	// created by tracer.
	Tags map[string]string `toml:"tags"`
}

Config configures DataDog Tracer

type Logger

type Logger struct {
	// L is a spine logger
	L log.Logger
}

Logger wraps Datadog logs with spine

func (*Logger) Log

func (l *Logger) Log(msg string)

Log prints the given message.

type ServiceConfig

type ServiceConfig struct {
	// Name specifies the service name to use on the tracer.
	Name string `toml:"name"`
	// Version specifies the version of the service that is running. This will
	// be included in spans from this service in the "version" tag.
	Version string `toml:"version"`
}

type Tracer

type Tracer struct {
	Tracer opentracing.Tracer
}

func (*Tracer) Close

func (t *Tracer) Close() error

func (*Tracer) Extract

func (t *Tracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)

func (*Tracer) Inject

func (t *Tracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error

func (*Tracer) StartSpan

func (t *Tracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span

Jump to

Keyboard shortcuts

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