Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement Prometheus metric exporter #154

Merged
merged 4 commits into from
Feb 20, 2022
Merged

feat: Implement Prometheus metric exporter #154

merged 4 commits into from
Feb 20, 2022

Conversation

scarmuega
Copy link
Member

@scarmuega scarmuega commented Feb 18, 2022

This PR introduces a /metrics endpoint that uses Prometheus format to expose metrics about the progress of the pipeline.

Each stage (source / sink) is responsible for notifying their progress as they process each event. This notifications are then aggregated via counters & gauges and exposed via HTTP using the well-known Prometheus encoding.

This PR includes the following metrics:

  • chain_tip: the last detected tip of the chain (height)
  • rollback_count: number of rollback events occurred
  • source_current_slot: last slot processed by the source of the pipeline
  • source_current_height: last height (block #) processed by the source of the pipeline
  • source_event_count: number of events processed by the source of the pipeline
  • sink_current_slot: last slot processed by the sink of the pipeline
  • sink_event_count: number of events processed by the sink of the pipeline

@scarmuega scarmuega marked this pull request as ready for review February 20, 2022 12:26
@scarmuega scarmuega merged commit c34d80e into main Feb 20, 2022
@scarmuega scarmuega deleted the feat/metrics branch February 20, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants