File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
google-cloud-storage/src/main/java/com/google/cloud/storage Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1613,6 +1613,10 @@ public boolean isOpen() {
16131613 public void close () throws IOException {
16141614 try {
16151615 delegate .close ();
1616+ } catch (IOException | RuntimeException e ) {
1617+ openSpan .recordException (e );
1618+ openSpan .setStatus (StatusCode .ERROR , e .getClass ().getSimpleName ());
1619+ throw e ;
16161620 } finally {
16171621 openSpan .end ();
16181622 }
@@ -1653,6 +1657,10 @@ public boolean isOpen() {
16531657 public void close () throws IOException {
16541658 try {
16551659 delegate .close ();
1660+ } catch (IOException | RuntimeException e ) {
1661+ openSpan .recordException (e );
1662+ openSpan .setStatus (StatusCode .ERROR , e .getClass ().getSimpleName ());
1663+ throw e ;
16561664 } finally {
16571665 openSpan .end ();
16581666 }
You can’t perform that action at this time.
0 commit comments