feat(core): add attributes field to storage records and detail/summary models (Task 2)
Adds Map<String,String> attributes to ExecutionRecord, ProcessorRecord, ExecutionDetail, ProcessorNode, and ExecutionSummary. ExecutionStore records carry attributes as a JSON string; detail/summary models carry deserialized maps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package com.cameleer3.server.core.detail;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Full detail of a route execution, including the nested processor tree.
|
||||
@@ -45,6 +46,7 @@ public record ExecutionDetail(
|
||||
String inputBody,
|
||||
String outputBody,
|
||||
String inputHeaders,
|
||||
String outputHeaders
|
||||
String outputHeaders,
|
||||
Map<String, String> attributes
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cameleer3.server.core.detail;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Nested tree node representing a single processor execution within a route.
|
||||
@@ -21,11 +22,13 @@ public final class ProcessorNode {
|
||||
private final String diagramNodeId;
|
||||
private final String errorMessage;
|
||||
private final String errorStackTrace;
|
||||
private final Map<String, String> attributes;
|
||||
private final List<ProcessorNode> children;
|
||||
|
||||
public ProcessorNode(String processorId, String processorType, String status,
|
||||
Instant startTime, Instant endTime, long durationMs,
|
||||
String diagramNodeId, String errorMessage, String errorStackTrace) {
|
||||
String diagramNodeId, String errorMessage, String errorStackTrace,
|
||||
Map<String, String> attributes) {
|
||||
this.processorId = processorId;
|
||||
this.processorType = processorType;
|
||||
this.status = status;
|
||||
@@ -35,6 +38,7 @@ public final class ProcessorNode {
|
||||
this.diagramNodeId = diagramNodeId;
|
||||
this.errorMessage = errorMessage;
|
||||
this.errorStackTrace = errorStackTrace;
|
||||
this.attributes = attributes;
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -51,5 +55,6 @@ public final class ProcessorNode {
|
||||
public String getDiagramNodeId() { return diagramNodeId; }
|
||||
public String getErrorMessage() { return errorMessage; }
|
||||
public String getErrorStackTrace() { return errorStackTrace; }
|
||||
public Map<String, String> getAttributes() { return attributes; }
|
||||
public List<ProcessorNode> getChildren() { return List.copyOf(children); }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cameleer3.server.core.search;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Lightweight summary of a route execution for search result listings.
|
||||
@@ -31,6 +32,7 @@ public record ExecutionSummary(
|
||||
String correlationId,
|
||||
String errorMessage,
|
||||
String diagramContentHash,
|
||||
String highlight
|
||||
String highlight,
|
||||
Map<String, String> attributes
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ public interface ExecutionStore {
|
||||
Instant startTime, Instant endTime, Long durationMs,
|
||||
String errorMessage, String errorStacktrace, String diagramContentHash,
|
||||
String engineLevel,
|
||||
String inputBody, String outputBody, String inputHeaders, String outputHeaders
|
||||
String inputBody, String outputBody, String inputHeaders, String outputHeaders,
|
||||
String attributes
|
||||
) {}
|
||||
|
||||
record ProcessorRecord(
|
||||
@@ -31,6 +32,7 @@ public interface ExecutionStore {
|
||||
int depth, String parentProcessorId, String status,
|
||||
Instant startTime, Instant endTime, Long durationMs,
|
||||
String errorMessage, String errorStacktrace,
|
||||
String inputBody, String outputBody, String inputHeaders, String outputHeaders
|
||||
String inputBody, String outputBody, String inputHeaders, String outputHeaders,
|
||||
String attributes
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user