Skip to content

Commit

Permalink
fix: Wrong order of libraries info in instrumentation (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
losalex committed Nov 15, 2022
1 parent d4f17ab commit c3942ea
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 163,7 @@ private static ListValue generateLibrariesList(
}
Struct libraryInfo = createInfoStruct(libraryName, libraryVersion);
ListValue.Builder libraryList = ListValue.newBuilder();
// Append first the library info for this library
libraryList.addValues(Value.newBuilder().setStructValue(libraryInfo).build());
// First add instrumentation data of other libraries to a list if any
if (existingLibraryList != null) {
for (Value val : existingLibraryList.getValuesList()) {
if (val.hasStructValue()) {
Expand All @@ -190,6 189,8 @@ private static ListValue generateLibrariesList(
}
}
}
// At last, append this library info to a list
libraryList.addValues(Value.newBuilder().setStructValue(libraryInfo).build());
return libraryList.build();
}

Expand Down

0 comments on commit c3942ea

Please sign in to comment.