You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "andrew4699 (via GitHub)" <gi...@apache.org> on 2025/02/18 20:29:10 UTC

[PR] Add a debug log with the full exception [polaris]

andrew4699 opened a new pull request, #1023:
URL: https://github.com/apache/polaris/pull/1023

   Right now it's possible to get an exception and not know what went wrong, because the inner details of the exception aren't shown anywhere. This PR logs the entire exception at the DEBUG level so users can opt into greater debugability.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "eric-maynard (via GitHub)" <gi...@apache.org>.
eric-maynard merged PR #1023:
URL: https://github.com/apache/polaris/pull/1023


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #1023:
URL: https://github.com/apache/polaris/pull/1023#issuecomment-2675326518

   LGTM. Agreed with @eric-maynard  for the name consistency.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "andrew4699 (via GitHub)" <gi...@apache.org>.
andrew4699 commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1962437579


##########
service/common/src/main/java/org/apache/polaris/service/exception/IcebergExceptionMapper.java:
##########
@@ -75,6 +75,8 @@ public IcebergExceptionMapper() {}
   @Override
   public Response toResponse(RuntimeException runtimeException) {
     LOGGER.info("Handling runtimeException {}", runtimeException.getMessage());
+    LOGGER.debug("Full runtimeException", runtimeException);

Review Comment:
   Updated!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "andrew4699 (via GitHub)" <gi...@apache.org>.
andrew4699 commented on PR #1023:
URL: https://github.com/apache/polaris/pull/1023#issuecomment-2675343427

   @flyrain @eric-maynard Updated runtimeException to be uppercase


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "andrew4699 (via GitHub)" <gi...@apache.org>.
andrew4699 commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1962255093


##########
build-logic/src/main/kotlin/polaris-java.gradle.kts:
##########
@@ -82,7 +82,7 @@ testing {
       dependencies {
         implementation(project())
         implementation(testFixtures(project()))
-        runtimeOnly(
+        implementation(

Review Comment:
   It was previously runtimeOnly so I wasn't sure if some other non-test thing needed it, and I'm not sure if there's a better common ancestor of runtimeOnly/testImplementation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1962604360


##########
build-logic/src/main/kotlin/polaris-java.gradle.kts:
##########
@@ -82,7 +82,7 @@ testing {
       dependencies {
         implementation(project())
         implementation(testFixtures(project()))
-        runtimeOnly(
+        implementation(

Review Comment:
   @snazy WDYT about this change?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "andrew4699 (via GitHub)" <gi...@apache.org>.
andrew4699 commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1962429441


##########
service/common/src/test/java/org/apache/polaris/service/exception/IcebergExceptionMapperTest.java:
##########
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.polaris.service.quarkus;
+package org.apache.polaris.service.exception;

Review Comment:
   Agree in general. This one seemed trivial since the test is isolated and was moved at some point during the Quarkus refactor to be in a different package than IcebergExceptionMapper.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #1023:
URL: https://github.com/apache/polaris/pull/1023#issuecomment-2675284288

   @flyrain @eric-maynard : Any concerns with the new log messages?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "andrew4699 (via GitHub)" <gi...@apache.org>.
andrew4699 commented on PR #1023:
URL: https://github.com/apache/polaris/pull/1023#issuecomment-2675287797

   @dimas-b I reverted the global dep change and added a testImplementation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1962604041


##########
service/common/src/test/java/org/apache/polaris/service/exception/IcebergExceptionMapperTest.java:
##########
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.polaris.service.quarkus;
+package org.apache.polaris.service.exception;

Review Comment:
   yeah, no worries



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "eric-maynard (via GitHub)" <gi...@apache.org>.
eric-maynard commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1966024984


##########
service/common/src/main/java/org/apache/polaris/service/exception/IcebergJsonProcessingExceptionMapper.java:
##########
@@ -76,6 +76,7 @@ public Response toResponse(JsonProcessingException exception) {
      * Otherwise, it's those pesky users.
      */
     LOGGER.info("Unable to process JSON: {}", exception.getMessage());
+    LOGGER.debug("Full JsonProcessingException", exception);

Review Comment:
   omega nit:
   
   The other message uses lower case (`runtimeException`) while this uses upper (`JsonProcessingException`). Also, I imagine the type is part of the `Exception.toString`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add a debug log with the full exception [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #1023:
URL: https://github.com/apache/polaris/pull/1023#discussion_r1960942842


##########
build-logic/src/main/kotlin/polaris-java.gradle.kts:
##########
@@ -82,7 +82,7 @@ testing {
       dependencies {
         implementation(project())
         implementation(testFixtures(project()))
-        runtimeOnly(
+        implementation(

Review Comment:
   why is this change required? Why not add it as an explicit "test" dependency only where it is truly needed?



##########
service/common/src/main/java/org/apache/polaris/service/exception/IcebergExceptionMapper.java:
##########
@@ -75,6 +75,8 @@ public IcebergExceptionMapper() {}
   @Override
   public Response toResponse(RuntimeException runtimeException) {
     LOGGER.info("Handling runtimeException {}", runtimeException.getMessage());
+    LOGGER.debug("Full runtimeException", runtimeException);

Review Comment:
   Would you mind doing this for 500 errors as `.info`?



##########
service/common/src/test/java/org/apache/polaris/service/exception/IcebergExceptionMapperTest.java:
##########
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.polaris.service.quarkus;
+package org.apache.polaris.service.exception;

Review Comment:
   nit: ideally simple renames/moves should be done in isolated PRs... it does not look like this change is related to the logging changes in other classes :) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org