Skip to content

Expose package resource file size as a Prometheus metric #991

@JamesMcDermott

Description

@JamesMcDermott

To help understand how consumers are using Porch and what they are putting into packages, we should also expose the new ResourcesSizeBytes field introduced in #913 as a Prometheus metric to allow scraping and monitoring (e.g. in Grafana).

OpenTelemetry infrastructure and several metrics are introduced in PR 561 "WIP: Refactor Performance Tests and add Grafana, Pyroscope and Prometheus monitoring stack", which is currently on hold. Pick out enough of the changes to allow setting up a histogram metric which can be used to record ResourcesSizeBytes whenever it changes.
(we want to be able to send in a Prometheus query that reports on all the packages in the system, both recent modifications and historical modifications)

Add to all Porch flows that update package revision resources so that they record the new value of ResourcesSizeBytes:

  • create package revision
  • delete package revision
  • discover/sync package revisions from a registered repository
  • delete package revisions on unregistering a repository
  • direct update of PackageRevisionResources in rpkg push

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions