Ayende @ Rahien

Refunds available at head office

RavenDB 3.0 Ops: Live Tracing & Logging for production

You might have noticed a theme here Smile in where we are pushing RavenDB 3.0. This is actually an effect of how we structured our work plans, we did a lot of the new features (Voron, for example) early on, because they require a lot of time to mature. We now mostly complete the work related to user interface and exposing operational data.

This feature comes back to the old black box issue. What is the system doing? Usually, you have no way to tell. Now, you could enable debug logging, but that is a very invasive operation, requiring you to update the config file on the server, perhaps to restart the server, and isn’t really something that you can just do. This is especially true when we are talking about production system under load, where adding full logging can be very expensive.

You can now set a dynamic logging listener on a running instance, including a production instance:

image

Which then give you a live streaming view of the log:

image

Think about it like doing a tail on a log file, except that this allows you to dynamically configure what logs you are going to watch, and it will only log while you are watching. This is perfect for situations such as “what is this thing doing now?”.

Having access to the log file is great, but it usually have too much information. That is why we also added the ability to get a peek into what requests are actually executing now. This is also a production level feature, which will cause RavenDB to output all the requests so you can see them:

image

This can be very helpful in narrow down “what are the clients asking the server to do”.

Like the production log watch, this is also a feature that is meant for production, so you can subscribe to this information, and you’ll get it. But if there are no subscribers, there is not cost to this.

The HTTP trace feature can be used to watch a single database (which can be very useful on RavenHQ) or all databases (where you’ll need a server admin level of access. To watch the production log, you’ll need to be a server admin.

Tags:

Posted By: Ayende Rahien

Published at

Originally posted at

Comments

Janivz
08/09/2014 08:18 AM by
Janivz

Indeed

Patrik Potocki
08/11/2014 06:28 AM by
Patrik Potocki

Very cool,

Would this code be possible to sepereate and package as a "logging/logviewing" library/package ? Cause think a lot of application would need this kind of logviewing.

Ayende Rahien
08/11/2014 06:31 AM by
Ayende Rahien

Patrik, No, this code is specific for RavenDB