@@ -22,10 +22,10 @@ public static void main(String[] args) throws Exception {
2222 if (appender instanceof BugsnagAppender ) {
2323 // Set some global meta data (added to each report)
2424 ((BugsnagAppender ) appender ).getClient ().addCallback ((report ) -> {
25- report .addToTab ("diagnostics" , "timestamp" , new Date ());
26- report .addToTab ("customer" , "name" , "acme-inc" );
27- report .addToTab ("customer" , "paying" , true );
28- report .addToTab ("customer" , "spent" , 1234 );
25+ report .addMetadata ("diagnostics" , "timestamp" , new Date ());
26+ report .addMetadata ("customer" , "name" , "acme-inc" );
27+ report .addMetadata ("customer" , "paying" , true );
28+ report .addMetadata ("customer" , "spent" , 1234 );
2929 report .setUserName ("User Name" );
3030 report .setUserEmail ("user@example.com" );
3131 report .setUserId ("12345" );
@@ -58,8 +58,8 @@ public static void main(String[] args) throws Exception {
5858 throw new RuntimeException ("Handled exception - custom metadata" );
5959 } catch (RuntimeException e ) {
6060 LOGGER .warn (new BugsnagMarker ((report ) -> {
61- report .addToTab ("report tab" , "data key 1" , "data value 1" );
62- report .addToTab ("report tab" , "data key 2" , "data value 2" );
61+ report .addMetadata ("report tab" , "data key 1" , "data value 1" );
62+ report .addMetadata ("report tab" , "data key 2" , "data value 2" );
6363 return true ;
6464 }), "Something bad happened" , e );
6565 }
0 commit comments