You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/13 14:07:56 UTC

[GitHub] [incubator-druid] sbespalov commented on issue #6017: Logging of invalid queries

sbespalov commented on issue #6017: Logging of invalid queries
URL: https://github.com/apache/incubator-druid/issues/6017#issuecomment-553419131
 
 
   @erankor could please clarify the relevance and requirements for this task?
   Currently with `druid.request.logging.type=file` invalid queries seems logged.
   Request:
   ```
   curl -i -X POST \
      -H "Content-Type:application/json" \
      -d \
   '{"query":"invalid query","resultFormat":"array","header":true}' \
    'http://localhost:8888/druid/v2/sql'
   ```
   Log:
   ```
   2019-11-13T13:55:15.166Z        127.0.0.1               {"sqlQuery/time":1611,"sqlQuery/bytes":-1,"success":false,"context":{"sqlQueryId":"72bcc547-9fd4-4704-b61f-bb9673e39645","nativeQueryIds":"[]"},"identity":"allowAll","exception":"org.apache.calcite.sql.parser.SqlParseException: Non-query expression encountered in illegal context"} {"query":"invalid query","context":{"sqlQueryId":"72bcc547-9fd4-4704-b61f-bb9673e39645","nativeQueryIds":"[]"}}
   ```
   
   Or maybe you mean invalid request body? 
   Request:
   ```
   curl -i -X POST \
      -H "Content-Type:application/json" \
      -d \
   'invalid body' \
    'http://localhost:8888/druid/v2/sql'
   ```
   In this case there is only exception in broker logs and no logged query.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org