Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Completely remove endpoint path and use complete URL
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis committed Apr 28, 2015
1 parent 9d5cdba commit 1d933ed
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Classes/ApplicationInsights.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Classes/ApplicationInsightsPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Classes/ApplicationInsightsPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@
NSString *const kMSAIErrorDomain = @"MSAIErrorDomain";

NSString *const kMSAIIntegrationflowTimestamp = @"MSAIIntegrationFlowStartTimestamp";

NSString *const kMSAITelemetryPath = @"v2/track";
7 changes: 3 additions & 4 deletions Classes/MSAIApplicationInsights.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
}
}
}
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions Classes/MSAISender.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Classes/MSAISenderPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d933ed

Please sign in to comment.