Documentation ¶
Index ¶
- Variables
- func FormatDebugStats(stats []byte) (string, error)
- func ScanLines(data []byte, atEOF bool) (advance int, token []byte, eol bool, err error)
- type Server
- func (s *Server) Capture(p string, d time.Duration, compressed bool) error
- func (s *Server) DisableMetricsStats()
- func (s *Server) EnableMetricsStats()
- func (s *Server) GetJSONDebugStats() ([]byte, error)
- func (s *Server) ServerlessFlush()
- func (s *Server) SetExtraTags(tags []string)
- func (s *Server) Stop()
Constants ¶
This section is empty.
Variables ¶
var (
// CardinalityTagPrefix is used to set the dynamic cardinality
CardinalityTagPrefix = "dd.internal.card:"
)
Functions ¶
func FormatDebugStats ¶
FormatDebugStats returns a printable version of debug stats.
Types ¶
type Server ¶
type Server struct { Statistics *util.Stats Started bool Debug *dsdServerDebug TCapture *replay.TrafficCapture // ServerlessMode is set to true if we're running in a serverless environment. ServerlessMode bool UdsListenerRunning bool // contains filtered or unexported fields }
Server represent a Dogstatsd server
func NewServer ¶
func NewServer(aggregator *aggregator.BufferedAggregator, extraTags []string) (*Server, error)
NewServer returns a running DogStatsD server. If extraTags is nil, they will be read from DD_DOGSTATSD_TAGS if set.
func (*Server) Capture ¶
Capture starts a traffic capture at the specified path and with the specified duration, an empty path will default to the default location. Returns an error if any.
func (*Server) DisableMetricsStats ¶
func (s *Server) DisableMetricsStats()
DisableMetricsStats disables the debug mode of the DogStatsD server and stops the debug mainloop.
func (*Server) EnableMetricsStats ¶
func (s *Server) EnableMetricsStats()
EnableMetricsStats enables the debug mode of the DogStatsD server and start the debug mainloop collecting the amount of metrics received.
func (*Server) GetJSONDebugStats ¶
GetJSONDebugStats returns jsonified debug statistics.
func (*Server) ServerlessFlush ¶
func (s *Server) ServerlessFlush()
ServerlessFlush flushes all the data to the aggregator to them send it to the Datadog intake.
func (*Server) SetExtraTags ¶
SetExtraTags sets extra tags. All metrics sent to the DogstatsD will be tagged with them.