Repository: pinpoint-apm/pinpoint
Issue: Change default span/stat format configuration options
Labels: enhancement

In preparation for 1.6.0 release, change the default span/stat formats to the following values, and remove the "experimental" keyword.

**pinpoint-collector.properties**
```
collector.experimental.span.format.compatibility.version=v1 -> collector.span.format.compatibility.version=v2
collector.experimental.stat.format.compatibility.version=v1 -> collector.stat.format.compatibility.version=v2
```
**pinpoint-web.properties**
```
web.experimental.span.format.compatibility.version=v1 -> web.span.format.compatibility.version=compatibilityMode
web.experimental.stat.format.compatibility.version=v1 -> web.stat.format.compatibility.version=compatibilityMode
```

Issue comments:
merged via #2213 


Pull request review comments:

Patch that resolved the issue:
diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/dao/hbase/HbaseTraceDaoFactory.java b/collector/src/main/java/com/navercorp/pinpoint/collector/dao/hbase/HbaseTraceDaoFactory.java
index 1d0856a78669..291abeeb4de9 100644
--- a/collector/src/main/java/com/navercorp/pinpoint/collector/dao/hbase/HbaseTraceDaoFactory.java
+++ b/collector/src/main/java/com/navercorp/pinpoint/collector/dao/hbase/HbaseTraceDaoFactory.java
@@ -31,8 +31,8 @@ public class HbaseTraceDaoFactory implements FactoryBean<TraceDao> {
     @Autowired
     private HBaseAdminTemplate adminTemplate;
 
-    @Value("#{pinpoint_collector_properties['collector.experimental.span.format.compatibility.version'] ?: 'v1'}")
-    private String mode = "v1";
+    @Value("#{pinpoint_collector_properties['collector.span.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     @Override
     public TraceDao getObject() throws Exception {
diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/handler/AgentStatHandlerFactory.java b/collector/src/main/java/com/navercorp/pinpoint/collector/handler/AgentStatHandlerFactory.java
index 679f7766ef53..e08f6d34eb67 100644
--- a/collector/src/main/java/com/navercorp/pinpoint/collector/handler/AgentStatHandlerFactory.java
+++ b/collector/src/main/java/com/navercorp/pinpoint/collector/handler/AgentStatHandlerFactory.java
@@ -47,8 +47,8 @@ public class AgentStatHandlerFactory implements FactoryBean<Handler> {
     @Autowired
     private HBaseAdminTemplate adminTemplate;
 
-    @Value("#{pinpoint_collector_properties['collector.experimental.stat.format.compatibility.version'] ?: 'v0'}")
-    private String mode = "v1";
+    @Value("#{pinpoint_collector_properties['collector.stat.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     @Override
     public Handler getObject() throws Exception {
diff --git a/collector/src/main/resources/pinpoint-collector.properties b/collector/src/main/resources/pinpoint-collector.properties
index 08fe18ef4a7d..b2d38553e9d2 100644
--- a/collector/src/main/resources/pinpoint-collector.properties
+++ b/collector/src/main/resources/pinpoint-collector.properties
@@ -79,10 +79,10 @@ cluster.listen.port=
 
 collector.spanEvent.sequence.limit=10000
 
-# span.binary format compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature span format v2 : https://github.com/naver/pinpoint/issues/1819
-collector.experimental.span.format.compatibility.version=v1
+# span.binary format compatibility = v1 or v2 or dualWrite
+# span format v2 : https://github.com/naver/pinpoint/issues/1819
+collector.span.format.compatibility.version=v2
 
-# stat handling compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature AgentStat data format v2 : https://github.com/naver/pinpoint/issues/1533
-collector.experimental.stat.format.compatibility.version=v1
+# stat handling compatibility = v1 or v2 or dualWrite
+# AgentStatV2 table : https://github.com/naver/pinpoint/issues/1533
+collector.stat.format.compatibility.version=v2
diff --git a/quickstart/collector/src/main/resources/pinpoint-collector.properties b/quickstart/collector/src/main/resources/pinpoint-collector.properties
index d046f8533f8f..3f06af7064bf 100644
--- a/quickstart/collector/src/main/resources/pinpoint-collector.properties
+++ b/quickstart/collector/src/main/resources/pinpoint-collector.properties
@@ -69,10 +69,10 @@ cluster.listen.port=
 
 collector.spanEvent.sequence.limit=5000
 
-# span.binary format compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature span format v2 : https://github.com/naver/pinpoint/issues/1819
-collector.experimental.span.format.compatibility.version=v1
+# span.binary format compatibility = v1 or v2 or dualWrite
+# span format v2 : https://github.com/naver/pinpoint/issues/1819
+collector.span.format.compatibility.version=v2
 
-# stat handling compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature AgentStat data format v2 : https://github.com/naver/pinpoint/issues/1533
-collector.experimental.stat.format.compatibility.version=v1
+# stat handling compatibility = v1 or v2 or dualWrite
+# AgentStatV2 table : https://github.com/naver/pinpoint/issues/1533
+collector.stat.format.compatibility.version=v2
diff --git a/quickstart/web/src/main/resources/pinpoint-web.properties b/quickstart/web/src/main/resources/pinpoint-web.properties
index 68c51ddbb368..64a6bd3fe2c4 100644
--- a/quickstart/web/src/main/resources/pinpoint-web.properties
+++ b/quickstart/web/src/main/resources/pinpoint-web.properties
@@ -32,10 +32,10 @@ web.hbase.selectAllSpans.limit=500
 
 web.activethread.activeAgent.duration.days=7
 
-# span.binary format compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature span format v2 : https://github.com/naver/pinpoint/issues/1819
-web.experimental.span.format.compatibility.version=compatibilityMode
+# span.binary format compatibility = v1 or v2 or compatibilityMode
+# span format v2 : https://github.com/naver/pinpoint/issues/1819
+web.span.format.compatibility.version=compatibilityMode
 
-# stat handling compatibility = v1 or v2 or compatibilityMode (WARNING : experimental feature)
-# experimental feature AgentStat data format v1 : https://github.com/naver/pinpoint/issues/1533
-web.experimental.stat.format.compatibility.version=compatibilityMode
+# stat handling compatibility = v1 or v2 or compatibilityMode
+# AgentStatV2 table : https://github.com/naver/pinpoint/issues/1533
+web.stat.format.compatibility.version=compatibilityMode
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseTraceDaoFactory.java b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseTraceDaoFactory.java
index 703881b47eac..53bfb6cab959 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseTraceDaoFactory.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/HbaseTraceDaoFactory.java
@@ -34,8 +34,8 @@ public class HbaseTraceDaoFactory implements FactoryBean<TraceDao> {
     @Autowired
     private HBaseAdminTemplate adminTemplate;
 
-    @Value("#{pinpointWebProps['web.experimental.span.format.compatibility.version'] ?: 'v1'}")
-    private String mode = "v1";
+    @Value("#{pinpointWebProps['web.span.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     @Override
     public TraceDao getObject() throws Exception {
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/AgentStatDaoFactory.java b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/AgentStatDaoFactory.java
index a50e285cbaee..3c43ec916089 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/AgentStatDaoFactory.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/AgentStatDaoFactory.java
@@ -53,8 +53,8 @@ abstract class AgentStatDaoFactory<T extends AgentStatDataPoint, D extends Agent
     @Autowired
     private HBaseAdminTemplate adminTemplate;
 
-    @Value("#{pinpointWebProps['web.experimental.stat.format.compatibility.version'] ?: 'v1'}")
-    private String mode = "v1";
+    @Value("#{pinpointWebProps['web.stat.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     D getDao() throws Exception {
         logger.info("AgentStatDao Compatibility {}", mode);
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/SampledAgentStatDaoFactory.java b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/SampledAgentStatDaoFactory.java
index 5d70785f4a02..d54522ee0f6f 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/SampledAgentStatDaoFactory.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/dao/hbase/stat/SampledAgentStatDaoFactory.java
@@ -53,8 +53,8 @@ abstract class SampledAgentStatDaoFactory<S extends SampledAgentStatDataPoint, D
     @Autowired
     private HBaseAdminTemplate adminTemplate;
 
-    @Value("#{pinpointWebProps['web.experimental.stat.format.compatibility.version'] ?: 'v1'}")
-    private String mode = "v1";
+    @Value("#{pinpointWebProps['web.stat.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     D getDao() throws Exception {
         logger.info("SampledAgentStatDao Compatibility {}", mode);
diff --git a/web/src/main/java/com/navercorp/pinpoint/web/service/stat/LegacyAgentStatChartServiceFactory.java b/web/src/main/java/com/navercorp/pinpoint/web/service/stat/LegacyAgentStatChartServiceFactory.java
index 95eaba293bc0..2654f559ae31 100644
--- a/web/src/main/java/com/navercorp/pinpoint/web/service/stat/LegacyAgentStatChartServiceFactory.java
+++ b/web/src/main/java/com/navercorp/pinpoint/web/service/stat/LegacyAgentStatChartServiceFactory.java
@@ -36,8 +36,8 @@ public class LegacyAgentStatChartServiceFactory implements FactoryBean<LegacyAge
 
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
-    @Value("#{pinpointWebProps['web.experimental.stat.format.compatibility.version'] ?: 'v1'}")
-    private String mode = "v1";
+    @Value("#{pinpointWebProps['web.stat.format.compatibility.version'] ?: 'v2'}")
+    private String mode = "v2";
 
     @Autowired
     @Qualifier("legacyAgentStatChartV1Service")
diff --git a/web/src/main/resources/pinpoint-web.properties b/web/src/main/resources/pinpoint-web.properties
index b4a2c4e3980c..581eb49f17f3 100644
--- a/web/src/main/resources/pinpoint-web.properties
+++ b/web/src/main/resources/pinpoint-web.properties
@@ -38,10 +38,10 @@ web.hbase.selectAllSpans.limit=500
 
 web.activethread.activeAgent.duration.days=7
 
-# span.binary format compatibility = v1 or v2 (WARNING : experimental feature)
-# experimental feature span format v2 : https://github.com/naver/pinpoint/issues/1819
-web.experimental.span.format.compatibility.version=v1
+# span.binary format compatibility = v1 or v2 or compatibilityMode
+# span format v2 : https://github.com/naver/pinpoint/issues/1819
+web.span.format.compatibility.version=compatibilityMode
 
-# stat handling compatibility = v1 or v2 or compatibilityMode (WARNING : experimental feature)
-# experimental feature AgentStat data format v1 : https://github.com/naver/pinpoint/issues/1533
-web.experimental.stat.format.compatibility.version=v1
+# stat handling compatibility = v1 or v2 or compatibilityMode
+# AgentStatV2 table : https://github.com/naver/pinpoint/issues/1533
+web.stat.format.compatibility.version=compatibilityMode


Test patch: