Fix missing transport attribute when flushing telemetry#902
Merged
Conversation
vickenty
reviewed
Jul 16, 2025
datadog/dogstatsd/base.py
Outdated
| else: | ||
| self._transport = "uds" | ||
| else: | ||
| self._transport = "udp" |
Contributor
There was a problem hiding this comment.
This repeats the code already written not even 10 lines before. Would it make sense to avoid copy-pasting?
Contributor
Author
There was a problem hiding this comment.
I've updated the code just set transport to udp for consistency as we already default to using the UDP optimal payload length when socket is None. Let me know if that works with you.
carlosroman
approved these changes
Jul 23, 2025
amaskara-dd
approved these changes
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes bug where
self._transportwas never set, thus causingself._flush_telemetryto fail when adding theclient_transporttag.Description of the Change
Sets
self._transporttoudpas a default.Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/label attached. If applicable it should have thebackward-incompatiblelabel attached.do-not-merge/label attached.kind/andseverity/labels attached at least.