-
Notifications
You must be signed in to change notification settings - Fork 315
Fix missing transport attribute when flushing telemetry #902
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
datadog/dogstatsd/base.py
Outdated
| else: | ||
| self._transport = "uds" | ||
| else: | ||
| self._transport = "udp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repeats the code already written not even 10 lines before. Would it make sense to avoid copy-pasting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
iadjivon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
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.