Skip to content

Commit 50f5607

Browse files
authored
Fix proto serializer (#8147)
1 parent e8920e7 commit 50f5607

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/ProtoSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ public void writeSerializedMessage(byte[] protoSerialized, String jsonSerialized
277277

278278
@Override
279279
public void close() throws IOException {
280+
idCache.clear();
280281
try {
281282
output.flush();
282-
idCache.clear();
283283
} catch (IOException e) {
284284
// If close is called automatically as part of try-with-resources, it's possible that
285285
// output.flush() will throw the same exception. Re-throwing the same exception in a finally

0 commit comments

Comments
 (0)