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

Commit

Permalink
Merge pull request #933 from caos/compare-sentry-env
Browse files Browse the repository at this point in the history
fix: reduce sentry environment changed events
  • Loading branch information
Elio Bischof authored Jan 12, 2022
2 parents de16160 + d124105 commit 7aa96cd
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 7aa96cd

Please sign in to comment.