SRE
Monitoring
- below - A time traveling resource monitor for modern Linux systems
Logs
- hl - A fast and powerful log viewer and processor that converts JSON logs or logfmt logs into a clear human-readable format.
Alerts
- notify - Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.
Profiling
- pyroscope - Continuous Profiling Platform. Debug performance issues down to a single line of code .
Init Checks
- Wait4X - Wait4X allows you to wait for a port or a service to enter the requested state.
Cookbook
OTEL with Python
bash
export OTEL_METRIC_EXPORT_INTERVAL="5000" # so we don't have to wait 60s for metrics
export OTEL_RESOURCE_ATTRIBUTES="service.name=rolldice,service.instance.id=localhost:8082"
pip install opentelemetry-distro[otlp]
opentelemetry-bootstrap -a install
export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
export OTEL_LOGS_EXPORTER=otlp
opentelemetry-instrument $ENTRYPOINTcompose-otel.yaml
yaml
services:
otel-lgtm:
image: grafana/otel-lgtm
ports:
- 3000:3000
- 4317:4317
- 4318:4318