# Sanity Log Analyzer - Find What's Eating Your Sanity Usage

> A quick walkthrough of Sanity Log Analyzer, our internal tool that turns your Sanity request logs into a usage report. It shows which queries, images and files are eating your usage, when traffic s…

**Published:** 2026-09-18 | **Updated:** 2026-09-19 | **Categories:** Walkthroughs

Watch: https://www.youtube.com/watch?v=dMpRk1LwyFo

---

## Transcript

We built an internal tool called Sanity Log Analyzer. It gives you a log report of your Sanity usage and suggestions on where you can optimize your Sanity Studio. You'd be surprised what you find out.

We built this tool primarily for developers and larger teams, but that's not to discourage small teams. Go ahead and try it and let us know if you liked it.

So this is where you go to get your logs. You go in the user section and all the way down, then download it and wait for it to finish downloading.

One thing Mac does annoyingly is that sometimes it adds spaces. So after you've unzipped this, make sure you rename it. I'm just going to call it log.

Now we'll run this and get the log analyzer started. I'm very lazy at typing things, so I have my own shortcut. This is what you do. We get the name log.nd JSON.

Here we have our Sanity Log Analyzer. As you can see, it gives you an overall report of where you're spending your Sanity tokens the most. In our example, our settings are costing us a lot. We need to optimize this. As you go down you can see what images are costing a lot, or should I say Sanity tokens. This file needs to be optimized. It's a big chunky one.

When traffic lands, there's high traffic on this day. This is interesting. Localhost doesn't surprise me. Our developers are always on it. Interesting, it's showing the IPs as well.

You get an idea from this. Another interesting thing you can do is filter some of these. As you can see, these are filterable, and once you click on it you will get the data related to that particular category. Remember, not everything is filterable. You can't query everything. These two, for example, can't be filtered. It's just to show you. These two categories are filterable and you can click on them and look into the details below.

## Frequently asked questions

### What is Sanity Log Analyzer?

Sanity Log Analyzer is an internal tool that generates a detailed report of your Sanity usage and provides optimization suggestions for your Sanity Studio. It shows you exactly where you're spending your Sanity tokens and highlights areas where you can improve performance and efficiency.

### Who should use Sanity Log Analyzer?

We built this tool primarily for developers and larger teams, but it's open to anyone. Small teams are welcome to try it out and see if it helps optimize their Sanity setup.

### How do I get started with Sanity Log Analyzer?

Go to the user section in Sanity, scroll all the way down, and download your logs. After unzipping the file, rename it to something simple like 'log' to avoid issues with spaces that macOS sometimes adds. Then run the analyzer with your log file.

### What information does the analyzer show me?

The analyzer gives you an overall report of where you're spending the most Sanity tokens, breaks down costs by category like settings and images, shows you traffic patterns and which days had high traffic, displays IP addresses, and helps you identify which files need optimization because they're using too many tokens.

### Can I filter the data in the report?

Yes, some categories in the report are filterable. You can click on those categories to drill down and see detailed data related to that specific area. Keep in mind that not everything is filterable, as some data types can't be queried that way.

### What should I look for in the log analyzer results?

Start by looking at your overall token spending and identify which areas are costing you the most. Common culprits include settings and large images. Pay attention to traffic patterns and any spikes in usage, then focus on optimizing the biggest token consumers first.

### Why would I want to analyze my Sanity logs?

You'd be surprised what you find out about your Sanity usage. Analyzing your logs helps you identify hidden inefficiencies, reduce token costs, and improve your Studio's performance by understanding exactly where your resources are going.