1 | {"version":3,"sources":["../../../../telemetry/trace/report/index.ts"],"names":["target","process","env","TRACE_TARGET","TARGET","TELEMETRY","console","info","report","CONSOLE","reportToConsole","ZIPKIN","reportToZipkin","reportToTelemetry"],"mappings":"2DAAA,iCACA,+DACA,6DACA,mE,mFAWA,KAAMA,CAAAA,MAAM,CACVC,OAAO,CAACC,GAAR,CAAYC,YAAZ,EAA4BF,OAAO,CAACC,GAAR,CAAYC,YAAZ,GAA4BC,eAAxD,CACIA,eAAOH,OAAO,CAACC,GAAR,CAAYC,YAAnB,CADJ,CAEIC,eAAOC,SAHb,CAKA,GAAIJ,OAAO,CAACC,GAAR,CAAYC,YAAZ,EAA4B,CAACH,MAAjC,CAAyC,CACvCM,OAAO,CAACC,IAAR,CACE,qEADF,EAGD,CAEM,GAAIC,CAAAA,MAAJ,C,sBACP,GAAIR,MAAM,GAAKI,eAAOK,OAAtB,CAA+B,CAC7B,eAAAD,MAAM,CAAGE,kBAAT,CACD,CAFD,IAEO,IAAIV,MAAM,GAAKI,eAAOO,MAAtB,CAA8B,CACnC,eAAAH,MAAM,CAAGI,iBAAT,CACD,CAFM,IAEA,CACL,eAAAJ,MAAM,CAAGK,oBAAT,CACD","sourcesContent":["import { TARGET, SpanId } from '../shared'\nimport reportToConsole from './to-console'\nimport reportToZipkin from './to-zipkin'\nimport reportToTelemetry from './to-telemetry'\n\ntype Reporter = (\n spanName: string,\n duration: number,\n timestamp: number,\n id: SpanId,\n parentId?: SpanId,\n attrs?: Object\n) => void\n\nconst target =\n process.env.TRACE_TARGET && process.env.TRACE_TARGET in TARGET\n ? TARGET[process.env.TRACE_TARGET as TARGET]\n : TARGET.TELEMETRY\n\nif (process.env.TRACE_TARGET && !target) {\n console.info(\n 'For TRACE_TARGET, please specify one of: CONSOLE, ZIPKIN, TELEMETRY'\n )\n}\n\nexport let report: Reporter\nif (target === TARGET.CONSOLE) {\n report = reportToConsole\n} else if (target === TARGET.ZIPKIN) {\n report = reportToZipkin\n} else {\n report = reportToTelemetry\n}\n"]} |