Skip to content

Commit 52a9b06

Browse files
adwsinghrhernandez35
authored andcommitted
Do not fail if we can't publish telemetry.
1 parent 799664d commit 52a9b06

File tree

1 file changed

+5
-1
lines changed
  • mcp/mcp-cli-api/src/main/java/software/amazon/smithy/java/mcp/cli

1 file changed

+5
-1
lines changed

mcp/mcp-cli-api/src/main/java/software/amazon/smithy/java/mcp/cli/CliMetrics.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public void close() {
4343
.counters(counters)
4444
.timings(timings)
4545
.build();
46-
telemetryPublisher.publish(telemetryData.build());
46+
try {
47+
telemetryPublisher.publish(telemetryData.build());
48+
} catch (Exception ignored) {
49+
//Do not fail if we can't publish telemetry.
50+
}
4751
}
4852
}

0 commit comments

Comments
 (0)