Skip to content

Commit

Permalink
feat(sentry): Tag sentry events with additional version details. (#5674)
Browse files Browse the repository at this point in the history
* tagged everything in the version

* print sha256 in hex

Fixes DGRAPH-1692
  • Loading branch information
parasssh authored Jun 24, 2020
1 parent eff3dd9 commit 0088d74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/sentry_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package x

import (
"errors"
"fmt"
"io/ioutil"
"os"
"strings"
Expand Down Expand Up @@ -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)
})

Expand Down

0 comments on commit 0088d74

Please sign in to comment.