Skip to content

SqlResource: Metrics, request logs, cancellation #4047

@gianm

Description

@gianm

SqlResource should be up to the standards of QueryResource:

  • Emit metrics for SQL queries. This could be query/sql/time to differentiate it from query/time.
  • Emit metrics like query/time for the Druid native queries that underlie a SQL query. There might be more than one of these per SQL query. Fixed in Add metrics to the native queries underpinning SQL. #4561
  • Emit request logs for the Druid native queries that underlie a SQL query. Fixed in Add metrics to the native queries underpinning SQL. #4561
  • Emit friendly errors for QueryInterruptedException and any other cases that QueryResource emits friendly errors. This can be tested by setting a really low timeout and confirming you get a friendly JSON error rather than unfriendly HTML. Fixed in SQL: Better error handling for HTTP API. #4053
  • Implement query cancellation, maybe by giving an "umbrella query ID" to all Druid native queries that underlie a SQL query, and returning that in the header of SqlResource's response, or maybe by assigning the same Druid query ID to all native queries (I think this would technically work although it would be a little strange).
  • Return query IDs on SQL queries so users can correlate it to metrics stores.

I think a lot of this could be accomplished by sharing code between QueryResource and SqlResource. Some of it (like a query/sql/time metric) would be unique to SqlResource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions