cloudflare / cloudflare/cloudflare-prometheus-exporter

feat: cache status per content

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
181
Forks
39
Avg merge
11h 28m
Merged PRs (30d)
3

Description

The exporter exposes cache disposition per host via cloudflare_zone_hostname_cache_status{zone, host, cache_status}, and request volume per content type via cloudflare_zone_requests_content_type_total{zone, content_type} — but no metric crosses the two. Because they share no common label, they can't be joined in PromQL either.

Add a new metric which shows the cache_status per content_type per selected host.
cloudflare_zone_hostname_content_cache_status{zone, host, content_type, cache_status}
Maybe add a dedicated toggle (e.g. HOST_CONTENT_CACHE_METRICS=true, default off).
Content types come back as Cloudflare's bucketed short names (json, html, javascript, octet-stream, ...), so the label set is small.

Contributor guide

Open the contributing guide

Research direction

Use the existing cloudflare_zone_hostname_cache_status and cloudflare_zone_requests_content_type_total metrics as entry points, tracing where their host and content-type data are collected. Add the cloudflare_zone_hostname_content_cache_status metric with zone, host, content_type, and cache_status labels, and confirm the dedicated toggle is off by default and the metric appears when enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.