Documentation ¶
Overview ¶
Package tracer defined basic trace wraps.
Index ¶
- type DiscardLogger
- type StartOption
- func WithAgentAddr(host, port string) StartOption
- func WithDebug(debug bool) StartOption
- func WithEnv(env string) StartOption
- func WithGlobalTag(key string, value interface{}) StartOption
- func WithLogsStartup(startup bool) StartOption
- func WithService(service string) StartOption
- func WithTraceEnabled(enabled bool) StartOption
- func WithVersion(version string) StartOption
- type StdLogger
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscardLogger ¶
type DiscardLogger struct{}
func (*DiscardLogger) Log ¶
func (*DiscardLogger) Log(msg string)
type StartOption ¶
type StartOption func(t *Tracer)
func WithAgentAddr ¶
func WithAgentAddr(host, port string) StartOption
func WithDebug ¶
func WithDebug(debug bool) StartOption
func WithEnv ¶
func WithEnv(env string) StartOption
func WithGlobalTag ¶
func WithGlobalTag(key string, value interface{}) StartOption
func WithLogsStartup ¶
func WithLogsStartup(startup bool) StartOption
func WithService ¶
func WithService(service string) StartOption
func WithTraceEnabled ¶
func WithTraceEnabled(enabled bool) StartOption
func WithVersion ¶
func WithVersion(version string) StartOption
type Tracer ¶
type Tracer struct { Host string `toml:"host" yaml:"host"` // env: DD_AGENT_HOST Port string `toml:"port" yaml:"port"` // env: DD_TRACE_AGENT_PORT Service string `toml:"service" yaml:"service"` // env: DD_SERVICE Version string `toml:"version" yaml:"version"` // env: DD_VERSION Env string `toml:"env" yaml:"env"` // env: DD_ENV LogsStartup bool `toml:"logs_startup" yaml:"logs_startup"` // env: DD_TRACE_STARTUP_LOGS Debug bool `toml:"debug" yaml:"debug"` // env: DD_TRACE_DEBUG TraceEnabled bool `toml:"trace_enabled" yaml:"trace_enabled"` // env: DD_TRACE_ENABLED Tags map[string]interface{} `toml:"tags" yaml:"tags"` // env: DD_TAGS // contains filtered or unexported fields }
func (*Tracer) GetStartOptions ¶
func (t *Tracer) GetStartOptions(opts ...StartOption) []tracer.StartOption
Click to show internal directories.
Click to hide internal directories.