Skip to content

Commit 6913df4

Browse files
authored
Merge pull request #516 from gavlyukovskiy/instrumentation_key_late_set_fix
Added check for TelemetryConfiguration#getInstrumentationKey emptiness
2 parents f40cd15 + c407311 commit 6913df4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/com/microsoft/applicationinsights/TelemetryClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public TelemetryContext getContext() {
106106
* @return 'true' if tracking is disabled, 'false' otherwise.
107107
*/
108108
public boolean isDisabled() {
109-
return
110-
Strings.isNullOrEmpty(getContext().getInstrumentationKey()) || configuration.isTrackingDisabled();
109+
return (Strings.isNullOrEmpty(configuration.getInstrumentationKey()) && Strings.isNullOrEmpty(getContext().getInstrumentationKey()))
110+
|| configuration.isTrackingDisabled();
111111
}
112112

113113
/**

0 commit comments

Comments
 (0)