import { fetchProvider , Usage } from './fetch' ; import { UsageCollectionSetup } from '../../../../usage_collection/server' ; export async function makeDQLUsageCollector ( usageCollection , opensearchDashboardsIndex ) { const dqlUsageCollector = usageCollection . makeUsageCollector < Usage > ( { type : 'dql' , fetch : fetchProvider ( opensearchDashboardsIndex ) , isReady : ( ) => true , schema : { optInCount : { type : 'long' } , optOutCount : { type : 'long' } , defaultQueryLanguage : { type : 'keyword' } , } , } ) ; usageCollection . registerCollector ( dqlUsageCollector ) ; }