datadog

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsProfilerEnabled

func IsProfilerEnabled() bool

IsProfilerEnabled returns config value from key ignite.datadog.profiler.enabled where default is true.

func IsTracerEnabled

func IsTracerEnabled() bool

IsTracerEnabled returns config value from key ignite.datadog.trace.enabled where default is true.

func NewLogger

func NewLogger() ddtrace.Logger

NewLogger returns implementation of Datadog's Logger interface.

func Service

func Service() string

Service returns config value from key ignite.datadog.service where default is empty.

func StartProfiler

func StartProfiler(ctx context.Context, profileOptions ...profiler.Option)

StartProfiler starts the profiler.

func StartProfilerWithOptions

func StartProfilerWithOptions(ctx context.Context, options *Options, profileOptions ...profiler.Option)

StartProfilerWithOptions start the profiler with options.

func StartTracer

func StartTracer(ctx context.Context, startOptions ...tracer.StartOption)

StartTracer starts the tracer like StartTraceWithOptions but with default Options.

func StartTracerWithOptions

func StartTracerWithOptions(ctx context.Context, options *Options, startOptions ...tracer.StartOption)

StartTracerWithOptions starts the tracer with the given set of options. It will stop and replace any running tracer, meaning that calling it several times will result in a restart of the tracer by replacing the current instance with a new one.

Types

type Logger

type Logger struct {
}

Logger represents Datadog's Logger implementation.

func (*Logger) Log

func (l *Logger) Log(msg string)

Log logs msg according to logLevel

type Options

type Options struct {
	Service string
	Env     string
	Tracer  struct {
		Enabled bool
	}
	Profiler struct {
		Enabled bool
	}
	Tags          map[string]string
	Host          string
	Port          string
	LambdaMode    bool
	Analytics     bool
	AnalyticsRate float64
	DebugMode     bool
	DebugStack    bool
	HttpClient    client.Options
	Version       string
	Log           struct {
		Level string
	}
	Addr string
}

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

Jump to

Keyboard shortcuts

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