-
Notifications
You must be signed in to change notification settings - Fork 246
[breaking]: Reject lines with disabled tagging styles #580
Description
Prerequisite to #576. Even when a specific tagging/labeling style is disabled, we still accept the line, but ignore these tags. Now that DogStatsD is extending the protocol not just for tagging, but also for other features such as packing multiple observations into one line, it becomes very difficult to reason about what should happen with a particular line given a particular configuration, and it becomes nearly impossible to optimize the line parser for the most common use case of having only one flavor in play. There is so much leeway in each of the formats that it is not guaranteed we can even uniquely make sense of a given mixed line.
The line parser should
- determine the flavor of each line
- accept lines using one (or none) of the enabled protocol flavors
- reject lines using flavors that have been disabled
- reject lines using more than one flavor
This will also allow us to refactor the line test suite and have a single, consolidated corpus of test cases, where each test case specifies the flavor it represents, rather than duplicating lines across the different tests with different expected outputs.