This repository was archived by the owner on Mar 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/sfpowerscripts-cli/src/commands/metrics Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
"packages" : [
3
3
" packages/*"
4
4
],
5
+ "useWorkspaces" : true ,
5
6
"version" : " independent" ,
6
7
"command" : {
7
8
"publish" : {
Original file line number Diff line number Diff line change @@ -72,15 +72,15 @@ export default class Report extends SfpowerscriptsCommand {
72
72
switch ( this . flags . type ) {
73
73
case 'gauge' :
74
74
SFPLogger . log ( COLOR_KEY_MESSAGE ( `Publishing Gauge Metric ${ this . flags . metric } with value ${ this . flags . value } ` ) ) ;
75
- SFPStatsSender . logGauge ( this . flags . metric , this . flags . value , JSON . parse ( this . flags . tags ) ) ;
75
+ SFPStatsSender . logGauge ( this . flags . metric , this . flags . value , this . flags . tags ? JSON . parse ( this . flags . tags ) : undefined ) ;
76
76
break ;
77
77
case 'counter' :
78
78
SFPLogger . log ( COLOR_KEY_MESSAGE ( `Publishing Count Metric ${ this . flags . metric } with value ${ this . flags . value } ` ) ) ;
79
- SFPStatsSender . logCount ( this . flags . metric , JSON . parse ( this . flags . tags ) ) ;
79
+ SFPStatsSender . logCount ( this . flags . metric , this . flags . tags ? JSON . parse ( this . flags . tags ) : undefined ) ;
80
80
break ;
81
81
case 'timer' :
82
82
SFPLogger . log ( COLOR_KEY_MESSAGE ( `Publishing Elapsed Metric ${ this . flags . metric } with value ${ this . flags . value } ` ) ) ;
83
- SFPStatsSender . logElapsedTime ( this . flags . metric , Number . parseInt ( this . flags . value ) , JSON . parse ( this . flags . tags ) ) ;
83
+ SFPStatsSender . logElapsedTime ( this . flags . metric , Number . parseInt ( this . flags . value ) , this . flags . tags ? JSON . parse ( this . flags . tags ) : undefined ) ;
84
84
break ;
85
85
default :
86
86
throw new Error ( 'Invalid Metric Type' ) ;
You can’t perform that action at this time.
0 commit comments