Annotating your graphs with PowerShell
by January 20, 2015

Filed under: Industry Insights

AppNeta no longer blogs on DevOps topics like this one.

Feel free to enjoy it, and check out what we can do for monitoring end user experience of the apps you use to drive your business at

For some time, TraceView has given you access to our API to add annotations to your graphs and heat maps.  On Linux hosts, we even gave you a script called “tlog” to make it easier.

Today, we’re pleased to offer Windows users the same easy way to add those annotations.  And, since everything to do with managing Windows hosts is now done through PowerShell, that’s what we’re going to use, too!

The cmdlet, called Publish-TraceViewMessage, is available from and the one script file contains all you need.  Because it’s driven through our API, it uses the Invoke-RestMethod command which was introduced in PowerShell v3 in 2012.  Server 2012 and Windows 8 users have this already, Windows 2008 and Win7 users will need to grab the free update from Microsoft.

To publish an annotation, use your access key that you used to install – it’s on the Settings -> Overview page of your TraceView console.

Publish-TraceViewMessage.ps1 -ClientKey:xxxx-xxx-xxx-xxx -Message “This is my annotation”

And that’s all you need.  The annotation will be placed on the graph on your Default app as of the current time.

If you want to annotate another application, use the -Application switch, or the TimeStamp one if you want to backdate the annotation to a historical event. (TimeStamp will accept any date format that Get-Date understands. Though, as always, ISO 8601 date formats are best to avoid confusion.)

As with all good PowerShell, you have recourse to the Get-Help cmdlet to find out more, and the standard -Verbose switch is there if you need to troubleshoot.