Skip to content

Commit c3942ea

Browse files
authored
fix: Wrong order of libraries info in instrumentation (#1196)
1 parent d4f17ab commit c3942ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

google-cloud-logging/src/main/java/com/google/cloud/logging/Instrumentation.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy