@@ -40,15 +40,15 @@ describe("DefaultTelemetryClient", () => {
4040 metricSinks : [ fileSystemSink ] ,
4141 } ) ;
4242
43- const metricEvent = client . startMetricEvent ( "cli.command_run" , {
43+ const metricEvent = client . createMetricEvent ( "cli.command_run" , {
4444 exit_reason : "success" ,
4545 command_path : "/agentcore" ,
4646 } ) ;
4747
4848 await metricEvent . emit ( 123 ) ;
4949
5050 // Start a second event with failure
51- const metricEvent2 = client . startMetricEvent ( "cli.command_run" , {
51+ const metricEvent2 = client . createMetricEvent ( "cli.command_run" , {
5252 exit_reason : "failure" ,
5353 command_path : "/agentcore" ,
5454 } ) ;
@@ -134,14 +134,14 @@ describe("DefaultTelemetryClient", () => {
134134 auditFilePath,
135135 } ) ;
136136
137- const enabledEvent = enabledClient . startMetricEvent ( "cli.command_run" , {
137+ const enabledEvent = enabledClient . createMetricEvent ( "cli.command_run" , {
138138 exit_reason : "success" ,
139139 command_path : "/agentcore" ,
140140 is_tui : true ,
141141 } ) ;
142142 await enabledEvent . emit ( 123 ) ;
143143
144- const disabledEvent = disabledClient . startMetricEvent ( "cli.command_run" , {
144+ const disabledEvent = disabledClient . createMetricEvent ( "cli.command_run" , {
145145 exit_reason : "failure" ,
146146 command_path : "/agentcore" ,
147147 is_tui : false ,
@@ -179,7 +179,7 @@ describe("DefaultTelemetryClient", () => {
179179 metricSinks : [ ] ,
180180 } ) ;
181181
182- const metricEvent = client . startMetricEvent ( "cli.command_run" ) ;
182+ const metricEvent = client . createMetricEvent ( "cli.command_run" ) ;
183183
184184 await expect ( metricEvent . emit ( 100 ) ) . rejects . toThrow ( ) ;
185185 await client . shutdown ( ) ;
@@ -198,7 +198,7 @@ describe("DefaultTelemetryClient", () => {
198198 globalConfigAccessor : new TestGlobalConfigAccessor ( ) ,
199199 metricSinks : [ sink ] ,
200200 } ) ;
201- const metricEvent = client . startMetricEvent ( "cli.command_run" , {
201+ const metricEvent = client . createMetricEvent ( "cli.command_run" , {
202202 exit_reason : "success" ,
203203 command_path : "/agentcore" ,
204204 } ) ;
@@ -242,7 +242,7 @@ describe("DefaultTelemetryClient", () => {
242242 metricSinks : [ badSink , goodSink ] ,
243243 } ) ;
244244
245- const metricEvent = client . startMetricEvent ( "cli.command_run" , {
245+ const metricEvent = client . createMetricEvent ( "cli.command_run" , {
246246 exit_reason : "success" ,
247247 command_path : "/agentcore" ,
248248 } ) ;
0 commit comments