Stethoscope for Craft CMS

Stethoscope is a Craft 6 plugin. Craft 6 is still in beta, and so is Stethoscope (6.0.0-beta.1) — try it on staging first and use caution on production sites.

Craft 6 · Beta — use caution on production

Pulse, for the parts only Craft knows

Laravel Pulse shows slow requests and slow queries. Stethoscope adds what Craft knows: which templates are slow, which pages run twenty element queries where two would do, whether {% cache %} is hitting, which sections are busiest — per site, on a dashboard behind a Craft permission.

Stethoscope

Nine Craft cards

Next to Pulse's own, with a site filter across the top.

The N+1 finder

For every front-end page template: how many element queries one render runs, on average and at most, and which element types and sections they load. Add .with() and watch the number fall.

Template render times

Per template and site, Twig and Blade alike, with a slow count. Wrap any include in {% stethoscope 'label' %} or @stethoscope to time just that part.

Template cache hit rates

Hits, misses and hit rate for every {% cache %} and @craftCache block, per site. Keys with IDs in them are grouped, unnamed blocks shown by their template.

Element saves per section and site

Which sections and volumes are busiest, live saves vs drafts, and how long saves take.

Queue, GraphQL, search, transforms

Job runs and failures by class; GraphQL by schema and operation name; front-end searches and how many found nothing; image transforms generated per volume.

Private by default

Email and IP addresses scrubbed from every Pulse key, query strings dropped from recorded URLs, no emails or Gravatar on user cards, search terms off. Pulse's /pulse page is never open to guests, even with APP_ENV=local.

Time any part of a template

Craft times whole renders. To find the slow include, wrap it — in Twig or Blade, with the same result on the dashboard.

twig
{# Twig #}
{% stethoscope 'related entries' %}
    {% include '_partials/related' %}
{% endstethoscope %}

{{-- Blade --}}
@stethoscope('related entries')
    @include('partials.related')
@endstethoscope

Frequently Asked Questions

The questions worth answering before you install it.

Listen to your site on staging today

Stethoscope is free. It is a Craft 6 beta plugin on a beta CMS — start on a development or staging site and use caution on production.

More plugins

Pairs well with Stethoscope