Skip to content

Commit 183d10a

Browse files
dhaval24grlima
authored andcommitted
Fix incorrect success flag set while capturing http dependency (#624)
1 parent c5a8bfd commit 183d10a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CHANGELOG
22

33
## Version 2.0.2
4+
- Fix incorrect success flag set when capturing HTTP Dependency.
45
- Fix [#577](https://github.com/Microsoft/ApplicationInsights-Java/issues/577), removed HttpFactory class as it was not being used.
56
- Fixed issue with sessionId not being set in request telemetry due to date parsing issues.
67
- Fix [#616](https://github.com/Microsoft/ApplicationInsights-Java/issues/616), added a way to have real time SDK Logs when logging on File.

core/src/main/java/com/microsoft/applicationinsights/internal/agent/CoreAgentNotificationsHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public void httpMethodFinishedWithPath(String identifier, String method, String
173173
}
174174
long deltaInMS = nanoToMilliseconds(delta);
175175
String name = method + " " + path;
176-
RemoteDependencyTelemetry telemetry = new RemoteDependencyTelemetry(name, uri, new Duration(deltaInMS), true);
176+
RemoteDependencyTelemetry telemetry = new RemoteDependencyTelemetry(name, uri, new Duration(deltaInMS), (result < 400));
177177
Date dependencyStartTime = new Date(System.currentTimeMillis() - deltaInMS);
178178
telemetry.setTimestamp(dependencyStartTime);
179179
telemetry.setId(correlationId);

0 commit comments

Comments
 (0)