Interface GenericQueryMetricsFactory

  • All Known Implementing Classes:
    DefaultGenericQueryMetricsFactory

    public interface GenericQueryMetricsFactory
    This factory is used for DI of custom QueryMetrics implementations for all query types, which don't (yet) need to emit custom dimensions and/or metrics, i. e. they are good with the generic QueryMetrics interface. Implementations could be injected using PolyBind .optionBinder(binder, Key.get(GenericQueryMetricsFactory.class)) .addBinding("myCustomGenericQueryMetricsFactory") .to(MyCustomGenericQueryMetricsFactory.class); And then setting property: druid.query.generic.queryMetricsFactory=myCustomGenericQueryMetricsFactory Unlike QueryMetrics itself, this interface is considered stable and is expected to be injected into custom Query extensions that do not want to worry about the potential instability of QueryMetrics.
    • Method Detail

      • makeMetrics

        QueryMetrics<Query<?>> makeMetrics()
        Creates a QueryMetrics which doesn't have predefined QueryMetrics subclass. This method is used by the router to build a QueryMetrics for SQL queries. It is needed since at router, there is no native query linked to a SQL query.