Trace Tab - Glimpse/Glimpse GitHub Wiki

The Trace tab shows any messages traced to System.Diagnostics.Trace or System.Diagnostics.Debug during the lifetime of the HTTP request.

Trace Tab

Layout

  1. Message: The message that was traced
  2. Category: The category level of message
  3. From First: The duration, in milliseconds, from when the first trace message
  4. From Last: The duration, in milliseconds, from when the previous trace message

Frequently Asked Questions

  • What type of Tracing does Glimpse support?

    Glimpse supports the standard set of System.Diagnostics Trace and Debug methods:

    • Trace.TraceWarning("...") : void
    • Trace.TraceError("...") : void
    • Trace.TraceInformation("...") : void
    • Debug.Write("...") : void

    See full list of Trace & Debug methods on MSDN

Tips and tricks

TraceSource support

The Trace tab can trace messages from instances of System.Diagnostics.TraceSource as well.

Configure the <system.diagnostics> section in web.config:

<system.diagnostics>
	<sources>
		<source name="Example Source" switchName="sourceSwitch" switchType="System.Diagnostics.SourceSwitch">
			<listeners>
				<add name="GlimpseListener"/>
			</listeners>
		</source>
	</sources>
	<switches>
		<add name="sourceSwitch" value="Warning"/>
	</switches>
	<sharedListeners>
		<add name="GlimpseListener" type="Glimpse.Core.TraceListener, Glimpse.Core"/>
	</sharedListeners>
</system.diagnostics>

Once configured, write messages with a properly named instance of TraceSource:

var traceSource = new TraceSource("Example Source");
traceSource.TraceEvent(TraceEventType.Warning, 0, "Log message text...");
⚠️ **GitHub.com Fallback** ⚠️