Skip to content

Commit 0aff012

Browse files
feat: Remote Logging with manual set entityGuid and ingestKey feature complete.
1 parent 1be17d1 commit 0aff012

File tree

4 files changed

+2
-42
lines changed

4 files changed

+2
-42
lines changed

Agent/General/NewRelicAgentInternal.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,6 @@ - (void) onSessionStart {
465465
uuid);
466466
self->_agentConfiguration.sessionIdentifier = uuid_String;
467467

468-
// TODO: Remove Logging Debugging Logging
469-
NRLOG_VERBOSE(@"Set new sessionId = %@",uuid_String);
470-
471468
CFRelease(uuid);
472469
if (self->_agentConfiguration.sessionIdentifier.length > 0) {
473470
NRMA_setSessionId([self->_agentConfiguration.sessionIdentifier UTF8String]);

Agent/Harvester/DataStore/NRMAHarvesterConfiguration.m

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,6 @@ - (BOOL) isEqual:(id)object {
149149
if (self.application_id != that.application_id) return NO;
150150
if (![self.encoding_key isEqualToString:that.encoding_key]) return NO;
151151

152-
// Should trusted_account_key be considered in Equality
153-
154-
// Should entity_guid be considered in Equality?
155-
156-
// Should log_reporting be considered in Equality?
157-
158-
159152
// [ <account id> , <app id> ];
160153
return [self.data_token isEqual:that.data_token];
161154
}
@@ -179,12 +172,6 @@ - (NSUInteger) hash
179172
result = 31 * result + (unsigned int)self.application_id;
180173
result = 31 * result + self.encoding_key.hash;
181174

182-
// Should trusted_account_key be considered in Hash?
183-
184-
// Should entity_guid be considered in Hash?
185-
186-
// Should log_reporting be considered in Hash?
187-
188175
return result;
189176
}
190177
@end

Agent/Harvester/NRMAHarvester.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ - (void) connected
333333
[self transition:NRMA_HARVEST_DISCONNECTED];
334334
// Reconnect performed here.
335335
[self execute];
336-
337-
// TODO: Is this the right place to send the configuration update Spt Metric?
336+
338337
// Send Supportability metric when received 409 to indicate that a config update should happen or send it when actual /connect call finishes which refreshes the data.
339338
[NRMASupportMetricHelper enqueueConfigurationUpdateMetric];
339+
340340
break;
341341
default:
342342
break;

Test Harness/NRTestApp/NRTestApp/ViewModels/UtilViewModel.swift

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ class UtilViewModel {
4343
options.append(UtilOption(title: "Notice Network Request", handler: { [self] in noticeNWRequest()}))
4444
options.append(UtilOption(title: "Notice Network Failure", handler: { [self] in noticeFailedNWRequest()}))
4545

46-
options.append(UtilOption(title: "Notice Network Failure W Single Quotes", handler: { [self] in noticeFailedNWRequestWSingleQuotes()}))
47-
48-
49-
options.append(UtilOption(title: "Toggle Remote Logging On/Off", handler: { [self] in toggleRemoteLogging()}))
5046
options.append(UtilOption(title: "Test Log Dict", handler: { [self] in testLogDict()}))
5147

5248
options.append(UtilOption(title: "URLSession dataTask", handler: { [self] in doDataTask()}))
@@ -133,26 +129,6 @@ class UtilViewModel {
133129
with: NRTimer(), andFailureCode: NSURLErrorTimedOut)
134130
}
135131

136-
func noticeFailedNWRequestWSingleQuotes() {
137-
NewRelic.noticeNetworkFailure(for: URL(string: "http://test.com/test('test')"), httpMethod: "GET",
138-
with: NRTimer(), andFailureCode: NSURLErrorTimedOut)
139-
}
140-
141-
var logEnabled = false
142-
143-
// testing only: this won't work once server supports settings this.
144-
// Does not sync initial state.
145-
func toggleRemoteLogging() {
146-
if !logEnabled {
147-
NewRelic.enableFeatures([NRMAFeatureFlags.NRFeatureFlag_LogReporting])
148-
logEnabled = true
149-
}
150-
else {
151-
NewRelic.disableFeatures([NRMAFeatureFlags.NRFeatureFlag_LogReporting])
152-
logEnabled = false
153-
}
154-
}
155-
156132
func testLogDict() {
157133
NewRelic.logAll([
158134
"logLevel": "WARNING",

0 commit comments

Comments
 (0)