Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix App Map display of unknown dependencies #1716

Merged
merged 6 commits into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,22 @@ private void applySemanticConventions(SpanData span, RemoteDependencyTelemetry r
applyServiceBusSpan(attributes, remoteDependencyData);
return;
}

// passing max value because we don't know what the default port would be in this case,
// so we always want the port included
String target = getTargetFromPeerAttributes(attributes, Integer.MAX_VALUE);
if (target != null) {
remoteDependencyData.setTarget(target);
return;
}

// with no target, the App Map falls back to creating a node based on the telemetry name,
// which is very confusing, e.g. when multiple unrelated nodes all point to a single node
// because they had dependencies with the same telemetry name
//
// so we mark these as InProc, even though they aren't INTERNAL spans,
// in order to prevent App Map from considering them
remoteDependencyData.setType("InProc");
}

private void exportLogSpan(SpanData span) {
Expand Down