{"record":{"id":"f0157234c7bf1eb8","repo":"apache/seatunnel","slug":"found-unassigned-metric-entries-for-table","errorCode":null,"errorMessage":"Found {} unassigned metric entries for table '{}' metric '{}', using table name key only for these entries","messagePattern":"Found (.+?) unassigned metric entries for table '(.+?)' metric '(.+?)', using table name key only for these entries","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java","lineNumber":879,"sourceCode":"                                        metricName,\n                                        identifier + \".\" + tableName,\n                                        metricsByIdentifier.get(identifier),\n                                        tableMetricsMaps);\n                            });\n\n            if (vertexIdentifiers.size() > 1\n                    && metricsByIdentifier.size() < vertexIdentifiers.size()) {\n                log.warn(\n                        \"Some vertices may not be reporting metrics yet for table '{}': expected {} vertices {}, but only received metrics for {} vertices {}\",\n                        tableName,\n                        vertexIdentifiers.size(),\n                        vertexIdentifiers,\n                        metricsByIdentifier.size(),\n                        metricsByIdentifier.keySet());\n            }\n\n            if (unassignedMetrics != null && unassignedMetrics.size() > 0) {\n                log.warn(\n                        \"Found {} unassigned metric entries for table '{}' metric '{}', using table name key only for these entries\",\n                        unassignedMetrics.size(),\n                        tableName,\n                        metricName);\n                putMetricToMap(metricName, tableName, unassignedMetrics, tableMetricsMaps);\n            }\n            return;\n        }\n\n        // Fallback for legacy/simplified metric nodes without tags (mainly in tests or older\n        // outputs).\n        int arraySize = metricNode.size();\n        if (vertexIdentifiers.size() > 1) {\n            if (arraySize == vertexIdentifiers.size()) {\n                for (int i = 0; i < arraySize; i++) {\n                    String identifier = vertexIdentifiers.get(i);\n                    String metricKey = identifier + \".\" + tableName;\n                    JsonNode element = metricNode.get(i);","sourceCodeStart":861,"sourceCodeEnd":897,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java#L861-L897","documentation":"During per-table metric aggregation, some raw metric entries could not be mapped to any known vertex identifier (unassignedMetrics). processMetric() logs this warning with the count, table, and metric name, and stores these entries under the plain table-name key so the data is not lost, at the cost of losing per-vertex attribution.","triggerScenarios":"Metric payload contains entries whose identifiers don't match the computed vertexIdentifiers for the table — e.g. identifiers from vertices not in the current DAG config, or naming/format drift between the metrics store and the service's identifier construction.","commonSituations":"Engine version mismatch between the node writing metrics and the REST service parsing them; job restarted with different parallelism so old identifier entries remain; dynamic table/vertex naming changes.","solutions":["Compare the unassigned metric identifiers in raw job metrics against the vertexIdentifiers the REST service derives to spot naming drift.","Ensure all nodes run the same SeaTunnel version (metric identifier formats changed across versions).","Check for leftover metrics from a previous run of the same job ID and clean/ignore stale metrics.","Accept the fallback if table-level totals suffice; data is preserved under the table-name key."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// reconcile raw metric identifiers against derived vertex identifiers\nSet<String> unknown = rawIds.stream().filter(id -> !vertexIdentifiers.contains(id)).collect(toSet());\nif (!unknown.isEmpty()) { handle or log before aggregation; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run uniform SeaTunnel versions so metric identifier formats match","Clean stale metrics after job restarts with changed parallelism","Compare raw metric IDs to DAG vertex identifiers when drift is suspected","Use table-level keys when per-vertex attribution is optional"],"tags":["metrics","rest-api","identifier-mismatch"],"backgroundTag":"unexpected-response-shape","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}