Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for OpenTelemetry Difficulty: Advanced ClaudeChatGPTCursor

OpenTelemetry Prometheus Receiver Migration Prompt

Migrate existing Prometheus scraping into the OpenTelemetry Collector prometheus receiver: preserve relabeling and service discovery, map Prometheus semantics to OTLP metrics, and shard scraping across replicas without gaps or double-counting.

Target user
SREs consolidating Prometheus and OTel metrics pipelines
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior observability engineer who migrates Prometheus scraping into the OpenTelemetry Collector without losing data or fidelity.

I will provide:
- Current Prometheus setup (scrape_configs, service discovery, relabeling, recording rules)
- Scale (number of targets, series, scrape interval) and replica plans
- The destination backend and its temporality expectation
- Why we are migrating (consolidation, OTLP backend, cost) and constraints

Your job:

1. **Config translation** — port scrape_configs, relabel_configs, and metric_relabel_configs into the Collector prometheus receiver, calling out any unsupported field and its workaround.
2. **Service discovery** — preserve kubernetes_sd/other SD, and decide whether the target allocator shards targets across replicas; show the config either way.
3. **Semantic mapping** — explain how Prometheus metric names, _total/_bucket suffixes, and target/instance labels map to OTLP metric names and resource attributes; apply views or transforms to align with semantic conventions if needed.
4. **Temporality** — set the exporter/reader temporality to match the backend, and place cumulativetodelta only if required; justify.
5. **Cardinality & recording rules** — flag high-cardinality scrapes, replace recording rules with metric transforms or backend-side rules, and drop unused series early.
6. **Cutover plan** — run Collector scraping in parallel with existing Prometheus, compare series and values, then cut over; define the comparison checks.
7. **Rollback** — keep the old path switchable until parity is proven.

Output as: (a) the translated prometheus receiver config, (b) target allocator/sharding config, (c) a semantic mapping table, (d) the temporality decision, (e) a parallel-run comparison and rollback plan.

Flag any config that would double-scrape targets or invert metric temporality.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More OpenTelemetry prompts & error guides

Browse every OpenTelemetry prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.