fix: edge cases parsing of `DD_TAGS` by dmehala · Pull Request #233 · DataDog/dd-trace-cpp
Description
This pull request addresses a bug in the tag parsing logic where space-separated values were incorrectly considered even when comma separators were present in the DD_TAGS environment variable. According to the RFC:
"This is a (mostly) backwards-compatible change to DD_TAGS parsing where we use comma-separated tags if there are any commas present in the DD_TAGS variable, and use space-separation otherwise."
The fix ensures that the presence of commas takes precedence, aligning the parsing behavior with the intended specification.
Motivation
The bug was identified during system tests, which rely on correct tag parsing to function as expected. This fix brings the implementation into compliance with the RFC and prevents inconsistent behavior in environments where mixed separators may be present.