I'm proposing changes to how TrackEvent considers priority of enabled/disabled categories and tags. This will work closer to how we might expect it, and enable tags use cases. This is a breaking change to perfetto API, however I'm confident the behavior change is subtle enough that it doesn't break any existing use cases, at least in Chrome.
If you believe this breaks an existing TrackEvent use case that you rely on, please let me know.
Otherwise, I'll go forward with this change in ~1 week.
It's implemented in this
PR.
The before logic ranks (in this order):
- specific names > patterns
- enabled > disabled
- categories > tags
The after logic ranks:
- specific > pattern > single char "*" wildcard
- categories > tags
- disabled > enabled
A few examples that are affected:
- enabled_categories: "*", disabled_categories: "unnecessary_category_*"
- Before: "unnecessary_category_with_suffix" is enabled
- After: "unnecessary_category_with_suffix" is disabled
- enabled_tags: "slow", disabled_categories: "slow_category_i_dont_want"
- Before: "slow_category_i_dont_want" is enabled
- After: "slow_category_i_dont_want" is disabled
- enabled_categories: "slow_category_*", disabled_categories: "slow_*"
- Before: "slow_category_with_suffix" is enabled
- After: "slow_category_with_suffix" is disabled
- enabled_tags: "navigation", disabled_tags: "debug"
- Before: "navigation.debug" is enabled
- After: "navigation.debug" is disabled