
Creating Your Own Monitoring Tools
In addition to using system tools, you can create your own tools to monitor Team Foundation Server usage and performance. Team Foundation Server has an event log class as part of its software development kit. In addition, you can create tools to monitor and parse data logged by Team Foundation Web methods.
Web Service Method Logging and SQL Custom Queries
You can configure logging for Team Foundation Server Web service methods. Each Web service method for Team Foundation Server has a Web.config file that includes a logging section where you can configure different levels of logging for each Web method. The different levels are as follows:
None Do not log information about this Web service method. This is the default value.
OnError Log events that indicate errors.
ReadWrite Log database change events.
Normal Log any interaction with the database. These include but are not limited to database change events.
LightWeight Log database change events and any Web methods that have minimal database access.
All Log all events.
For more information about Team Foundation Server Web.config files, see Managing Configuration Settings for Team Foundation Server and How to: Change Configuration Settings for Team Foundation Server Components.
When logging is configured, all the Web service method execution details that meet the set logging level are recorded in the TfsActivityLogging SQL database on the Team Foundation data-tier server. The information includes the identity of the caller, the Web service method, the parameters of that Web service method, when that Web service method was invoked, and how long it took for the Web service method call to complete. You can write custom SQL queries to parse this Team Foundation Server information and review the performance of the Team Foundation Server Web methods.
Using the TeamFoundationEventLog class
You can use the TeamFoundationEventLog class to write additional entries and events to the event log. These messages can range from simple informational messages to exception messages that provide information about the process, thread ID numbers, assembly numbers, and so on.
For more information about this class, see the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=75104).