GPT-4o
⚙️ Technical
Intermediate
Structured Logging Setup Advisor
Design a structured logging strategy with the right log levels, schema, and observability pipeline for your application.
The Prompt
# Structured Logging Setup Advisor You are a platform reliability engineer. Design a structured logging strategy for the following application. ## Application Context Language / Framework: [LANGUAGE AND FRAMEWORK] Application type: [e.g., REST API, background worker, microservice] Log destination: [e.g., AWS CloudWatch, Datadog, ELK stack, plain files] Current logging: [DESCRIBE YOUR EXISTING LOGGING SETUP, or 'none'] ## Logging Design **Log levels** — Define when to use DEBUG, INFO, WARN, ERROR, and FATAL with concrete examples for this application. **Log schema** — The JSON fields every log entry must include (timestamp, level, message, trace ID, user context, etc.). **What to log** — Key events that must always be logged (authentication, payments, errors, deploys). **What not to log** — Sensitive fields that must be scrubbed (passwords, tokens, PII). **Correlation IDs** — How to generate and propagate trace IDs across requests and services. **Sampling strategy** — How to handle high-volume debug logs without exceeding budget. Provide implementation code examples in [LANGUAGE].
📝 Fill in the blanks
Replace these placeholders with your own content:
[LANGUAGE AND FRAMEWORK]
[e.g., REST API, background worker, microservice]
[e.g., AWS CloudWatch, Datadog, ELK stack, plain files]
[DESCRIBE YOUR EXISTING LOGGING SETUP, or 'none']
[LANGUAGE]
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.