Skip to content

Collect project metrics through Prometheus client #159

Open
@nikimanoledaki

Description

@nikimanoledaki

This issue details what needs to be done in the collect step.

You can reference the proposal 3 - Metrics section: https://github.com/cncf-tags/green-reviews-tooling/blob/main/docs/proposals/proposal-003-report.md#metrics.

There are two parts to this issue: setting up a Go client, and fetching project metrics from Prometheus.

1. Setup the Go client that fetches queries from the Prometheus HTTP API

Create a small Go client that runs in the cluster and authenticates with Prometheus to fetch metrics through queries.

Acceptance criteria:

  • Connect to the local Prometheus API via its address - example
  • Perform a query

2. Collect project metrics

The metrics we will need to collect through the Prometheus client are:

container_cpu_usage_seconds_total
container_memory_rss
container_memory_working_set_bytes

Note: Since we don't have a storage solution yet, it's okay to simply collect the metrics and log the outcome for now.

3. Fetch metrics as part of benchmark-pipeline.yaml

Acceptance criteria:

  • The Prometheus client should fetch these metrics at the end of a benchmark-job.
  • The timestamp of the Prometheus query should be the same as the start and end of the benchmark job.

Metadata

Metadata

Labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions