-
-
Save gronnbeck/236e8f68d2b0d13ad3ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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