coopdatadog

package module
v2.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 9 Imported by: 0

README

Coop Datadog Go package

Build

Plug and play package that wraps base functionally and initialization of Datadog Service.

  • APM, StatsD Initialization
  • StatsD metrics unification

Supported middleware to correlate/extend traceability and logs in Datadog.

  • gRPC Server
  • gRPC Client
  • HTTP - Echo
  • HTTP - Standard library Client
  • Database - GORM
  • Database - Standard library

Documentation

There is detailed documentation stored in docs.

Mocks

To generate or update mocks use gomockhandler. gomockhandler is provided by golang-devtools.

Check mocks
docker compose run --rm golang-devtools gomockhandler -config ./gomockhandler.json check
Generate / Update mocks
docker compose run --rm golang-devtools gomockhandler -config ./gomockhandler.json mockgen

Development workflow

Validate
docker compose run --rm golang-devtools validate
Other targets
docker compose run --rm golang-devtools help

User documentation

User documentation is build using TechDocs and published to Inventory.

To list the commands available for the TechDocs image:

docker compose run --rm help

For more information see the TechDocs Engineering Image.

Documentation validation

To Validate changed documentation:

docker compose run --rm techdocs validate

To validate all documentation:

docker compose run --rm techdocs validate MARKDOWN_FILES=docs/
Documentation preview

To preview the documentation:

docker compose up techdocs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GracefulDatadogShutdown

func GracefulDatadogShutdown()

GracefulDatadogShutdown of executed parallel processes

func StartDatadog

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

Types

type ConnectionType

type ConnectionType byte

ConnectionType enum type

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
	ConnectionTypeAuto
)

Directories

Path Synopsis
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.
middleware

Jump to

Keyboard shortcuts

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