config

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatadogConfig

type DatadogConfig struct {
	// Env where application is executed, dev, production, staging etc
	Env string `mapstructure:"dd_env" json:"dd_env,omitempty"`
	// Service how must be service called and displayed in Datadog system
	Service string `mapstructure:"dd_service" json:"dd_service,omitempty"`
	// ServiceVersion depends on system, can be Git Tag or API version
	ServiceVersion string `mapstructure:"dd_version" json:"dd_service_version,omitempty"`
	// DSD Socket path for DD StatsD, important to have unix prefix for that value, example: unix:///var/run/dd/dsd.socket
	DSD string `mapstructure:"dd_dogstatsd_url" json:"dd_dsd,omitempty"`
	// APM Socket path for apm and profiler, unix prefix not needed, example: /var/run/dd/apm.socket
	APM string `mapstructure:"dd_trace_agent_url" json:"dd_apm,omitempty"`
	// EnableExtraProfiling flag enables more optional profilers not recommended for production.
	EnableExtraProfiling bool `mapstructure:"dd_enable_extra_profiling" json:"dd_enable_extra_profiling,omitempty"`
}

DatadogConfig that required to connect to Datadog Agent

func (DatadogConfig) GetApmEndpoint

func (d DatadogConfig) GetApmEndpoint() string

GetApmEndpoint Socket path or URL for APM and profiler unix prefix not needed, example: /var/run/dd/apm.socket

func (DatadogConfig) GetDsdEndpoint

func (d DatadogConfig) GetDsdEndpoint() string

GetDsdEndpoint Socket path or URL for DD StatsD for socket important to have unix prefix for that value, example: unix:///var/run/dd/dsd.socket

func (DatadogConfig) GetEnv

func (d DatadogConfig) GetEnv() string

GetEnv where application is executed, dev, production, staging etc

func (DatadogConfig) GetService

func (d DatadogConfig) GetService() string

GetService how must be service called and displayed in Datadog system

func (DatadogConfig) GetServiceVersion

func (d DatadogConfig) GetServiceVersion() string

GetServiceVersion depends on system, can be Git Tag or API version

func (DatadogConfig) IsDataDogConfigValid

func (d DatadogConfig) IsDataDogConfigValid() bool

IsDataDogConfigValid method to verify if configuration values are correct

func (DatadogConfig) IsExtraProfilingEnabled

func (d DatadogConfig) IsExtraProfilingEnabled() bool

IsExtraProfilingEnabled return true if profilers not recommended for production are enabled.

type DatadogParameters

type DatadogParameters interface {
	// GetEnv where application is executed, dev, production, staging etc
	GetEnv() string
	// GetService how must be service called and displayed in Datadog system
	GetService() string
	// GetServiceVersion depends on system, can be Git Tag or API version
	GetServiceVersion() string
	// GetDsdEndpoint Socket path or URL for DD StatsD
	GetDsdEndpoint() string
	// GetApmEndpoint Socket path or URL for APM and profiler
	GetApmEndpoint() string
	// IsExtraProfilingEnabled flag enables more optional profilers not recommended for production.
	IsExtraProfilingEnabled() bool
	// IsDataDogConfigValid method to verify if configuration values are correct
	IsDataDogConfigValid() bool
}

DatadogParameters for connection and configuring background process to send information to Datadog Agent

Jump to

Keyboard shortcuts

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