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(kafka): cast topic to str since it can return None #10691

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

ZStriker19
Copy link
Contributor

@ZStriker19 ZStriker19 commented Sep 17, 2024

Since topic can be None for a message object we should always cast it to a str or else it'll throw an error if we try to set it as a tag with set_tag_str

https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.Message.topic

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Sep 17, 2024

CODEOWNERS have been resolved as:

releasenotes/notes/kafka_message_topic_none_fix-2bc3fd6388075b94.yaml   @DataDog/apm-python
ddtrace/contrib/internal/kafka/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Sep 17, 2024

Datadog Report

Branch report: zachg/cast_topic_to_str_before_tagging
Commit report: 8464af9
Test service: dd-trace-py

✅ 0 Failed, 592 Passed, 604 Skipped, 19m 4.8s Total duration (17m 43.61s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Sep 17, 2024

Benchmarks

Benchmark execution time: 2024-09-20 15:38:06

Comparing candidate commit 8464af9 in PR branch zachg/cast_topic_to_str_before_tagging with baseline commit baac738 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 348 metrics, 48 unstable metrics.

@ZStriker19 ZStriker19 enabled auto-merge (squash) September 18, 2024 15:25
@ZStriker19 ZStriker19 merged commit 33daba9 into main Sep 20, 2024
635 checks passed
@ZStriker19 ZStriker19 deleted the zachg/cast_topic_to_str_before_tagging branch September 20, 2024 15:39
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