Skip to content

Prometheus metrics + pprof endpoints #75

@KingAkeem

Description

@KingAkeem

Summary

Expose Prometheus metrics and pprof to operate and profile the crawler.

Motivation

  • Visibility into throughput, latency, errors
  • Ability to capture CPU/heap profiles

Scope

  • /metrics:
    • gotor_requests_total{code,host}
    • gotor_fetch_latency_seconds histogram
    • gotor_bytes_total
    • gotor_queue_depth{host}
  • /debug/pprof/* behind a flag

Acceptance Criteria

  • Metrics scrapeable by Prometheus
  • Short crawl shows non-zero counters and sane histograms
  • pprof captures are possible during a run

Tasks

  • internal/metrics package
  • Register metrics in server
  • Flag-gate pprof endpoints
  • README: how to profile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions