Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GracefulDatadogShutdown
deprecated
func GracefulDatadogShutdown()
GracefulDatadogShutdown of executed parallel processes
Deprecated: Use the StopFunc returned coopdatadog.Start() instead.
func StartDatadog
deprecated
func StartDatadog(cfg config.DatadogParameters, connectionType ConnectionType) error
StartDatadog parallel process to collect data for Datadog. connectionType flag related to Datadog connection type, it supports HTTP or socket - values will be used from config.DatadogParameters
Deprecated: Use coopdatadog.Start() instead.
Types ¶
type ConnectionType
deprecated
type ConnectionType byte
ConnectionType enum type
Deprecated: Use coopdatadog.Start() instead.
const ( // ConnectionTypeSocket sets the connection to Datadog to go through a UNIX socket // // Deprecated: ConnectionTypeSocket. ConnectionTypeAuto should be used. ConnectionTypeSocket ConnectionType = iota // ConnectionTypeHTTP sets the connection to Datadog to go over HTTP // // Deprecated: ConnectionTypeHTTP. ConnectionTypeAuto should be used. ConnectionTypeHTTP // ConnectionTypeAuto sets connection to HTTP or UNIX depending on supplied configuration of DD_TRACE_AGENT_URL // // Deprecated: Use coopdatadog.Start() instead. ConnectionTypeAuto )
type Option ¶ added in v2.16.0
type Option func(*options) error
Option is used to configure the behaviour of the Datadog integration.
func WithErrorHandler ¶ added in v2.16.0
func WithErrorHandler(handler errors.ErrorHandler) Option
WithErrorHandler allows for setting a custom ErrorHandler to be called on function that may error but does not return an error
func WithMetricsOptions ¶ added in v2.16.0
WithMetricsOptions allows for passing the options for setting up metrics
func WithNoStopTimeout ¶ added in v2.16.0
func WithNoStopTimeout() Option
WithNoStopTimeout waits for graceful shutdown to complete regardless of how long.
func WithStopTimeout ¶ added in v2.16.0
WithStopTimeout sets the allowed time for graceful shutdown, defaults to 10 seconds.
type StopFunc ¶ added in v2.16.0
type StopFunc func() error
StopFunc is a function signature for functions that stops the Datadog integration.
func Start ¶ added in v2.16.0
Start the Datadog integration, use the returned Cancel function to stop the Datadog integration. When calling the StopFunc function traces will be flushed and profiling will be stopped to Datadog.
Example ¶
package main import ( "context" coopdatadog "github.com/coopnorge/go-datadog-lib/v2" ) func main() { err := run() if err != nil { panic(err) } } func run() error { stop, err := coopdatadog.Start(context.Background()) if err != nil { return err } defer func() { err := stop() if err != nil { panic(err) } }() // ... return nil }
Output:
Directories
¶
Path | Synopsis |
---|---|
Package integration setups up integration tests that tests the combination of multiple server and client packages.
|
Package integration setups up integration tests that tests the combination of multiple server and client packages. |
generated/mocks/DataDog/datadog-go/v5/statsd
Code generated by MockGen.
|
Code generated by MockGen. |
generated/mocks/labstack/echo/v4
Code generated by MockGen.
|
Code generated by MockGen. |
generated/mocks/metric
Code generated by MockGen.
|
Code generated by MockGen. |
Package metric implements custom metrics with Dogstatsd
|
Package metric implements custom metrics with Dogstatsd |
Package metrics implements custom metrics with Dogstatsd
|
Package metrics implements custom metrics with Dogstatsd |
middleware
|
|