File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
google-cloud-logging/src/main/java/com/google/cloud/logging Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,7 @@ private static ListValue generateLibrariesList(
163163 }
164164 Struct libraryInfo = createInfoStruct (libraryName , libraryVersion );
165165 ListValue .Builder libraryList = ListValue .newBuilder ();
166- // Append first the library info for this library
167- libraryList .addValues (Value .newBuilder ().setStructValue (libraryInfo ).build ());
166+ // First add instrumentation data of other libraries to a list if any
168167 if (existingLibraryList != null ) {
169168 for (Value val : existingLibraryList .getValuesList ()) {
170169 if (val .hasStructValue ()) {
@@ -190,6 +189,8 @@ private static ListValue generateLibrariesList(
190189 }
191190 }
192191 }
192+ // At last, append this library info to a list
193+ libraryList .addValues (Value .newBuilder ().setStructValue (libraryInfo ).build ());
193194 return libraryList .build ();
194195 }
195196
You can’t perform that action at this time.
0 commit comments