When your application crashes and you don't know why, you don't have a technical problem — you have an information black hole. Monitoring and observability are not optional; they are your cockpit dashboard. Yet, in most small and medium Italian businesses we work with, seeing a Grafana panel is still a luxury, not a standard practice. At Meteora Web, we've been managing production stacks for over eight years: servers, Laravel apps, WooCommerce, APIs. Every time a client says “the site is slow” without data, we know the problem isn't the site — it's the lack of metrics. This pillar page gives you the foundations to build a working monitoring and observability system, skipping the theory and going straight to what we use daily.
The three pillars of observability: logs, metrics, traces
Observability stems from the principle that a software system produces data. Three families: logs (discrete events), metrics (aggregated numerical measurements), traces (path of a request across services). Without all three, you're flying blind. Example: your e-commerce cart fails. With metrics you see an HTTP 500 error spike. With logs you find the exception “Connection refused” to the database. With traces you understand it's a payment microservice timing out. Three pieces, one truth.
We, at Meteora Web, always start with a minimal stack: Prometheus for metrics, Loki for logs (a lightweight alternative to ELK), and Tempo for traces (OpenTelemetry). But every component can be swapped based on budget and team maturity.
What to do now: identify the weakest point of your app (e.g., slow login, checkout timeout). Install a simple server-side metric generator (e.g., php artisan metrics on Laravel) and try to display a chart in Grafana. You don't need the full stack immediately: one data point is better than zero.
Prometheus: metrics scraping, alerting, and PromQL
Prometheus is the de facto standard for infrastructure and application monitoring. It works on a pull model: it scrapes metrics from HTTP endpoints exposed by your services. We use it to monitor CPU, RAM, disk, and also application metrics like orders per minute or query latency. Basic configuration is a YAML file:
Sponsored Protocol
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'laravel_app'
metrics_path: '/metrics'
static_configs:
- targets: ['app-server:8000']
PromQL allows rate calculations, averages, percentiles. Example: rate(http_requests_total[5m]) gives requests per second over the last 5 minutes. With that you can set up alerts via Alertmanager: if error rate exceeds 1%, you get a notification.
What to do now: if you have a Linux server, install node_exporter (official download) and configure its scrape. Open /metrics in a browser to see raw data. Then run a query in Prometheus: up. If you see 1, you're off.
Grafana: dashboards, datasources, alerting
Grafana is the pretty face of monitoring. It connects Prometheus, Loki, Elasticsearch, CloudWatch, and lets you create visual panels. We build custom dashboards for each client: page load speed, conversions, 404 errors, uptime. The key is not to drown in charts. A dashboard should answer specific questions: “Is the site fast today?” “How many orders did we lose due to 500 errors?”.
A typical panel: rate(http_requests_total{status=~"5.."}[5m]) as a line chart, with a red threshold at 0.5. Exceed it, alert. Grafana has built-in alerting that can notify via email, Slack, Telegram. We prefer Telegram because it's direct and less noisy than email.
What to do now: connect Grafana to your Prometheus (official guide). Import a prebuilt dashboard for node_exporter (ID 1860). Then adjust the time range variable. You instantly have a server overview.
ELK Stack: centralized logging with Elasticsearch, Logstash, Kibana
Logs are the chronicle of every event. For larger projects — or security analysis — we use ELK. Elasticsearch indexes and makes logs searchable, Logstash transforms and ships them (or Filebeat to read log files), Kibana visualizes. Simple Logstash config:
Sponsored Protocol
input {
file {
path => "/var/www/laravel/storage/logs/*.log"
start_position => "beginning"
}
}
filter {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:message}" }
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "laravel-logs-%{+YYYY.MM.dd}"
}
}
ELK is powerful but heavy: needs RAM and maintenance. For small teams we recommend Loki from Grafana: fewer features but much lighter. The choice depends on log volume and budget.
What to do now: If you're on Laravel, enable structured logging (see section below) and send logs to a test Elasticsearch index. Use Kibana to search for the word “error” in the last 15 minutes. If you find something, you've already won.
OpenTelemetry: the open standard for tracing and metrics
OpenTelemetry (OTel) is the framework that unifies trace, metric, and log collection. Born from the merger of OpenTracing and OpenCensus, it's the cleanest way to instrument applications today. We integrated it into Laravel via a custom middleware: each request generates a span sent to a collector (e.g., Jaeger or Tempo).
The advantage? You're no longer tied to a vendor. With OTel you can switch from DataDog to Grafana Cloud without rewriting code. It's a standard we recommend to every client starting a new backend project.
What to do now: check the official OpenTelemetry documentation. Install the SDK for your language (PHP: composer require open-telemetry/opentelemetry) and instrument one endpoint. Verify that the trace reaches a collector. An hour of setup today saves weeks of debugging tomorrow.
APM: Application Performance Monitoring compared
APM tools (like New Relic, Datadog, Dynatrace) give end-to-end visibility into application performance: slow transactions, database queries, stack traces. They are ready-to-use but expensive. New Relic costs about $0.30 per GB of ingested data, Datadog has a per-host base price. For a small business, the bill can reach hundreds of dollars per month.
Sponsored Protocol
Open source alternatives: SigNoz (based on OpenTelemetry) or HyperDX. We chose a hybrid path: OpenTelemetry for tracing, Grafana for visualization, and we pay only for cloud storage (under $20/month for a small cluster). The choice depends on how much you're willing to invest in setup vs. subscription. But the return is huge: knowing a query takes 2 seconds instead of 50ms can save hours of investigation.
What to do now: If you already have an APM, check the Service Map or Transaction Dashboard. Find the slowest transaction. Optimize it (e.g., add a database index). If you don't have an APM and the site is slow, first try manual debugging with Xdebug and structured logs. Later, when you need it, choose OpenTelemetry.
Structured logs: JSON logging best practices
Text logs are the enemy of searchability. “Error: something went wrong” doesn't help. Structured JSON logs let you filter by level, context, user, request ID. Example in Laravel:
Log::channel('stack')->error('Payment failed', [
'order_id' => 12345,
'amount' => 99.99,
'gateway' => 'stripe',
'user_agent' => request()->userAgent()
]);
With this, in Kibana or Loki you can search for all failed Stripe payments above $50. Better yet: add context fields like trace_id to correlate logs and traces. This is the foundation of observability. We do it in every Laravel project we put into production.
What to do now: modify the logging channel in config/logging.php to use 'driver' => 'daily' with a custom formatter that outputs JSON. Then test with tail -f storage/logs/laravel.log to see JSON lines.
Sponsored Protocol
Alert management: Alertmanager, PagerDuty, and reducing alert fatigue
Alerts are like fire alarms: too many false positives and no one listens. With Prometheus and Alertmanager you can group, silence, and route notifications. Example rule:
groups:
- name: example
rules:
- alert: HighErrorRate
expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.01
for: 5m
labels:
severity: critical
annotations:
summary: "HTTP 5xx errors over 1%"
Then in Alertmanager configure a channel (Slack, Telegram, PagerDuty). The common mistake is to alert on every spike. We use the “for” technique: if the alarm lasts more than 5 minutes, it fires. This avoids false alarms from momentary spikes. Also categorize by severity: critical (react now), warning (evaluate), info (ignore in production).
What to do now: review your alert rules. Do any fire more than once a day? Raise the threshold or add a for of 10 minutes. Implement a maintenance window for deployments. If you don't use Alertmanager, install it and connect to a Telegram channel.
Uptime monitoring: tools and SLAs
Uptime is the minimum promise you make to your client. Monitoring it only from your internal server is like checking the temperature inside your house: if the internet goes down, you won't notice. That's why we use external services: Better Stack (formerly Uptime Robot, now more complete), Checkly, or StatusCake. Configure an HTTP check every minute (or 5 minutes) from multiple global locations. If timeout exceeds 10 seconds, alert fires.
We recommend Better Stack for value: free plan up to 50 heartbeats, pay only for playbooks or SSL. It also shows uptime history and average response time. For e-commerce it's essential: every minute of downtime can cost hundreds of dollars.
What to do now: create a free account on Better Stack. Add your site as an HTTP monitor. Set timeout threshold to 15 seconds. You'll receive a Slack/Telegram notification if the site goes down. Then export the monthly uptime report to compare with your hosting SLA.
Sponsored Protocol
Laravel Telescope and Horizon: native application monitoring
If you develop with Laravel, you have two gems: Telescope for real-time debugging (requests, queries, jobs, mail, logs) and Horizon for Redis queue management. We use them in every Laravel project. Telescope is perfect for development and staging; in production enable it only for authorized users (e.g., admin) and with limited retention (e.g., 24h). Horizon shows queues, failed jobs, average runtime.
But beware: Telescope has overhead. Don't run it on a high-traffic app without sampling data. We limit it to 10% of requests, or turn it off in production and use Loki for exception logs. Horizon is lightweight and essential if you use queues for emails or batch processing.
What to do now: if you use Laravel, run php artisan telescope:install and follow the official docs. Open /telescope and check the latest requests. Find the slowest one. Then install Horizon with composer require laravel/horizon and configure queues. Now you have an internal dashboard that no external APM gives you for free.
In summary – what to do right now
You don't need to implement everything in one day. Pick one priority:
- External uptime – Better Stack or Uptime Robot, free, costs 5 minutes.
- Basic server metrics – Prometheus + node_exporter + Grafana. Data in one hour.
- Structured logs – JSON logging for application errors. Critical for debugging.
- Targeted alerts – one rule: HTTP 5xx > 1% for 5 minutes. Then add slowly.
- Native Laravel tools – Telescope in staging, Horizon in production if you use queues.
We, at Meteora Web, do this every day. Flexible data centers, for example, rely on granular monitoring. Without data, there is no decision. Start today.