File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ export async function main(argv: string[]): Promise<void> {
713713
714714 const durationMs = Date . now ( ) - startTime ;
715715
716- void dispatcher ?. sendNewEvent ( "wrangler command completed" , {
716+ await dispatcher ?. sendNewEvent ( "wrangler command completed" , {
717717 command,
718718 args : metricsArgs ,
719719 durationMs,
@@ -829,7 +829,7 @@ export async function main(argv: string[]): Promise<void> {
829829
830830 const durationMs = Date . now ( ) - startTime ;
831831
832- void dispatcher ?. sendNewEvent ( "wrangler command errored" , {
832+ await dispatcher ?. sendNewEvent ( "wrangler command errored" , {
833833 command,
834834 args : metricsArgs ,
835835 durationMs,
Original file line number Diff line number Diff line change @@ -146,6 +146,10 @@ export function updateMetricsPermission(enabled: boolean) {
146146 * Get the path to the metrics config file.
147147 */
148148function getMetricsConfigPath ( ) : string {
149+ console . log (
150+ "getMetricsConfigPath" ,
151+ path . resolve ( getGlobalWranglerConfigPath ( ) , "metrics.json" )
152+ ) ;
149153 return path . resolve ( getGlobalWranglerConfigPath ( ) , "metrics.json" ) ;
150154}
151155
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export function getMetricsDispatcher(options: MetricsConfigOptions) {
102102
103103 // Do not await this fetch call.
104104 // Just fire-and-forget, otherwise we might slow down the rest of Wrangler.
105- fetch ( `${ SPARROW_URL } /api/v1/event` , {
105+ await fetch ( `${ SPARROW_URL } /api/v1/event` , {
106106 method : "POST" ,
107107 headers : {
108108 Accept : "*/*" ,
You can’t perform that action at this time.
0 commit comments