fix: 修复纯 Kafka Trace 与原始事件观察窗
This commit is contained in:
@@ -1136,6 +1136,17 @@ function runtimeWorkbenchTraceTimelinePolicy(deploy, profile) {
|
||||
return Object.keys(result).length > 0 ? result : null;
|
||||
}
|
||||
|
||||
function runtimeWorkbenchRawHwlabEventWindowPolicy(deploy, profile) {
|
||||
if (!isRuntimeLane(profile)) return null;
|
||||
const policy = runtimeLaneConfig(deploy, profile)?.workbench?.rawHwlabEventWindow;
|
||||
if (!policy || typeof policy !== "object" || Array.isArray(policy)) return null;
|
||||
return {
|
||||
enabled: policy.enabled,
|
||||
maxEntries: policy.maxEntries,
|
||||
maxRetainedBytes: policy.maxRetainedBytes
|
||||
};
|
||||
}
|
||||
|
||||
function runtimeTraceExplorerUrlTemplate(deploy, profile) {
|
||||
if (!isRuntimeLane(profile)) return null;
|
||||
const template = runtimeLaneConfig(deploy, profile)?.observability?.traceExplorerUrlTemplate;
|
||||
@@ -1586,6 +1597,12 @@ 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 rawHwlabEventWindowPolicy = runtimeWorkbenchRawHwlabEventWindowPolicy(deploy, profile);
|
||||
if (rawHwlabEventWindowPolicy) {
|
||||
upsertEnv(container.env, "HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_ENABLED", booleanEnv(rawHwlabEventWindowPolicy.enabled));
|
||||
upsertEnv(container.env, "HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_MAX_ENTRIES", String(rawHwlabEventWindowPolicy.maxEntries));
|
||||
upsertEnv(container.env, "HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_MAX_RETAINED_BYTES", String(rawHwlabEventWindowPolicy.maxRetainedBytes));
|
||||
}
|
||||
const traceExplorerUrlTemplate = runtimeTraceExplorerUrlTemplate(deploy, profile);
|
||||
if (traceExplorerUrlTemplate) {
|
||||
upsertEnv(container.env, "HWLAB_WORKBENCH_TRACE_EXPLORER_URL_TEMPLATE", traceExplorerUrlTemplate);
|
||||
|
||||
Reference in New Issue
Block a user