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

fix(kafkajs): handle kafka tombstone messages #3985

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

david-luna
Copy link
Member

@david-luna david-luna commented Apr 22, 2024

The kafkajs instrumentation was calling toString method for all of the messages received. This approach wasn't taking in consideration tombstone messages which is defines as

A message with a key and a null payload will be treated as a delete from the log. Such a record is sometimes referred to as a tombstone.

Ref: https://kafka.apache.org/documentation/#design_compactionbasics

Fixes: #3980

Checklist

  • Implement code
  • Add tests
  • Update TypeScript typings
  • Update documentation
  • Add CHANGELOG.asciidoc entry
  • Commit message follows commit guidelines

@david-luna david-luna requested a review from trentm April 22, 2024 10:33
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

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

/test tav kafkajs

@david-luna david-luna merged commit 33a6b54 into main Apr 23, 2024
24 checks passed
@david-luna david-luna deleted the dluna/kafkajs-tombstone-messages branch April 23, 2024 11:39
@david-luna david-luna mentioned this pull request Apr 23, 2024
fpm-peter pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
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.

KafkaJS instrumentation throw exception on "tombstone message"
2 participants