Skip to content

Commit fd8f334

Browse files
authored
Merge pull request #52 from exceptionless/add-config-url
Adding support of config url
2 parents eaf7255 + 65031e8 commit fd8f334

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/java/com/exceptionless/exceptionlessclient/configuration/Configuration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
public class Configuration {
1010
private static final String DEFAULT_SERVER_URL = "https://collector.exceptionless.io";
1111
private static final String DEFAULT_HEARTBEAT_SERVER_URL = "https://heartbeat.exceptionless.io";
12+
private static final String DEFAULT_CONFIG_SERVER_URL = "https://config.exceptionless.io";
1213
private static final Long DEFAULT_UPDATE_SETTINGS_WHEN_IDLE_INTERVAL = 12000L;
1314
private static final Integer DEFAULT_SUBMISSION_BATCH_SIZE = 50;
1415
private static final Integer DEFAULT_SUBMISSION_CLIENT_TIMEOUT_IN_MILLIS = 500;
@@ -29,6 +30,7 @@ public static class Property {
2930
@Getter private String apiKey;
3031
@Getter private String serverUrl;
3132
@Getter private String heartbeatServerUrl;
33+
@Getter private String configServerUrl;
3234
@Getter private Long updateSettingsWhenIdleInterval;
3335
@Getter private Integer submissionBatchSize;
3436
@Getter private Integer submissionClientTimeoutInMillis;
@@ -51,6 +53,10 @@ public Configuration(
5153
heartbeatServerUrl == null
5254
? (serverUrl == null ? DEFAULT_HEARTBEAT_SERVER_URL : serverUrl)
5355
: heartbeatServerUrl;
56+
this.configServerUrl =
57+
configServerUrl == null
58+
? (serverUrl == null ? DEFAULT_CONFIG_SERVER_URL : serverUrl)
59+
: configServerUrl;
5460
this.updateSettingsWhenIdleInterval =
5561
updateSettingsWhenIdleInterval == null
5662
? DEFAULT_UPDATE_SETTINGS_WHEN_IDLE_INTERVAL

src/main/java/com/exceptionless/exceptionlessclient/settings/DefaultSettingsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public SettingsResponse getSettings(long version) {
4040
.url(
4141
String.format(
4242
"%s/api/v2/projects/config?v=%s&access_token=%s",
43-
configuration.getServerUrl(), version, configuration.getApiKey()))
43+
configuration.getConfigServerUrl(), version, configuration.getApiKey()))
4444
.get()
4545
.build();
4646

0 commit comments

Comments
 (0)