New release – Tx (LINQ to Logs and Traces)

We are proud to announce the release of Tx (LINQ to Logs and Traces), an open source project to help with the debugging of software from logs/traces, and the building of real-time monitoring and alerting systems.  

This tool is code that has been used within Microsoft, for example, by the Windows Communication Foundation (WCF) and the ServiceBus teams. With this release, the Tx code is now available for use in your own projects.  

Tx allows the use of Language Integrated Query (LINQ) queries on raw event sources. LINQ is a Microsoft .NET Framework component that adds native data querying capabilities using any of the supported .NET languages 

Tx enables the use of Reactive Extensions (Rx) on real event sources and provides support for multiplexed event sequences (a stx multiplexed sequence as you might find in a typical logsingle sequence containing events of different types in order of occurrence). Using Tx, it is possible to hide the heterogeneity of event sources and thus provide a single query across multiple sources. Such queries use the same API for both real-time and past history.  

When working on historical log/trace files. multiple queries can be performed with a single read. For example, a single pass over a file can count all “Warning” events, match “Begin” and “End” events, and calculate the average duration of each activity. This functionality is extremely useful when working with large files as it is possible to perform the same real-time queries efficiently over historical data to gain additional insights. 

With this first release Tx (LINQ to Logs and Traces) provides:

  • Parsers that surface various trace/log formats as IObservables
  • LINQPad Driver, allowing the usage of LINQPad directly on files and real-time sessions
  • Samples illustrating how to use Reactive Extensions + LINQ to Objects on:
    • trace/log files that have no size restriction
    • real-time sessions

This release also provides the following NuGet packages:

  • Tx.Core
    • Common components that are not specific to a specific tracing format and are commonly reused across different formats.
  • Tx.Windows provides support for:
    • Event Tracing for Windows (ETW) which allows application programmers to start and stop event tracing sessions, instrument applications and consume trace events.
    • Event Logs (.etvtx) and listening for changes in event logs
    • Performance counters from files (.blg, .csv, .tsv) and from real-time counter API
    • IIS text logs in W3C format
  • Tx.SqlServer
    • SQL Server Extended Events (XEvent)
  • Tx.All
    • A convenience package containing all the above

Please check out the Tx project site on CodePlex for more information and the corresponding documentation.


Georgi Chkodrov, Developer, Microsoft Corp.
Ross Gardler, Senior Technical Evangelist, Microsoft Open Technologies, Inc.
Comments (3)
  1. chilberto says:

    Thanks Georgi and Ross for sharing.  I appreciate this project as I have struggled to write a similar solution using XML parsing against WCF service logs.

  2. Ross Gardler says:

    Thanks ddbug – I've fixed the link in the text (that was embarrassing 😉

Comments are closed.

Skip to main content