Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow tracking kafka produce and consume offsets #18

Merged
merged 4 commits into from
Jul 10, 2023
Merged

Conversation

btkostner
Copy link
Contributor

This was the one remaining feature from the golang library that I haven't ported yet. Now it's done. It allows tracking Kafka offsets. Datadog uses this to detect lag and consumers that are offline and not reporting.

After every publish, we push the last offset to Datadog. After every consume, we push the last read offset to Datadog. It can then calculate the offset and alert us on issues.

@btkostner btkostner requested a review from a team June 28, 2023 21:20
@btkostner btkostner self-assigned this Jun 28, 2023
@btkostner btkostner requested a review from a team as a code owner June 28, 2023 21:20
Copy link
Member

@msutkowski msutkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we testing both cases of the upsert here? 🤔 Do we need to? :D

lib/datadog/data_streams/aggregator/offset.ex Outdated Show resolved Hide resolved
lib/datadog/data_streams/aggregator/offset.ex Outdated Show resolved Hide resolved
btkostner and others added 2 commits June 28, 2023 16:02
Co-authored-by: Matt Sutkowski <msutkowski@gmail.com>
Co-authored-by: Matt Sutkowski <msutkowski@gmail.com>
@btkostner
Copy link
Contributor Author

I am not testing both, and 🤷 maybe. I figured I would test this on a project before release

msutkowski
msutkowski previously approved these changes Jun 28, 2023
dydx
dydx previously approved these changes Jun 28, 2023
@btkostner btkostner dismissed stale reviews from dydx and msutkowski via f843021 June 29, 2023 16:28
@btkostner
Copy link
Contributor Author

@msutkowski Alright, looking at the code again, I assert the second upsert case at the end of the test. We should be good to merge.

@btkostner btkostner merged commit ebab69b into main Jul 10, 2023
@btkostner btkostner deleted the track-kafka branch July 10, 2023 18:02
btkostner pushed a commit that referenced this pull request Jul 10, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](v1.1.2...v1.2.0)
(2023-07-10)


### Features

* allow tracking kafka produce and consume offsets
([#18](#18))
([ebab69b](ebab69b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants