Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
yirutang committed Mar 12, 2024
1 parent 3c4df20 commit e9e257f
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,14 @@ public StreamWriter build() throws IOException {
}

String getFullTraceId() {
String version = GaxProperties.getLibraryVersion(StreamWriter.class);
if (traceId == null) {
return clientId + ":" + version;
String clientWithVersion =
GaxProperties.getLibraryVersion(StreamWriter.class).isEmpty()
? clientId
: clientId + ":" + GaxProperties.getLibraryVersion(StreamWriter.class);
if (traceId == null || traceId.isEmpty()) {
return clientWithVersion;
} else {
return clientId + ":" + version + " " + traceId;
return clientWithVersion + " " + traceId;
}
}
}
Expand Down

0 comments on commit e9e257f

Please sign in to comment.