Skip to main content
Squasher has no Loki push endpoint, so a Loki client cannot send to Squasher directly. Put an OpenTelemetry Collector in the middle: it receives Loki push requests and sends them to Squasher over OTLP.

What moves and what does not

Run both tools side by side

Keep Loki as it is, and add the Collector as a second client in your log agent. For example, in Promtail:
promtail.yaml
In Grafana Alloy, add a second endpoint block to your loki.write component. Loki keeps receiving every line.

Switch the endpoint

1

Configure the Collector

Use a recent otelcol-contrib build. It includes the loki receiver.
otel-collector-config.yaml
The transform reads the level from a label named level. Change the condition to match your labels. Squasher opens issues for logs at ERROR or FATAL.
2

Start the Collector

Set SQUASHER_API_KEY in the Collector’s environment, then start it:
3

Send a test line

Select Logs in the Squasher sidebar to see the line, then Issues to see the issue.
Drop labels with many values, such as request IDs, before they reach the Collector. Each label becomes an attribute on every line.

Check parity

Compare Loki and Squasher for at least one week that includes a deploy:
  • The number of lines per app or service_name label each hour.
  • The lines at error level, and the issues that they opened in Squasher.
  • The timestamps on a few lines in both tools.

Turn off Loki

  1. Recreate the Loki alert rules that you need as query monitors, and their contact points as notification routes.
  2. Remove the Loki client from your log agent, so that it sends only to the Collector.
  3. Stop Loki after its retention period, if you do not need the old lines.

Next steps

OpenTelemetry

Send logs, traces, and metrics over OTLP.

Grafana Alerting

Open Squasher incidents from Grafana alerts.

Add monitors

Open incidents from log queries and checks.

Set up notifications

Send incidents to Slack, email, or PagerDuty.