We designed a mechanism to record web method activity for all of the Team Foundation web applications. Information about each web method invocation is recorded in a single database.
We don't provide any ways to get to that data -- however, if you have access to the data tier you can write a few SQL queries to see what your Team Foundation web applications are doing.
Web method logging is controlled by a setting in each web application's web.config file. The default configuration disables web method logging but it's pretty simple to enable it.
Locate each web.config file under the installation directory, i.e., D:\Program Files\Microsoft Visual Studio 2005 Enterprise Server.
In the <appSettings> section you should see something like the following:
<!-- WEB METHOD LOGGING
Specify whether web methods are to be logged always, never, or only
when errors occurs. Without a value for commandLogging, web methods
are not logged. Valid values are:
None (web methods are never logged)
Normal (log everything, except certain high-frequency web methods)
All (log everything, even certain high-frequency web methods)
OnError (only log web methods that have errors)
Values specified here take precedence over values set administratively via
<add key="commandLogging" value="None"/>
Change None to Normal or All and web method activity will now be recorded.
I'll go into the details of how we collect and record the data if enough people are interested. Note that the data is spooled for a short while before it's written to the database.
The database (for now, it's will be renamed) is called VSTEAMSCCAdmin. There are some historical reasons for including SCC in the name; it'll be called TFSActivityLogging in the shipping product.
There are two tables in this database: one records information about each web method and the other contains parameter information for each web method.
A simple query that shows web method activity plus the parameters (SOAP parameters) is (note: the LEFT join is necessary since there may not be values from the parameter table for each command):
from tbl_command (nolock) c
left join tbl_parameter (nolock) p
on c.commandid = p.commandid
The command table contains information about the web method itself and includes:
- Command identifier A unique id used as a key in the parameter table
- Application Identifies the Team Foundation Web Application servicing the web method
- Command The name of the web method
- StartTime When the web method was invoked
- ExecutionTime How long the web method executed (microseconds)
- IdentityName The user invoking the web method
- IPAddress Origination of the web method execution request
- UserAgent The provided user agent string (this will contain the name of the executable as well)
- UniqueIdentifier (optional) When specified, this value correlates multiple web method records. E.g., a command like checkin will perform multiple web method calls. The identifier correlates the web method calls made for a specific occurrence of the command.
- CommandIdentifier (optional) The name of the command-line tool that's invoking the web method (note that a single command like shelve will perform multiple web methods)
The parameter table is pretty straight forward -- note that parameters are conditionally reported.
- CommandId Correlates to an entry in the command table
- ParameterName The name of the parameter
- ParameterValue The value of the parameter