Most of you have probably created your own SQL Server user-defined functions (UDFs), but did you know that Microsoft ships a fair number of its own UDFs, especially in the most recent SP3? In this article, Baya Pavliashvili and Kevin Kline explore a subset of them that are related to traces.
Here's the full article on MSDN.