fix: show hwlab phase attrs in otel summary (#662)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -1061,6 +1061,14 @@ function spanDetail(span: Record<string, unknown>, maxLength: number): string {
|
|||||||
attrPart(attrs, "commandFingerprint"),
|
attrPart(attrs, "commandFingerprint"),
|
||||||
attrPart(attrs, "http.route"),
|
attrPart(attrs, "http.route"),
|
||||||
attrPart(attrs, "http.response.status_code"),
|
attrPart(attrs, "http.response.status_code"),
|
||||||
|
attrPart(attrs, "hwlab.http.stage"),
|
||||||
|
attrPart(attrs, "hwlab.http.phase"),
|
||||||
|
attrPart(attrs, "hwlab.http.phase.outcome"),
|
||||||
|
attrPart(attrs, "hwlab.live_builds.service_id"),
|
||||||
|
attrPart(attrs, "hwlab.live_builds.service_kind"),
|
||||||
|
attrPart(attrs, "hwlab.live_builds.external"),
|
||||||
|
attrPart(attrs, "hwlab.live_builds.deploy_manifest_status"),
|
||||||
|
attrPart(attrs, "hwlab.live_builds.artifact_catalog_status"),
|
||||||
attrPart(attrs, "db.system"),
|
attrPart(attrs, "db.system"),
|
||||||
attrPart(attrs, "db.operation.name"),
|
attrPart(attrs, "db.operation.name"),
|
||||||
attrPart(attrs, "db.sql.table"),
|
attrPart(attrs, "db.sql.table"),
|
||||||
@@ -1376,7 +1384,7 @@ function compactSpanList(value: unknown, limit: number): unknown[] {
|
|||||||
return {
|
return {
|
||||||
name: span.name ?? null,
|
name: span.name ?? null,
|
||||||
service: span.service ?? null,
|
service: span.service ?? null,
|
||||||
attributes: compactRecord(attrs, ["failureKind", "terminalStatus", "status", "eventType", "idleMs", "waitingFor", "lastEventLabel", "http.route", "http.status_code", "http.response.status_code"]),
|
attributes: compactRecord(attrs, ["failureKind", "terminalStatus", "status", "eventType", "idleMs", "waitingFor", "lastEventLabel", "http.route", "http.status_code", "http.response.status_code", "hwlab.http.stage", "hwlab.http.phase", "hwlab.http.phase.outcome", "hwlab.live_builds.service_id", "hwlab.live_builds.service_kind", "hwlab.live_builds.external", "hwlab.live_builds.deploy_manifest_status", "hwlab.live_builds.artifact_catalog_status"]),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2044,7 +2052,12 @@ IMPORTANT_ATTRS = [
|
|||||||
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
||||||
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
||||||
"db.pool.max_lifetime_closed",
|
"db.pool.max_lifetime_closed",
|
||||||
"hwlab.runtime.stage", "error.code", "error.category", "error.layer",
|
"hwlab.runtime.stage", "hwlab.http.stage", "hwlab.http.phase",
|
||||||
|
"hwlab.http.phase.outcome", "hwlab.live_builds.service_id",
|
||||||
|
"hwlab.live_builds.service_kind", "hwlab.live_builds.external",
|
||||||
|
"hwlab.live_builds.deploy_manifest_status",
|
||||||
|
"hwlab.live_builds.artifact_catalog_status",
|
||||||
|
"error.code", "error.category", "error.layer",
|
||||||
"stage", "causeStage", "causeCode",
|
"stage", "causeStage", "causeCode",
|
||||||
"eventType", "runnerId", "attemptId", "backendProfile",
|
"eventType", "runnerId", "attemptId", "backendProfile",
|
||||||
"sourceCommit", "jobName", "podName", "logPath",
|
"sourceCommit", "jobName", "podName", "logPath",
|
||||||
@@ -2316,7 +2329,12 @@ IMPORTANT_ATTRS = [
|
|||||||
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
||||||
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
||||||
"db.pool.max_lifetime_closed",
|
"db.pool.max_lifetime_closed",
|
||||||
"hwlab.runtime.stage", "error.code", "error.category", "error.layer",
|
"hwlab.runtime.stage", "hwlab.http.stage", "hwlab.http.phase",
|
||||||
|
"hwlab.http.phase.outcome", "hwlab.live_builds.service_id",
|
||||||
|
"hwlab.live_builds.service_kind", "hwlab.live_builds.external",
|
||||||
|
"hwlab.live_builds.deploy_manifest_status",
|
||||||
|
"hwlab.live_builds.artifact_catalog_status",
|
||||||
|
"error.code", "error.category", "error.layer",
|
||||||
"stage", "causeStage", "causeCode",
|
"stage", "causeStage", "causeCode",
|
||||||
"eventType", "runnerId", "attemptId", "backendProfile",
|
"eventType", "runnerId", "attemptId", "backendProfile",
|
||||||
"sourceCommit", "jobName", "podName", "logPath",
|
"sourceCommit", "jobName", "podName", "logPath",
|
||||||
@@ -2719,7 +2737,12 @@ IMPORTANT_ATTRS = [
|
|||||||
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
"db.pool.in_use", "db.pool.idle", "db.pool.wait_count",
|
||||||
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
"db.pool.wait_duration_ms", "db.pool.max_idle_closed",
|
||||||
"db.pool.max_lifetime_closed",
|
"db.pool.max_lifetime_closed",
|
||||||
"hwlab.runtime.stage", "error.code", "error.category", "error.layer",
|
"hwlab.runtime.stage", "hwlab.http.stage", "hwlab.http.phase",
|
||||||
|
"hwlab.http.phase.outcome", "hwlab.live_builds.service_id",
|
||||||
|
"hwlab.live_builds.service_kind", "hwlab.live_builds.external",
|
||||||
|
"hwlab.live_builds.deploy_manifest_status",
|
||||||
|
"hwlab.live_builds.artifact_catalog_status",
|
||||||
|
"error.code", "error.category", "error.layer",
|
||||||
"stage", "causeStage", "causeCode",
|
"stage", "causeStage", "causeCode",
|
||||||
"eventType", "runnerId", "attemptId", "backendProfile",
|
"eventType", "runnerId", "attemptId", "backendProfile",
|
||||||
"sourceCommit", "jobName", "podName", "logPath",
|
"sourceCommit", "jobName", "podName", "logPath",
|
||||||
@@ -2947,6 +2970,10 @@ def tiny_span(item):
|
|||||||
"toolName", "type", "itemType", "itemId", "status", "exitCode",
|
"toolName", "type", "itemType", "itemId", "status", "exitCode",
|
||||||
"durationMs", "cwd", "processId", "command", "commandFingerprint",
|
"durationMs", "cwd", "processId", "command", "commandFingerprint",
|
||||||
"outputSummary", "outputBytes", "outputTruncated",
|
"outputSummary", "outputBytes", "outputTruncated",
|
||||||
|
"hwlab.http.stage", "hwlab.http.phase", "hwlab.http.phase.outcome",
|
||||||
|
"hwlab.live_builds.service_id", "hwlab.live_builds.service_kind",
|
||||||
|
"hwlab.live_builds.external", "hwlab.live_builds.deploy_manifest_status",
|
||||||
|
"hwlab.live_builds.artifact_catalog_status",
|
||||||
):
|
):
|
||||||
if key in attrs:
|
if key in attrs:
|
||||||
keep_attrs[key] = attrs[key]
|
keep_attrs[key] = attrs[key]
|
||||||
|
|||||||
Reference in New Issue
Block a user