implementing-observability

Implement OpenTelemetry metrics, logs, and traces with LGTM stack deployment.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill implementing-observability-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: implementing-observability
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/implementing-observability
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill implementing-observability-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Production systems lack visibility into performance, errors, and distributed request flows, making debugging slow and incident response reactive instead of proactive. ## Core Features & Use Cases - OpenTelemetry Instrumentation: Auto-instrument FastAPI, Flask, Django, Axum, Gin, and Express applications for metrics, logs, and traces with a unified SDK. - LGTM Stack Deployment: Deploy Loki, Grafana, Tempo, and Mimir via Docker Compose or Kubernetes for self-hosted observability. - Log-Trace Correlation: Inject trace_id and span_id into structured logs (structlog, tracing, slog, pino) so every log links to its distributed trace. - Alerting Configuration: Generate Prometheus and Loki alert rules with notification routing to Slack, PagerDuty, and email. - Use Case: A team shipping a FastAPI microservice runs the setup script, starts the LGTM docker-compose stack, and immediately views correlated traces, logs, and RED metrics in Grafana dashboards. ## Quick Start Ask the AI to set up OpenTelemetry instrumentation for your FastAPI service and deploy a local LGTM stack with docker-compose.

Frequently Asked Questions about implementing-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up OpenTelemetry in a FastAPI application?▼

Install opentelemetry-sdk, opentelemetry-exporter-otlp, and opentelemetry-instrumentation-fastapi, then call FastAPIInstrumentor.instrument_app(app) after configuring a TracerProvider with an OTLP exporter. The setup_otel.py script generates this configuration automatically.

What is the LGTM stack for observability?▼

LGTM combines Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics into a self-hosted observability platform. Grafana Alloy collects OTLP telemetry and routes each signal type to its backend.

How do I correlate logs with traces in Grafana?▼

Inject trace_id and span_id into every structured log record using the current span context from OpenTelemetry. Then query Loki with the trace_id value to find all logs belonging to a specific trace.

Does OpenTelemetry support Rust and Go applications?▼

Yes, OpenTelemetry provides SDKs for Rust (opentelemetry with tracing-opentelemetry) and Go (go.opentelemetry.io/otel). Both support OTLP export and framework auto-instrumentation for Axum, Actix-web, Gin, and net/http.

Why are my traces not appearing in Tempo?▼

Verify the OTLP endpoint is reachable on port 4317, confirm Grafana Alloy is running and receiving data, and check application logs for exporter errors. Also ensure the service.name resource attribute matches your Grafana query.

When should I skip setting up full observability?▼

Skip it for proof-of-concept projects without production deployment or systems handling under 100 requests per day, where console logging is sufficient. The overhead of SDK setup and stack hosting outweighs the benefit at that scale.