Skip to content

Commit

Permalink
Set sentry release with current version (#89)
Browse files Browse the repository at this point in the history
* Set sentry release with current version

* fix dup
  • Loading branch information
corest authored Sep 4, 2024
1 parent ed88f56 commit 5b7141c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/getsentry/sentry-go"
"github.com/kubeshark/tracer/misc"
"github.com/kubeshark/tracer/pkg/kubernetes"
"github.com/kubeshark/tracer/pkg/version"
"github.com/kubeshark/tracer/server"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down Expand Up @@ -66,6 +67,7 @@ func main() {
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
Release: version.Ver,
}); err != nil {
log.Error().Err(err).Msg("Sentry initialization failed:")
} else {
Expand Down
8 changes: 8 additions & 0 deletions pkg/version/consts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package version

var (
Ver = "0.0.1"
Branch = "develop"
GitCommitHash = "" // this var is overridden using ldflags in makefile when building
BuildTimestamp = "" // this var is overridden using ldflags in makefile when building
)

0 comments on commit 5b7141c

Please sign in to comment.