Update Statsd tag serializer to allow falsy values
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- ruby
- Domain
- observability-sre
Research direction
Start with lib/datadog/statsd/serialization/tag_serializer.rb around lines 58-66, then read PR 290 for the full context. Verify the serializer preserves explicit false tag values while retaining the intended nil handling, and confirm the relevant serializer behavior with the existing test suite.
Written by the indexing model from the issue text.
Description
Please, see https://github.com/DataDog/dogstatsd-ruby/pull/290 for all details.
PR description at the time of opening this issue:
Problem
If we provide a tag which has a boolean value, we are unable to properly track the
falsecase, since the "true" string appears with the tag name, but the "false" string does not show up. This is because of this logic, which checks for tag value presence:
trueis evaluated to present, so we would add that tag name and value; however,falseis evaluated to not present, so we would only add that tag name (not the value).Solution
First, check for
nilexplicitly then also check fornilafter converting to a string.This does result in other values being deemed "present" now which were not previously though, such as
[]and{}. Is this a problem though?
- Dominant language
- Ruby
- Stars
- 208
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/dogstatsd-ruby
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
DataDog/dogstatsd-ruby#321 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
DataDog/dogstatsd-ruby#331 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
DataDog/dogstatsd-ruby#325 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
DataDog/dogstatsd-ruby#324 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
DataDog/dogstatsd-ruby#309 ·
All issues in DataDog/dogstatsd-ruby
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100