Aalexbit-codemod

mine-legacy-prometheus

Mine legacy prom-client metrics instrumentation; read-only metrics

miningmetricsprometheusprom-clientobservabilitycode-mining
PRO
0 executions

Run locally

npx codemod mine-legacy-prometheus

This is a Pro codemod. Preview changes and insights for free, no login or code sharing required. Applying changes and accessing insights requires a paid plan and sign in.Learn more

mine-legacy-prometheus

Pro read-only mining codemod. Inventories legacy prom-client instrumentation and files that also use OpenTelemetry. Does not modify source.

Metrics

Emits observability_finding and observability_finding_summary.

Shared cardinalities (observability_finding)

CardinalityValues / meaning
categoryAlways prometheus
finding_typeSee table below
severitymedium or high
automatablefalse or partial
priority_hint7888
migration_lanereplace or review
rule_idPROM-001PROM-003
file, line, symbol, packageLocation and enclosing symbol

observability_finding_summary keeps only category, finding_type, severity, migration_lane.

Rules / finding_type

Rulefinding_typeWhat it means
PROM-001prom_client_importImport/require of prom-client
PROM-002prom_client_metricnew Counter / Histogram / Gauge / Summary
PROM-003dual_prom_and_otelSame file uses both prom-client and OpenTelemetry

Ready to contribute?

Build your own codemod and share it with the community.