@@ -35,6 +35,7 @@ public static class StoredConfig {
3535 final String reportUUID ;
3636 final boolean agentless ;
3737 final boolean sendToErrorTracking ;
38+ final boolean registerMappingEnabled ;
3839
3940 StoredConfig (
4041 String reportUUID ,
@@ -45,7 +46,8 @@ public static class StoredConfig {
4546 String processTags ,
4647 String runtimeId ,
4748 boolean agentless ,
48- boolean sendToErrorTracking ) {
49+ boolean sendToErrorTracking ,
50+ boolean registerMappingEnabled ) {
4951 this .service = service ;
5052 this .env = env ;
5153 this .version = version ;
@@ -55,6 +57,11 @@ public static class StoredConfig {
5557 this .reportUUID = reportUUID ;
5658 this .agentless = agentless ;
5759 this .sendToErrorTracking = sendToErrorTracking ;
60+ this .registerMappingEnabled = registerMappingEnabled ;
61+ }
62+
63+ public CrashUploaderSettings toCrashUploaderSettings () {
64+ return new CrashUploaderSettings (registerMappingEnabled );
5865 }
5966
6067 public static class Builder {
@@ -67,6 +74,7 @@ public static class Builder {
6774 String reportUUID ;
6875 boolean agentless ;
6976 boolean sendToErrorTracking ;
77+ boolean registerMappingEnabled ;
7078
7179 public Builder (Config config ) {
7280 // get sane defaults
@@ -77,6 +85,8 @@ public Builder(Config config) {
7785 this .reportUUID = RandomUtils .randomUUID ().toString ();
7886 this .agentless = config .isCrashTrackingAgentless ();
7987 this .sendToErrorTracking = config .isCrashTrackingErrorsIntakeEnabled ();
88+ this .registerMappingEnabled =
89+ config .isCrashTrackingExperimentalRegisterMappingEnabled ();
8090 }
8191
8292 public Builder service (String service ) {
@@ -119,6 +129,11 @@ public Builder agentless(boolean agentless) {
119129 return this ;
120130 }
121131
132+ public Builder registerMappingEnabled (boolean registerMappingEnabled ) {
133+ this .registerMappingEnabled = registerMappingEnabled ;
134+ return this ;
135+ }
136+
122137 // @VisibleForTesting
123138 Builder reportUUID (String reportUUID ) {
124139 this .reportUUID = reportUUID ;
@@ -135,7 +150,8 @@ public StoredConfig build() {
135150 processTags ,
136151 runtimeId ,
137152 agentless ,
138- sendToErrorTracking );
153+ sendToErrorTracking ,
154+ registerMappingEnabled );
139155 }
140156 }
141157 }
@@ -194,6 +210,10 @@ static void writeConfigToFile(Config config, Path cfgPath, String... additionalE
194210 writeEntry (bw , "java_home" , SystemProperties .get ("java.home" ));
195211 writeEntry (bw , "agentless" , Boolean .toString (config .isCrashTrackingAgentless ()));
196212 writeEntry (bw , "upload_to_et" , Boolean .toString (config .isCrashTrackingErrorsIntakeEnabled ()));
213+ writeEntry (
214+ bw ,
215+ "register_mapping" ,
216+ Boolean .toString (config .isCrashTrackingExperimentalRegisterMappingEnabled ()));
197217
198218 Runtime .getRuntime ()
199219 .addShutdownHook (
@@ -257,6 +277,9 @@ public static StoredConfig readConfig(Config config, Path scriptPath) {
257277 case "upload_to_et" :
258278 cfgBuilder .sendToErrorTracking (Boolean .parseBoolean (value ));
259279 break ;
280+ case "register_mapping" :
281+ cfgBuilder .registerMappingEnabled (Boolean .parseBoolean (value ));
282+ break ;
260283 default :
261284 // ignore
262285 break ;
0 commit comments