feat(hub): populate runtime/host/release/request_id columns, honor environment, expose metadata in recent-errors (BIT-33316)
Paperclip-Issue: BIT-33316
This commit is contained in:
1 parent
baac48a632
commit
b757ec671a
4 files changed
+115
-2
No files matched your search
@@ -38,6 +38,15 @@ interface CrmPhpPayload {
|
||||
// Paperclip project UUID — used by error loop to route issues to the correct project board column
|
||||
paperclip_project_id?: unknown;
|
||||
paperclipProjectId?: unknown;
|
||||
// telemetry metadata (BIT-33316) — canonical keys + legacy aliases
|
||||
component?: unknown;
|
||||
release?: unknown;
|
||||
release_version?: unknown;
|
||||
runtime_name?: unknown;
|
||||
runtime_version?: unknown;
|
||||
host_name?: unknown;
|
||||
hostname?: unknown;
|
||||
environment?: unknown;
|
||||
}
|
||||
|
||||
function safeStr(v: unknown): string {
|
||||
@@ -103,6 +112,18 @@ export async function POST(request: NextRequest) {
|
||||
if (project_name) contextData.project_name = project_name;
|
||||
if (paperclip_project_id) contextData.paperclip_project_id = paperclip_project_id;
|
||||
|
||||
const metaPairs: Array<[string, string]> = [
|
||||
["component", safeStr(body.component)],
|
||||
["release_version", safeStr(body.release_version || body.release)],
|
||||
["runtime_name", safeStr(body.runtime_name)],
|
||||
["runtime_version", safeStr(body.runtime_version)],
|
||||
["host_name", safeStr(body.host_name || body.hostname)],
|
||||
["environment", safeStr(body.environment)],
|
||||
];
|
||||
for (const [k, v] of metaPairs) {
|
||||
if (v) contextData[k] = v;
|
||||
}
|
||||
|
||||
// Preserve other top-level diagnostic fields.
|
||||
const file_path = safeStr(body.file_path);
|
||||
const line_number = safeStr(body.line_number);
|
||||
|
||||
Reference in new issue
Block a user