diff --git a/Classes/ApplicationInsights.h b/Classes/ApplicationInsights.h index f161382e..2dc47d31 100644 --- a/Classes/ApplicationInsights.h +++ b/Classes/ApplicationInsights.h @@ -32,7 +32,7 @@ // Notification message which MSAIApplicationInsights is listening to, to retry requesting updated from the server #define MSAINetworkDidBecomeReachableNotification @"MSAINetworkDidBecomeReachable" -#define MSAI_BASE_URL @"https://dc.services.visualstudio.com" +#define MSAI_SERVER_URL @"https://dc.services.visualstudio.com/v2/track" #if MSAI_FEATURE_CRASH_REPORTER NS_ASSUME_NONNULL_BEGIN diff --git a/Classes/ApplicationInsightsPrivate.h b/Classes/ApplicationInsightsPrivate.h index 85e95674..c7d590c7 100644 --- a/Classes/ApplicationInsightsPrivate.h +++ b/Classes/ApplicationInsightsPrivate.h @@ -20,8 +20,6 @@ FOUNDATION_EXPORT NSString *const __unused kMSAITelemetryLastAppVersion; FOUNDATION_EXPORT NSString *const kMSAIIntegrationflowTimestamp; -FOUNDATION_EXPORT NSString *const kMSAITelemetryPath; - #define MSAILog(fmt, ...) do { if([MSAIApplicationInsights sharedInstance].isDebugLogEnabled && ![MSAIApplicationInsights sharedInstance].isAppStoreEnvironment) { NSLog((@"[MSAI] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0) #ifndef __IPHONE_8_0 diff --git a/Classes/ApplicationInsightsPrivate.m b/Classes/ApplicationInsightsPrivate.m index a42763aa..8d73f2e2 100644 --- a/Classes/ApplicationInsightsPrivate.m +++ b/Classes/ApplicationInsightsPrivate.m @@ -10,5 +10,3 @@ NSString *const kMSAIErrorDomain = @"MSAIErrorDomain"; NSString *const kMSAIIntegrationflowTimestamp = @"MSAIIntegrationFlowStartTimestamp"; - -NSString *const kMSAITelemetryPath = @"v2/track"; diff --git a/Classes/MSAIApplicationInsights.m b/Classes/MSAIApplicationInsights.m index 78166f8a..ab487e45 100644 --- a/Classes/MSAIApplicationInsights.m +++ b/Classes/MSAIApplicationInsights.m @@ -114,8 +114,7 @@ - (void)start { MSAITelemetryContext *telemetryContext = [[MSAITelemetryContext alloc] initWithAppContext:_appContext]; [[MSAIEnvelopeManager sharedManager] configureWithTelemetryContext:telemetryContext]; - [[MSAISender sharedSender] configureWithAppClient:[self appClient] - endpointPath:kMSAITelemetryPath]; + [[MSAISender sharedSender] configureWithAppClient:[self appClient]]; [[MSAISender sharedSender] sendSavedData]; #if MSAI_FEATURE_CRASH_REPORTER @@ -245,7 +244,7 @@ - (void)setServerURL:(NSString *)serverURL { _serverURL = [serverURL copy]; if (_appClient) { - self.appClient.baseURL = [NSURL URLWithString:_serverURL ? _serverURL : MSAI_BASE_URL]; + self.appClient.baseURL = [NSURL URLWithString:_serverURL ? _serverURL : MSAI_SERVER_URL]; } } } @@ -362,7 +361,7 @@ - (BOOL)checkValidityOfInstrumentationKey:(NSString *)instrumentationKey { - (MSAIAppClient *)appClient { if (!_appClient) { - _appClient = [[MSAIAppClient alloc] initWithBaseURL:[NSURL URLWithString:_serverURL ? _serverURL : MSAI_BASE_URL]]; + _appClient = [[MSAIAppClient alloc] initWithBaseURL:[NSURL URLWithString:_serverURL ? _serverURL : MSAI_SERVER_URL]]; } return _appClient; diff --git a/Classes/MSAISender.m b/Classes/MSAISender.m index 1386ea8d..6fe1b8af 100644 --- a/Classes/MSAISender.m +++ b/Classes/MSAISender.m @@ -36,8 +36,7 @@ + (instancetype)sharedSender { #pragma mark - Network status -- (void)configureWithAppClient:(MSAIAppClient *)appClient endpointPath:(NSString *)endpointPath { - self.endpointPath = endpointPath; +- (void)configureWithAppClient:(MSAIAppClient *)appClient { self.appClient = appClient; self.maxRequestCount = defaultRequestLimit; [self registerObservers]; diff --git a/Classes/MSAISenderPrivate.h b/Classes/MSAISenderPrivate.h index e7b1292c..16f7e7cd 100644 --- a/Classes/MSAISenderPrivate.h +++ b/Classes/MSAISenderPrivate.h @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN * @param appClient the app client used for sending the data * @param endpointPath the endpoint url of the telemetry server */ -- (void)configureWithAppClient:(MSAIAppClient *)appClient endpointPath:(NSString *)endpointPath; +- (void)configureWithAppClient:(MSAIAppClient *)appClient; ///----------------------------------------------------------------------------- /// @name Sending data