tracer

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tracer defined basic trace wraps.

Index

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 StdLogger

type StdLogger struct{}

func (*StdLogger) Log

func (*StdLogger) Log(msg string)

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

Jump to

Keyboard shortcuts

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