Skip to content
New issue

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

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

Already on GitHub? # to your account

Add additional metrics reporting size of artifacts served #4602

Closed
Tracked by #4604
bmbouter opened this issue Oct 20, 2023 · 1 comment · Fixed by #5338
Closed
Tracked by #4604

Add additional metrics reporting size of artifacts served #4602

bmbouter opened this issue Oct 20, 2023 · 1 comment · Fixed by #5338
Assignees

Comments

@bmbouter
Copy link
Member

Need / Background

When running on Pulp on cloud services the egress network costs serving data to off-cloud hosts can be very expensive. This is true regardless of if Pulp is serving the data directly (local filesystem storage) or if it's using an object storage backend.

Understanding these costs is key. It would be excellent to know answers to these questions:

  • How much data did I serve for this Artifact request
  • Which Repository (or at least Distribution) is this Artifact member of?
  • Which Domain (if any) is this Artifact a member of?
  • Where did this Artifact go (in a network sense, e.g. IP)?

Proposal

Have the pulpcore-content app serve up this raw data as part of the per-request open telemetry data that is already reported as part of basic enabling of otel support in pulpcore-content. Specifically have it report:

  • Bytes of the Artifact served
  • Domain the request is being handled as

The Distribution URL would be contained in the URL of the request which is already reported, so no additional work is needed there. Also the IP of the client is also contained in the data already so additional work isn't needed for that.

One Detail about Object Storage

Note, in the case where Pulp is using Object storage, the Bytes reported needs to be the Artifact size (which Pulp knows in its DB). With Object storage the actual response from Pulp is a redirect which is very small. We need the Bytes of the Artifact, not the Bytes of the redirect request served.

@ipanova
Copy link
Member

ipanova commented Oct 24, 2023

I think we have multi-artifact content in pulp-gem, how these metrics would be working there? Usually there is 1 to 1 mapping between content and artifact so metrics for such case makes sense, but what about case with multi-artifact content?

@lubosmj lubosmj self-assigned this Mar 1, 2024
@pulpbot pulpbot moved this to In Progress in RH Pulp Kanban board Mar 1, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Mar 13, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Mar 25, 2024
@pulpbot pulpbot moved this from In Progress to Needs review in RH Pulp Kanban board Mar 25, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Mar 26, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Mar 26, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Apr 25, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 8, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 8, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 9, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 29, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue May 29, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Jun 5, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Jun 24, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Jun 24, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Jun 24, 2024
lubosmj added a commit to lubosmj/pulpcore that referenced this issue Jul 25, 2024
@lubosmj lubosmj closed this as completed in f26482c Sep 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
No open projects
Status: Needs review
3 participants