Skip to content

Instantly share code, notes, and snippets.

@gronnbeck
Last active March 8, 2016 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gronnbeck/236e8f68d2b0d13ad3ce to your computer and use it in GitHub Desktop.
Save gronnbeck/236e8f68d2b0d13ad3ce to your computer and use it in GitHub Desktop.
var (
envTag = fmt.Sprintf("environment-%s", os.Getenv("environment"))
)
func PostOK() {
event := datadog.Event{
Title: "SyntheticTransaction: OK",
Text: "Synthetic transaction succeded. The API is working as expected.",
Time: int(time.Now().UTC().Unix()),
AlertType: "info",
Tags: []string{"api-ok", envTag},
}
_, err := ddClient.PostEvent(&event)
if err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment