{"id":16284087,"url":"https://github.com/wichert/k8s-sentry","last_synced_at":"2025-07-18T13:35:49.366Z","repository":{"id":47263729,"uuid":"216821837","full_name":"wichert/k8s-sentry","owner":"wichert","description":"Report kubernetes events to Sentry","archived":false,"fork":false,"pushed_at":"2023-05-11T05:22:06.000Z","size":559,"stargazers_count":100,"open_issues_count":13,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T22:02:58.519Z","etag":null,"topics":["golang","kubernetes","kubernetes-monitoring","monitoring","sentry"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wichert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-22T13:33:25.000Z","updated_at":"2024-11-16T16:54:56.000Z","dependencies_parsed_at":"2024-10-27T10:51:53.635Z","dependency_job_id":"70623432-f4f1-495a-9e91-1db97aff54e9","html_url":"https://github.com/wichert/k8s-sentry","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/wichert/k8s-sentry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fk8s-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fk8s-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fk8s-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fk8s-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wichert","download_url":"https://codeload.github.com/wichert/k8s-sentry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fk8s-sentry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265769149,"owners_count":23825241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","kubernetes","kubernetes-monitoring","monitoring","sentry"],"created_at":"2024-10-10T19:17:09.206Z","updated_at":"2025-07-18T13:35:49.018Z","avatar_url":"https://github.com/wichert.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-sentry\n\n_k8s-sentry_ is a simple tool to monitor a [Kubernetes](https://kubernetes.io) cluster and report all operational issues to [Sentry](http://sentry.io).\n\n![Screenshot](docs/screenshot.png)\n\nThere are two alternatives implementations:\n\n- [getsentry/sentry-kubernetes](https://github.com/getsentry/sentry-kubernetes): The official Sentry kubernetes reporter. This is not actively maintained and suffers from a [major memory leak](https://github.com/getsentry/sentry-kubernetes/issues/7).\n- [stevelacy/go-sentry-kubernetes](https://github.com/stevelacy/go-sentry-kubernetes): An alternative go implementation. This watches for Pod status changes only. This causes it to several event types (missing volumes, ingress errors, etc.).\n\n_k8s-sentry_ watches for several things:\n\n- All warning and error events\n- Pod containers terminating with a non-zero exit code\n- Pods failing completely\n\n## Deployment\n\nSee [deploy](deploy/) for Kubernetes manifests and installation instructions.\n\n## Configuration\n\nConfiguration is done completely via environment variables.\n\n| Variable | Description |\n| -- | -- |\n| `SENTRY_DSN` | **Required** DSN for a Sentry project. |\n| `SENTRY_ENVIRONMENT` | Environment for Sentry issues. If not set the namespace is used as environment. |\n| `NAMESPACE` | Comma separated set of namespaces to minitor. If not set all namespaces are monitored (as far as permissions allow) |\n\n## Issue grouping\n\n_k8s-sentry_ tries to be smart about grouping issues. To handle that several strategies are used:\n\n- all issues use the event type, event reason and event message as part of the fingerprint\n- events related to controlled Pods (for example Pods created through a ReplicaSet (which is\n  automatically done if you use a StatefulSet or Deployment) are grouped by the ReplicateSet.\n- other events are grouped by the the involved object\n\n## Building\n\nThis project uses [Go modules](https://github.com/golang/go/wiki/Modules) and requires Go 1.13 or later. From a git checkout you can build the binary using `go build`:\n\n```shell\n$ go build\ngo: downloading k8s.io/apimachinery v0.0.0-20191020214737-6c8691705fc5\ngo: downloading k8s.io/client-go v0.0.0-20191016111102-bec269661e48\ngo: downloading k8s.io/api v0.0.0-20191016110408-35e52d86657a\n...\n```\n\nYou can then run `k8s-sentry` directly (assuming you have a valid kubectl configuration):\n\n```shell\n$ ./k8s-sentry\n2019/10/22 15:55:41 Warning: DSN environment variable not set. Can not report to Sentry\n2019/10/22 15:55:41 Warning HorizontalPodAutoscaler/istio-ingressgateway: unable to get metrics for resource cpu: no metrics returned from resource metrics API\n2019/10/22 15:55:41 Warning HorizontalPodAutoscaler/istio-pilot: unable to get metrics for resource cpu: no metrics returned from resource metrics API\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichert%2Fk8s-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwichert%2Fk8s-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichert%2Fk8s-sentry/lists"}