feat: handle login and scaling up deployments

This commit is contained in:
Tamipes 2025-12-01 20:03:23 +01:00
parent b14d3b599d
commit 6021bb05f1
5 changed files with 222 additions and 44 deletions

View file

@ -38,19 +38,29 @@ impl OpaqueError {
}
}
pub fn get_span_trace(&self) -> String {
let mut vec = Vec::new();
let mut vec: Vec<(&str, String)> = Vec::new();
self.span_trace.with_spans(|metadata, _fields| {
vec.push(metadata.name());
vec.push((metadata.name(), _fields.into()));
true
});
vec.iter().rfold(String::new(), |mut acc, x| {
if acc.len() != 0 {
acc.push_str("::");
let str = vec.iter().rfold(String::new(), |mut acc, x| {
let first = acc.len() != 0;
if first {
acc.push_str(":");
}
acc.push_str(x);
acc.push_str(x.0);
acc.push_str("{");
acc.push_str(&x.1);
acc.push_str("}");
acc
})
});
match String::from_utf8(strip_ansi_escapes::strip(str.clone())) {
Ok(x) => x,
Err(_) => str,
}
}
}