wu-sheng commented on a change in pull request #6120:
URL: https://github.com/apache/skywalking/pull/6120#discussion_r555501486



##########
File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/log/AbstractLogRecord.java
##########
@@ -35,88 +40,127 @@
     public static final String ENDPOINT_NAME = "endpoint_name";
     public static final String ENDPOINT_ID = "endpoint_id";
     public static final String TRACE_ID = "trace_id";
+    public static final String TRACE_SEGMENT_ID = "trace_segment_id";
+    public static final String SPAN_ID = "span_id";
     public static final String IS_ERROR = "is_error";
-    public static final String STATUS_CODE = "status_code";
     public static final String CONTENT_TYPE = "content_type";
     public static final String CONTENT = "content";
+    public static final String DATA_BINARY = "data_binary";
     public static final String TIMESTAMP = "timestamp";
+    public static final String TAGS = "tags";
 
     @Setter
     @Getter
     @Column(columnName = SERVICE_ID)
-    private int serviceId;
+    private String serviceId;
     @Setter
     @Getter
     @Column(columnName = SERVICE_INSTANCE_ID)
-    private int serviceInstanceId;
+    private String serviceInstanceId;
     @Setter
     @Getter
     @Column(columnName = ENDPOINT_ID)
     private String endpointId;
     @Setter
     @Getter
-    @Column(columnName = ENDPOINT_NAME)
+    @Column(columnName = ENDPOINT_NAME, matchQuery = true)
     private String endpointName;
     @Setter
     @Getter
-    @Column(columnName = TRACE_ID)
+    @Column(columnName = TRACE_ID, length = 150)
     private String traceId;
     @Setter
     @Getter
-    @Column(columnName = IS_ERROR)
-    private int isError;
+    @Column(columnName = TRACE_SEGMENT_ID, length = 150)
+    private String traceSegmentId;
     @Setter
     @Getter
-    @Column(columnName = STATUS_CODE)
-    private String statusCode;
+    @Column(columnName = SPAN_ID)
+    private int spanId;
     @Setter
     @Getter
-    @Column(columnName = CONTENT_TYPE)
+    @Column(columnName = IS_ERROR)
+    private int isError;
+    @Setter
+    @Getter
+    @Column(columnName = CONTENT_TYPE, storageOnly = true)
     private int contentType = ContentType.NONE.value();
     @Setter
     @Getter
-    @Column(columnName = CONTENT)
+    @Column(columnName = CONTENT, length = 1_000_000, matchQuery = true)
     private String content;
     @Setter
     @Getter
     @Column(columnName = TIMESTAMP)
     private long timestamp;
 
+    /**
+     * All tag binary data, used when querying.
+     */
+    @Setter
+    @Getter
+    @Column(columnName = DATA_BINARY, storageOnly = true)
+    private byte[] dataBinary;
+    @Setter
+    @Getter
+    @Column(columnName = TAGS)
+    private List<String> tags;
+
+    /**
+     * Tags raw data is a duplicate field of {@link #tags}. Some storage don't 
support array values in a single column.
+     * Then, those implementations could use this raw data to generate 
necessary data structures.
+     */
+    @Setter
+    @Getter
+    private List<Tag> tagsRawData;

Review comment:
       > tagsRawData is converted to a single column store in H2 and MySQL, 
StorageDatabacomplexObjec does not apply here ?
   
   I am not saying you have to use that, <string, string> is not the DataTable 
for. But the suggestion is, making the persistent logic consistent in one place.
   Like `KeyValueCollection` is also a good abstract name for this kind of 
value, right?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to