Updating TrackEvent category enabling behavior

5 views
Skip to first unread message

Etienne Pierre-doray

unread,
May 12, 2025, 2:15:56 PMMay 12
to Perfetto Development - www.perfetto.dev
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.
The changes are mostly captured by crbug.com/260418655
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

Primiano Tucci

unread,
May 13, 2025, 1:16:10 PMMay 13
to Etienne Pierre-doray, Daniele Di Proietto, Perfetto Development - www.perfetto.dev
+Daniele Di Proietto in case you are not following the public list

--
You received this message because you are subscribed to the Google Groups "Perfetto Development - www.perfetto.dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to perfetto-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/perfetto-dev/ae06f04a-7b48-4daa-a76b-1b3808b60e41n%40googlegroups.com.


--
Primiano Tucci
Software Engineer
Google UK Limited

Reply all
Reply to author
Forward
0 new messages