Repository navigation
feat(observability): add high-level request and job logs for package … - #5622
Open
WeiQuan0605 wants to merge 1 commit into
Open
WeiQuan0605 wants to merge 1 commit into
WeiQuan0605 wants to merge 1 commit into
Conversation
…upload, resource matching, and package download - package_upload.request.start/accepted/failed in packages_controller.rb - package_upload.action.start/enqueued/failed in package_upload.rb (queue from config, no extra DB query) - package_upload.job.start/done/failed in package_bits.rb - resource_match.request.start/done in resource_matches_controller.rb - resource_match.exists.call downgraded to logger.debug to avoid O(n) log spam - resource_match done log includes cache_hits, cache_misses, cache_hit_rate, avg_resource_match_time - download_start_time measured before audit event recording - ResourceMatchPresenter accepts pre-parsed array to avoid double Oj.load per request
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds structured observability logs at the HTTP request and background job level for the package upload, package download, and resource matching flows. Complements the lower-level blobstore and storage-cli logs added in PR #5575 by providing a higher-level view of what triggered each operation.
New log events emitted:
package_upload.request.start/accepted/failedcc.api.packagespackage_download.request.start/donecc.api.packagespackage_upload.action.start/enqueued/failedcc.action.package_uploadPackageUploadpackage_upload.job.start/done/failedcc.backgroundPackageBitsjob executionresource_match.request.start/donecc.api.resource_matchesresource_match.exists.callcc.resource_poolResourceMatchPresenter now accepts a pre-parsed array to avoid double Oj.load per request.
An explanation of the use cases your change solves
Links to any other associated PRs
Add structured logs and Prometheus metrics for blobstore and packer operations #5575
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests