feat(server): add tracing spans and caching to archive and blame services

- Add tracing spans with repo labels for archive and blame operations
- Implement caching for archive list entries when using OID selectors
- Implement caching for blame operations when using OID selectors
- Add detailed
This commit is contained in:
zhenyi
2026-06-04 15:33:16 +08:00
parent 729604f13b
commit cc202d6d1f
41 changed files with 2400 additions and 1067 deletions
+8 -3
View File
@@ -6,11 +6,16 @@ impl GitBare {
pub fn merge(&self, request: MergeRequest) -> GitResult<MergeResult> {
let target_branch = request.target_branch.clone();
let source_revision = match request.source.and_then(|s| s.selector) {
Some(crate::pb::object_selector::Selector::Oid(oid)) => oid.hex,
Some(crate::pb::object_selector::Selector::Revision(name)) => name.revision,
Some(crate::pb::object_selector::Selector::Oid(oid)) => oid.hex.clone(),
Some(crate::pb::object_selector::Selector::Revision(name)) => name.revision.clone(),
None => return Err(GitError::InvalidArgument("source is required".into())),
};
tracing::info!(
repo = %self.bare_dir.display(),
target = %target_branch,
source = %source_revision,
"merging"
);
let repo = self.gix_repo()?;
let branch_ref = format!("refs/heads/{}", target_branch);