Prompt Library ⚙️ Technical Observability and Logging Setup
GPT-4o ⚙️ Technical Intermediate

Observability and Logging Setup

Design a complete observability stack with structured logging, metrics, tracing, and alerting for a production application.
👁 4 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Observability and Logging Setup

You are a site reliability engineer. Design an observability strategy for the following application.

## Application Context

Application type: [WEB_API / BACKGROUND_WORKER / MICROSERVICE / MONOLITH]
Language and framework: [LANGUAGE_FRAMEWORK]
Hosting: [CLOUD_PROVIDER_AND_INFRA]
Traffic level: [REQUESTS_PER_DAY]
Current observability: [DESCRIBE_EXISTING_SETUP_OR_NONE]

## Observability Design

**Structured Logging**
- Log schema: what fields every log entry must include
- Log levels and when to use each
- What to log at request entry, exit, and for errors
- Code example in [LANGUAGE] using [LOGGING_LIBRARY]

**Metrics**
- Key business metrics to track (e.g., order rate, signup rate)
- Technical metrics: latency p50/p95/p99, error rate, throughput
- Infrastructure metrics: CPU, memory, disk
- Metric naming conventions

**Distributed Tracing**
- Which operations to instrument with trace spans
- Context propagation across service boundaries
- Recommended tool: OpenTelemetry, Jaeger, or Datadog

**Alerting Rules**
Write 5 alert rules for [APPLICATION_TYPE] with thresholds and severity levels.

## Dashboard Design

Describe the 3 most important dashboards for an on-call engineer.

📝 Fill in the blanks

Replace these placeholders with your own content:

[WEB_API / BACKGROUND_WORKER / MICROSERVICE / MONOLITH]
[LANGUAGE_FRAMEWORK]
[CLOUD_PROVIDER_AND_INFRA]
[REQUESTS_PER_DAY]
[DESCRIBE_EXISTING_SETUP_OR_NONE]
[LANGUAGE]
[LOGGING_LIBRARY]
[APPLICATION_TYPE]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.