Skip to content

Enable trace2 pack-objects metrics for git-pack-objects

In Trace2: Expose internal pack objects metrics wi... (!5442 - merged), Gitaly allows hooking into pack-objects command to extract relative metrics. The current implementation enables that hook for all Git commands, not just git-pack-objects. While it does not disrupt the activities of other commands, enabling it there is a waste of resources. It's very fortunate for us that it's behind a feature flag.

This commit fixes this situation by filtering the sub command that can enable this hook. This issue was noticed while rolling out the flag on Staging: #4997 (closed)

Edited by Quang-Minh Nguyen

Merge request reports