devloperdevesh / devloperdevesh/FaultPlane

feat(telemetry): add Prometheus runtime metrics

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
2
Forks
1
Avg merge
14m
Merged PRs (30d)
57

Description

Problem

FaultPlane currently exposes basic runtime functionality, but the telemetry layer does not provide structured Prometheus metrics for monitoring workflow execution, recovery events, and system health.

Without metrics visibility, operators cannot easily understand runtime behavior, identify failures, or observe recovery performance.


Proposed Solution

Add Prometheus metrics support inside the telemetry package.

The implementation should:

  • Add Prometheus metric collectors inside internal/telemetry/
  • Expose runtime metrics through the existing metrics API endpoint
  • Track workflow lifecycle events
  • Track checkpoint operations
  • Track recovery attempts and successful recoveries
  • Track basic runtime health information

Suggested metrics:

  • faultplane_workflows_total
  • faultplane_checkpoints_total
  • faultplane_recovery_total
  • faultplane_recovery_success_total
  • faultplane_runtime_info

Alternatives

Alternative approaches considered:

  • Using only application logs for runtime visibility

    • Simple but difficult to query and aggregate.
  • Using custom JSON metrics output

    • Requires additional tooling and does not integrate well with cloud-native monitoring systems.

Prometheus provides a standard observability interface for infrastructure systems.


Use Case

Operators running FaultPlane deployments need visibility into:

  • Active workflows
  • Recovery activity
  • Checkpoint frequency
  • Runtime health

These metrics will support debugging, dashboards, alerting, and future production deployments.


Additional Notes

Requirements:

  • Keep telemetry implementation independent from business logic.
  • Follow existing package structure.
  • Add unit tests for metric registration and updates.
  • Avoid introducing unnecessary dependencies.

Related areas:

  • internal/telemetry/
  • internal/api/metrics.go
  • Operations Dashboard integration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing telemetry package under internal/telemetry/ and the metrics endpoint in internal/api/metrics.go. Trace how the existing metrics API is exposed, then add collectors for workflow, checkpoint, recovery, and runtime health events while keeping telemetry independent from business logic. Done means the endpoint exposes the new metrics and unit tests cover their registration and updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, prometheus
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.