Skip to content

Instantly share code, notes, and snippets.

@diegofcornejo
diegofcornejo / 1. GRAFANA PINO DASHBOARD.md
Last active April 15, 2025 09:31
Grafana Dashboard for Pino HTTP Logs - Express JS example

Pino HTTP Logs Dashboard
This Grafana dashboard utilizes the Loki data source to visualize and analyze logs generated by the Pino logging library. Logs from HTTP requests are captured using the Pino-HTTP plugin and are sent to a Loki instance via the Pino-Loki plugin, enabling real-time monitoring and historical analysis. The dashboard includes graph and table panels to display key metrics such as request status codes, response times, and error rates, making it easy to track application behavior and identify performance issues.

Flow Overview:

  1. Pino: Captures structured logs in a JSON format.
  2. Pino-HTTP: Specifically designed to handle HTTP request/response logging, capturing details such as request method, URL, and status code.
  3. Pino-Loki: Transmits the
@johnbeynon
johnbeynon / add_domain.rb
Last active March 20, 2025 20:16
Add custom domain to Render preview environment app
#!/usr/bin/ruby
# Script to add a custom domain to a preview environment web service. Use it via the buildCommand
#
# Resultant custom domain added to the service will be:
# <servicename>-pr-<number>.prs.mydomain.com
#
# Setup:
#
# Add a wildcard DNS entry to your domain, something like *.prs.mydomain.com pointing to 216.57.24.1