Skip to content

Commit ae68595

Browse files
committed
Merge branch 'main' of https://github.com/open-telemetry/opentelemetry-java into prepare-1.60.0
2 parents 16a5d3f + 50f5607 commit ae68595

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/LegacySpanProcessorInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void dropSpans(int count) {
5858
@Override
5959
public void finishSpans(int count, @Nullable String error) {
6060
// Legacy metrics only record when no error.
61-
if (error != null) {
61+
if (error == null) {
6262
processedSpans().add(count, standardAttrs);
6363
}
6464
}

0 commit comments

Comments
 (0)