feat(web): configure trace explorer links
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -44,6 +44,9 @@ export type RuntimeLaneConfig = {
|
||||
api?: string;
|
||||
[key: string]: string | undefined;
|
||||
};
|
||||
observability?: {
|
||||
traceExplorerUrlTemplate?: string;
|
||||
};
|
||||
sourceRepo?: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user