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 4 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,20 @@ private void applySemanticConventions(SpanData span, RemoteDependencyTelemetry r
applyServiceBusSpan(attributes, remoteDependencyData);
return;
}

String target = getTargetFromPeerAttributes(attributes, -1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultPort = 0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen other places using 0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and added clarifying comment

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