{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":780570093,"defaultBranch":"master","name":"kubernetes-event-exporter","ownerLogin":"linkedin","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-04-01T18:46:05.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/357098?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1715287678.0","currentOid":""},"activityList":{"items":[{"before":"f2c2e97181d5a33c45a7367175ffe846c934c93a","after":null,"ref":"refs/tags/v1.7.3","pushedAt":"2024-05-09T20:47:10.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"}},{"before":"f2c2e97181d5a33c45a7367175ffe846c934c93a","after":"0de10598c4f0e6f5be3bd5dfc690b7e9c4a8c74b","ref":"refs/heads/master","pushedAt":"2024-05-09T20:44:56.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add github actions for test and release (#5)\n\nEverytime we want to release a new version of kubernetes-event-exporter, we need to build\r\nthe binaries to be deployed. This change updates the existing GitHub actions to use\r\nhttps://goreleaser.com/ci/actions/ to build/test when code is pushed or a PR is created\r\nand create a release with binaries when a new tag is pushed.","shortMessageHtmlLink":"Add github actions for test and release (#5)"}},{"before":"dcdc4d262b1de3f2e6470cff5d6ee0932a0f4572","after":"2121ec6048fcfa08becd44bb3701c1e4bb5db0e9","ref":"refs/heads/ronak/gha","pushedAt":"2024-05-09T20:16:54.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add github actions for test and release\n\nEverytime we want to release a new version of kubernetes-event-exporter, we need to build\nthe binaries to be deployed. This change updates the existing GitHub actions to use\nhttps://goreleaser.com/ci/actions/ to build/test when code is pushed or a PR is created\nand create a release with binaries when a new tag is pushed.","shortMessageHtmlLink":"Add github actions for test and release"}},{"before":"2f4c2250a8b6bb41502b68db99526d5ff79c3e79","after":"dcdc4d262b1de3f2e6470cff5d6ee0932a0f4572","ref":"refs/heads/ronak/gha","pushedAt":"2024-05-09T20:09:38.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add github actions for test and release\n\nEverytime we want to release a new version of kubernetes-event-exporter, we need to build\nthe binaries to be deployed. This change updates the existing GitHub actions to use\nhttps://goreleaser.com/ci/actions/ to build/test when code is pushed or a PR is created\nand create a release with binaries when a new tag is pushed.","shortMessageHtmlLink":"Add github actions for test and release"}},{"before":null,"after":"2f4c2250a8b6bb41502b68db99526d5ff79c3e79","ref":"refs/heads/ronak/gha","pushedAt":"2024-05-09T19:58:28.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add github actions for test and release\n\nEverytime we want to release a new version of kubernetes-event-exporter, we need to build\nthe binaries to be deployed. This change updates the existing GitHub actions to use\nhttps://goreleaser.com/ci/actions/ to build/test when code is pushed or a PR is created\nand create a release with binaries when a new tag is pushed.","shortMessageHtmlLink":"Add github actions for test and release"}},{"before":"f2c2e97181d5a33c45a7367175ffe846c934c93a","after":null,"ref":"refs/tags/v1.7.3","pushedAt":"2024-05-09T19:34:13.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"}},{"before":"05428ff0a27d150c1f953aade6f7b759c6428a88","after":"f2c2e97181d5a33c45a7367175ffe846c934c93a","ref":"refs/heads/master","pushedAt":"2024-05-09T14:45:51.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add go.mod update that was missed (#4)","shortMessageHtmlLink":"Add go.mod update that was missed (#4)"}},{"before":null,"after":"bf0e0a1db17505cfce36f1f50018667db74a07e9","ref":"refs/heads/ronak/go-mod","pushedAt":"2024-05-09T14:43:37.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add go.mod update that was missed","shortMessageHtmlLink":"Add go.mod update that was missed"}},{"before":"716f5005eb6da623d5e009c38ca1541ea73e40a5","after":"05428ff0a27d150c1f953aade6f7b759c6428a88","ref":"refs/heads/master","pushedAt":"2024-05-09T14:13:58.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Use greater of creationTimestamp and lastTimestamp to determine event age (#2)\n\nCurrently, kubernetes-events-exporter looks at lastTimestamp (eventTime if lastTimestamp is missing)\r\nof the event to determine the event age. If event age exceeded maxEventAgeSeconds, the event\r\nis discarded. While based on event aggregation, lastTimestamp should be greater than creationTimestamp,\r\nin practice it doesn't always seem to be the case. Hence, the current way of determining eventAge\r\nsometimes results in events younger than maxEventAgeSeconds not getting processed. So as part of this\r\nchange, we use the greater of creationTimestamp and lastTimestamp to calculate event age. This allows us to capture more events rather than less and even if an event is processed more than once, we can de-dup it during\r\nanalysis by using a distinct operation on ResourceVersion.\r\n\r\n**How event aggregation works at a high level**\r\nAt a high level, client-go maintains a local events cache. When a new event comes, it correlates\r\nthis event with the ones in cache. If it finds a matching event in the cache, it just updates the\r\nevent count and the message (prefixes message with \"(combined from similar events) $original-message\")\r\nand patches the existing event instead of creating a new one. This is an optimization to reduce the\r\nstorage needed to persist events in ETCD. Additionally, events have a TTL set (defaults to 1hr). So,\r\nif client-go tries to patch an event and the event has already expired, it creates a new event in this\r\ncase. In such scenarios, the lastTimestamp of the event is kept from what was in the cache and the\r\ncreationTimestamp is set by the apiserver when the event is created. While technically the delta between\r\nlastTimestamp and creationTimestamp should be very small, in practice, the delta is seen up to a few minutes.\r\nWe haven't exactly found why that is the case but a probable reason is that before the event is created, the\r\nrequest to apiserver is queued.\r\n\r\nReferences:\r\n* Here's an explanation of how event aggregation works - https://dev.to/shuheiktgw/kubernetes-event-aggregation-and-spam-filtering-in-client-go-25mn\r\n* Event aggregation: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L242\r\n* Event update: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L327","shortMessageHtmlLink":"Use greater of creationTimestamp and lastTimestamp to determine event…"}},{"before":"c879f1b80e7a5c46af77ffb34ae63e152e6b678b","after":"716f5005eb6da623d5e009c38ca1541ea73e40a5","ref":"refs/heads/master","pushedAt":"2024-05-09T14:08:14.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add clusterEnvironment field in enhanced event (#3)\n\nPorting over this change to the LinkedIn fork: https://github.com/ronaknnathani/kubernetes-event-exporter/pull/2.\r\nThis change wasn't merged upstream and hence the LinkedIn fork doesn't have it.\r\n\r\nOriginal commit message:\r\nMany teams who run multiple clusters across different environments and send events to a centralized logging backend,\r\ncan use a field like clusterEnvironment to create dashboards with filters so that easily look at events from different environments.\r\n\r\nAdditionally, this change makes clusterName and clusterEnviroment optional in the output if they are not set.","shortMessageHtmlLink":"Add clusterEnvironment field in enhanced event (#3)"}},{"before":null,"after":"5dd1805056bda4d3331fe1cbcc56557bf396c4db","ref":"refs/heads/ronak/cluster-env","pushedAt":"2024-05-09T02:50:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add clusterEnvironment field in enhanced event\n\nPorting over this change to the LinkedIn fork: https://github.com/ronaknnathani/kubernetes-event-exporter/pull/2.\nThis change wasn't merged upstream and hence the LinkedIn fork doesn't have it.\n\nOriginal commit message:\nMany teams who run multiple clusters across different environments and send events to a centralized logging backend,\ncan use a field like clusterEnvironment to create dashboards with filters so that easily look at events from different environments.\n\nAdditionally, this change makes clusterName and clusterEnviroment optional in the output if they are not set.","shortMessageHtmlLink":"Add clusterEnvironment field in enhanced event"}},{"before":"98bbe4c1ca9e351843f4c4d40987b845a4f8baa9","after":"a9ba0ace9e863912ab3f09a72f49041fafbc4a9c","ref":"refs/heads/ronak/fix-maxage","pushedAt":"2024-05-09T01:11:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Add tests back for lastTimestamp","shortMessageHtmlLink":"Add tests back for lastTimestamp"}},{"before":"db12f1a23daaeab5bdec068c17e708c4ddbce8ae","after":"98bbe4c1ca9e351843f4c4d40987b845a4f8baa9","ref":"refs/heads/ronak/fix-maxage","pushedAt":"2024-05-09T00:33:56.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Use greater of creationTimeStamp and lastTimestamp to determine event age\n\nCurrently, kubernetes-events-exporter looks at lastTimestamp (eventTime if lastTimestamp is missing)\nof the event to determine the event age. If event age exceeded maxEventAgeSeconds, the event\nis discarded. While based on event aggregation, lastTimestamp should be greater than creationTimestamp,\nin practice it doesn't always seem to be the case. Hence, the current way of determining eventAge\nsometimes results in events younger than maxEventAgeSeconds not getting processed. So as part of this\nchange, we use the greater of creationTimestamp and lastTimestamp (or eventTime if lastTimestamp is empty\nand firstTimestamp if eventTime is empty) to calculate event age. This allows us to capture more\nevents rather than less and even if an event is processed more than once, we can de-dup it during\nanalysis by using a distinct operation on ResourceVersion.\n\n**How event aggregation works at a high level**\nAt a high level, client-go maintains a local events cache. When a new event comes, it correlates\nthis event with the ones in cache. If it finds a matching event in the cache, it just updates the\nevent count and the message (prefixes message with \"(combined from similar events) $original-message\")\nand patches the existing event instead of creating a new one. This is an optimization to reduce the\nstorage needed to persist events in ETCD. Additionally, events have a TTL set (defaults to 1hr). So,\nif client-go tries to patch an event and the event has already expired, it creates a new event in this\ncase. In such scenarios, the lastTimestamp of the event is kept from what was in the cache and the\ncreationTimestamp is set by the apiserver when the event is created. While technically the delta between\nlastTimestamp and creationTimestamp should be very small, in practice, the delta is seen up to a few minutes.\nWe haven't exactly found why that is the case but a probable reason is that before the event is created, the\nrequest to apiserver is queued.\n\nReferences:\n* Here's an explanation of how event aggregation works - https://dev.to/shuheiktgw/kubernetes-event-aggregation-and-spam-filtering-in-client-go-25mn\n* Event aggregation: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L242\n* Event update: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L327","shortMessageHtmlLink":"Use greater of creationTimeStamp and lastTimestamp to determine event…"}},{"before":"ce6135f818acf24c1f141d5bc296c01b88673f35","after":"db12f1a23daaeab5bdec068c17e708c4ddbce8ae","ref":"refs/heads/ronak/fix-maxage","pushedAt":"2024-05-07T15:19:41.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Use creationTimeStamp to determine event age instead of lastTimeStamp or eventTime\n\nkubernetes-events-exporter looked at lastTimestamp (eventTime if lastTimestamp was missing)\nof the event to determine the event age. If event age exceeded maxEventAgeSeconds, the event\nwas discarded. This way of determining eventAge is actually flawed given how event aggregation\nworks in k8s (happens on client side in client-go).\n\nAt a high level, client-go maintains a local events cache. When a new event comes, it correlates\nthis event with the ones in cache. If it finds a matching event in the cache, it just updates the\nevent count and the message (prefixes message with \"(combined from similar events) $original-message\")\nand patches the existing event instead of creating a new one. This is an optimization to reduce the\nstorage needed to persist events in ETCD. Additionally, events have a TTL set (defaults to 1hr). So,\nif client-go tries to patch an event and the event has already expired, it creates a new event in this\ncase. In such scenarios, the lastTimestamp of the event is kept from what was in the cache and the\ncreationTimestamp is set by the apiserver when the event is created.\n\nConsidering apiserver sets the creationTimestamp and lastTimestamp is a field used for event aggregation,\nwe use creationTimestamp here to determine event age instead of lastTimestamp.\n\nReferences:\n* Here's an explanation of how event aggregation works - https://dev.to/shuheiktgw/kubernetes-event-aggregation-and-spam-filtering-in-client-go-25mn\n* Event aggregation: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L242\n* Event update: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L327","shortMessageHtmlLink":"Use creationTimeStamp to determine event age instead of lastTimeStamp…"}},{"before":null,"after":"ce6135f818acf24c1f141d5bc296c01b88673f35","ref":"refs/heads/ronak/fix-maxage","pushedAt":"2024-05-07T15:17:07.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Use creationTimeStamp to determine event age instead of lastTimeStamp or eventTime\n\nkubernetes-events-exporter looked at lastTimestamp (eventTime if lastTimestamp was missing)\nof the event to determine the event age. If event age exceeded maxEventAgeSeconds, the event\nwas discarded. This way of determining eventAge is actually flawed given how event aggregation\nworks in k8s (happens on client side in client-go).\n\nAt a high level, client-go maintains a local events cache. When a new event comes, it correlates\nthis event with the ones in cache. If it finds a matching event in the cache, it just updates the\nevent count and the message (prefixes message with \"(combined from similar events) $original-message\")\nand patches the existing event instead of creating a new one. This is an optimization to reduce the\nstorage needed to persist events in ETCD. Additionally, events have a TTL set (defaults to 1hr). So,\nif client-go tries to patch an event and the event has already expired, it creates a new event in this\ncase. In such scenarios, the lastTimestamp of the event is kept from what was in the cache and the\ncreationTimestamp is set by the apiserver when the event is created.\n\nConsidering apiserver sets the creationTimestamp and lastTimestamp is a field used for event aggregation,\nwe use creationTimestamp here to determine event age instead of lastTimestamp.\n\nReferences:\n* Here's an explanation of how event aggregation works - https://dev.to/shuheiktgw/kubernetes-event-aggregation-and-spam-filtering-in-client-go-25mn\n* Event aggregation: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L242\n* Event update: https://github.com/kubernetes/kubernetes/blob/d9c7616d4b2f563c055df1f378d4dbeed33af869/staging/src/k8s.io/client-go/tools/record/events_cache.go#L327","shortMessageHtmlLink":"Use creationTimeStamp to determine event age instead of lastTimeStamp…"}},{"before":"2668c4309da33fd47ee0846923b8aa2107b87f88","after":"c879f1b80e7a5c46af77ffb34ae63e152e6b678b","ref":"refs/heads/master","pushedAt":"2024-04-29T18:30:26.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"dlessa-li","name":"Demian Lessa","path":"/dlessa-li","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/92749517?s=80&v=4"},"commit":{"message":"Merge pull request #1 from linkedin/rnathani/fix-update\n\nProcess events that get updated","shortMessageHtmlLink":"Merge pull request #1 from linkedin/rnathani/fix-update"}},{"before":null,"after":"1e6e0a9318e2c42d1f9828b2bed7178fd70b4f69","ref":"refs/heads/rnathani/fix-update","pushedAt":"2024-04-26T23:25:44.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ronaknnathani","name":"Ronak Nathani","path":"/ronaknnathani","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7279934?s=80&v=4"},"commit":{"message":"Process event updates\n\nWhen identical events are emitted for a resource, kube-apiserver updates the previous\nevent and increments the count field to represent how many times an event occurred. This\nis to optimize storage on ETCD. Such consolidation results in an `update` on the event.\n\nCurrently, the events exporter doesn't process any events that get updated so when similar\nevents re-occur, they aren't processed. This change enables processing events that get updated.","shortMessageHtmlLink":"Process event updates"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAERf65LAA","startCursor":null,"endCursor":null}},"title":"Activity · linkedin/kubernetes-event-exporter"}