From 0088d7492a7ac22be1e7b57f80b60b4b5489415b Mon Sep 17 00:00:00 2001 From: parasssh Date: Wed, 24 Jun 2020 13:53:36 -0700 Subject: [PATCH] feat(sentry): Tag sentry events with additional version details. (#5674) * tagged everything in the version * print sha256 in hex Fixes DGRAPH-1692 --- x/sentry_integration.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/sentry_integration.go b/x/sentry_integration.go index 16bfe3634e1..bbe05d904e9 100644 --- a/x/sentry_integration.go +++ b/x/sentry_integration.go @@ -18,6 +18,7 @@ package x import ( "errors" + "fmt" "io/ioutil" "os" "strings" @@ -99,6 +100,10 @@ func FlushSentry() { func ConfigureSentryScope(subcmd string) { sentry.ConfigureScope(func(scope *sentry.Scope) { scope.SetTag("dgraph", subcmd) + scope.SetTag("checksum", fmt.Sprintf("%x", ExecutableChecksum())) + scope.SetTag("commit", lastCommitSHA) + scope.SetTag("commit_ts", lastCommitTime) + scope.SetTag("branch", gitBranch) scope.SetLevel(sentry.LevelFatal) })