Skip to content

Commit

Permalink
Merge branch 'main' into munir/test-pymongo-4-9
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur authored Sep 20, 2024
2 parents 4076433 + 33daba9 commit 4cfdc70
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ jobs:
# If ever it's needed, a valid key exists in the repo, using ${{ secrets.DD_API_KEY }}
DD_API_KEY: 1234567890abcdef1234567890abcdef
CMAKE_BUILD_PARALLEL_LEVEL: 12
AWS_ACCESS_KEY_ID: ${{ secrets.IDM_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IDM_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
steps:

- name: Checkout system tests
Expand Down Expand Up @@ -132,6 +136,10 @@ jobs:
# If ever it's needed, a valid key exists in the repo, using ${{ secrets.DD_API_KEY }}
DD_API_KEY: 1234567890abcdef1234567890abcdef
CMAKE_BUILD_PARALLEL_LEVEL: 12
AWS_ACCESS_KEY_ID: ${{ secrets.IDM_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IDM_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
steps:

- name: Checkout system tests
Expand Down
4 changes: 2 additions & 2 deletions ddtrace/contrib/internal/kafka/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _instrument_message(messages, pin, start_ns, instance, err):

for message in messages:
if message is not None and first_message is not None:
core.set_item("kafka_topic", first_message.topic())
core.set_item("kafka_topic", str(first_message.topic()))
core.dispatch("kafka.consume.start", (instance, first_message, span))

span.set_tag_str(MESSAGING_SYSTEM, kafkax.SERVICE)
Expand All @@ -260,7 +260,7 @@ def _instrument_message(messages, pin, start_ns, instance, err):
if first_message is not None:
message_key = first_message.key() or ""
message_offset = first_message.offset() or -1
span.set_tag_str(kafkax.TOPIC, first_message.topic())
span.set_tag_str(kafkax.TOPIC, str(first_message.topic()))

# If this is a deserializing consumer, do not set the key as a tag since we
# do not have the serialization function
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
kafka: Fixed an issue where a ``TypeError`` exception would be raised if the first message's ``topic()`` returned ``None`` during consumption.

0 comments on commit 4cfdc70

Please sign in to comment.