Skip to content

Commit

Permalink
feat: Add goroutine count to sentry (#825)
Browse files Browse the repository at this point in the history
🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉

#### Summary

Closes https://github.com/cloudquery/cloudquery-issues/issues/371

Use the following steps to ensure your PR is ready to be reviewed

- [x] Read the [contribution guidelines](../blob/main/.github/CONTRIBUTING.md) 🧑‍🎓
- [x] Run `go fmt` to format your code 🖊
- [x] Lint your changes via `golangci-lint run` 🚨 (install golangci-lint [here](https://golangci-lint.run/usage/install/#local-installation))
- [x] Update or add tests 🧪
- [x] Ensure the status checks below are successful ✅
  • Loading branch information
roneli committed Jun 1, 2022
1 parent 58760b4 commit d4d56c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"os"
"runtime"
"strconv"
"time"

Expand Down Expand Up @@ -105,6 +106,7 @@ func initSentry() {
})
scope.SetExtra("cookie_id", userId.String())
scope.SetExtra("instance_id", instanceId)
scope.SetExtra("goroutine_count", runtime.NumGoroutine())
ulimit, err := limit.GetUlimit()
if err == nil && ulimit.Max != 0 {
scope.SetExtra("current_ulimit", ulimit.Cur)
Expand Down

0 comments on commit d4d56c2

Please sign in to comment.