Gibraltar 3.0 New Feature Dive - Live Sessions

The Gibraltar Agent has always supported viewing the real time log messages from an application, provided your application was a Windows application (WinForms and WPF) and you were the one running the application.  But, what if you want to see what’s happening inside a Windows Service or a process running somewhere else?  In Gibraltar 2.0 you had to have your process explicitly publish a snapshot of your log data up to a Hub or via email.  This required you to code some way to signal your application when you wanted to publish information and then have all of the data collected in that process since it started get shipped to you.

For Gibraltar 3.0 we’ve introduced a new way of seeing your log data in real time: Live Sessions.  When you enable live sessions you can view log data remotely, efficiently, in real time.  In Analyst you’ll see a new node in the tree view called Live sessions.  When you select that, you’ll see a list of all of the available sessions which you can pick from.

When you first click the Live View tab a data connection is established and you’ll get the last thousand messages that were logged.  Once that data’s come across, new messages are shown as they are recorded.  You can filter the display to show just messages of a particular severity or to search their text for a particular value.

This is your server, live!

If you switch away from one session to another the live view stream will continue to run in the background – keeping it current with the most recent thousand messages.  Gibraltar takes steps to keep this memory efficient so you can have multiple live streams running at the same time without performance issues.

If you want to keep watching an application while you work you can double click it and get an independent window which will update in real time as long as the remote application is running.

Efficient over the Network

The data stream that’s used by Live Sessions is designed to be very efficient over networks.  It is highly compressed (using the same techniques employed by the Agent to write log files), connection based, and only running when there is an active viewer monitoring the session.  In real world scenarios the live stream for a busy server can be easily viewed over a low bandwidth, intermittent connection like a tethered phone or Mifi.

  • If the connection is lost, the data stream restarts with the last message you received so it can show you all of the messages
  • If no one is watching a live session then the data is buffered in the Agent but not sent across the network.

Safety First

There are a number of features designed to make sure live sessions don’t cause a problem to your application:

  • Asynchronous, buffered transmission:  The Agent publishes data to any set of listeners asynchronously from recording the log file to ensure slow network connections or network connectivity problems won’t slow down recording the main log file.
  • Drop on overflow:  If there are more log messages waiting to be sent than can be sent over the network new messages will be dropped instead of holding up the application.  This is in contrast to the log file which will switch to synchronous while it catches up.
  • Encryption optional:  You can choose to enable SSL for live session communication so it will be encrypted end-to-end.

Live Sessions and Firewalls

The Live Session protocol is designed to work with most firewall configurations:

  • All connections are outbound: The Agent and Analyst establish connections to the central server to communicate.  No connections are directly created between the Agent and Analyst.  This works well with NAT and often requires no explicit firewall rules or exceptions.
  • Separate ports are used for Agent and Analyst:  If you need to create a firewall rule you can create separate rules for Agent and Analyst traffic (ports 29970 and 29971 respectively)
  • Connections are asynchronous:  Many firewalls will simply fail to respond to attempts to connect to ports that aren’t open, causing very long timeouts.  By performing all connections asynchronously this prevents the application from being unresponsive.

Try it out Today

If you’d like to check out Live Sessions for yourself, you’ll need to download the latest build of Gibraltar 3.0 and upgrade to the included Agent, Analyst and Hub.  The Hub Server does the central relaying between agents and analysts so it has to be set up in the center.  Live Sessions are not available with the subscription Hub Service operated by us at this time, you have to have your own private Gibraltar Hub.

Related Posts

PostSharp Diagnostics Now Supports Loupe in the Box

The latest update to PostSharp Diagnostics adds Loupe support, enabling extensive high-performance logging to be added to any .NET application with virtually no code changes. PostSharp even has a great free option for developers that complements Loupe Desktop! Read more

Loupe Agent for .NET Core Now Available

The first release of the Loupe Agent for .NET Core is also our first open source version of the Loupe Agent. This is the first step in our plan to open source the entire Loupe Agent to make it easier for anyone to extend and take advantage of what Loupe... Read more

We've Moved Loupe Service to App.OnLoupe.Com

Loupe Service now has a shorter, direct site name that's faster, anywhere in the world. Just to go App.OnLoupe.Com, the new CDN-accelerated endpoint for the Loupe Service. Your existing Agents and Loupe Desktops are unaffected by this change, but access to the web UI will be redirected to the new... Read more

Rock solid centralized .NET logging

Unlimited applications, unlimited errors, scalable from solo startup to enterprise.