Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: reduce sentry environment changed events
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Jan 12, 2022
1 parent de16160 commit d124105
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mntr/ingestion.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (m Monitor) SwitchEnvironment(environment string) {
panic("environment must not be empty")
}

if environment == env {
return
}

m.WithFields(map[string]interface{}{"from": env, "to": environment}).CaptureMessage("Environment changed")

env = environment
Expand Down

0 comments on commit d124105

Please sign in to comment.