Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extracts a list of datadog tags using the "ddtag" struct member tags
Example ¶
package main import ( "fmt" "strings" "github.com/webdestroya/ddtags" ) type SimpleTags struct { Service string `ddtag:"service_name"` AvailZone string `ddtag:"availability-zone"` Tier string `ddtag:"tier"` } func main() { tags := &SimpleTags{ Service: "dummy-service", Tier: "gold", } fmt.Println(strings.Join(ddtags.Extract(tags), ",")) }
Output: service_name:dummy-service,tier:gold
func MetricWithTimestamp ¶
Types ¶
type Config ¶
type Config struct { // Datadog's MetricWithTimestamp function // it's probably ddlambda.MetricWithTimestamp MetricWithTimestamp func(string, float64, time.Time, ...string) // The string format passed to fmt.Sprintf for integer values // Default: '%d' IntegerFormat string // The string format passed to fmt.Sprintf for float values // Default: '%0.5f' FloatFormat string }
Click to show internal directories.
Click to hide internal directories.