Skip to content

Commit

Permalink
Added optional namespace resolution for aws related services such as …
Browse files Browse the repository at this point in the history
…DynamoDB or SQS
  • Loading branch information
cemo committed Nov 6, 2017
1 parent 50b5334 commit 144e823
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ static byte[] doEncode(Span span) throws IOException {
if (span.kind() == null
|| span.kind() != Span.Kind.SERVER && span.kind() != Span.Kind.CONSUMER) {
writer.name("type").value("subsegment");
if (span.kind() != null) writer.name("namespace").value("remote");
if (span.kind() != null) {
String remote = span.tags().get("remote");
writer.name("namespace").value(remote == null ? "remote" : remote);
}
writer.name("name").value(span.remoteServiceName() == null ? "" : span.remoteServiceName());
}else{
writer.name("name").value(span.localServiceName());
Expand Down

0 comments on commit 144e823

Please sign in to comment.