feat(web): configure trace explorer links

This commit is contained in:
lyon
2026-06-20 16:20:41 +08:00
parent c5f51f2b1b
commit c73b19fcaa
11 changed files with 202 additions and 4 deletions
+10
View File
@@ -979,6 +979,12 @@ function runtimeWorkbenchTraceTimelinePolicy(deploy, profile) {
return Object.keys(result).length > 0 ? result : null;
}
function runtimeTraceExplorerUrlTemplate(deploy, profile) {
if (!isRuntimeLane(profile)) return null;
const template = runtimeLaneConfig(deploy, profile)?.observability?.traceExplorerUrlTemplate;
return typeof template === "string" && template.trim().length > 0 ? template.trim() : null;
}
function runtimeStoreEnvForProfile(deploy, profile, serviceId) {
if (!isRuntimeLane(profile) || serviceId !== "hwlab-cloud-api") return {};
const postgres = runtimeLaneConfig(deploy, profile)?.runtimeStore?.postgres;
@@ -1225,6 +1231,10 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
if (typeof traceTimelinePolicy?.autoCollapseTerminal === "boolean") {
upsertEnv(container.env, "HWLAB_WORKBENCH_TRACE_AUTO_COLLAPSE_TERMINAL", booleanEnv(traceTimelinePolicy.autoCollapseTerminal));
}
const traceExplorerUrlTemplate = runtimeTraceExplorerUrlTemplate(deploy, profile);
if (traceExplorerUrlTemplate) {
upsertEnv(container.env, "HWLAB_WORKBENCH_TRACE_EXPLORER_URL_TEMPLATE", traceExplorerUrlTemplate);
}
}
}
rewritePodSecretRefs(podTemplate.spec, profile);