Skip to content

Commit dc13cfb

Browse files
authored
fix: Remove deprecated track generation event (#10)
1 parent 0b0fc15 commit dc13cfb

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

lib/server/ai/ai_config_tracker.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@ def track_feedback(kind:)
118118
#
119119
def track_success
120120
@summary.success = true
121-
@ld_client.track(
122-
'$ld:ai:generation',
123-
@context,
124-
flag_data,
125-
1
126-
)
127121
@ld_client.track(
128122
'$ld:ai:generation:success',
129123
@context,
@@ -137,12 +131,6 @@ def track_success
137131
#
138132
def track_error
139133
@summary.success = false
140-
@ld_client.track(
141-
'$ld:ai:generation',
142-
@context,
143-
flag_data,
144-
1
145-
)
146134
@ld_client.track(
147135
'$ld:ai:generation:error',
148136
@context,

spec/server/ai/config_tracker_spec.rb

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,6 @@
133133
end
134134

135135
it 'tracks duration and tokens' do
136-
expect(ld_client).to receive(:track).with(
137-
'$ld:ai:generation',
138-
context,
139-
tracker_flag_data,
140-
1
141-
)
142136
expect(ld_client).to receive(:track).with(
143137
'$ld:ai:generation:success',
144138
context,
@@ -183,12 +177,6 @@
183177
end
184178

185179
it 'tracks error for failed operation' do
186-
expect(ld_client).to receive(:track).with(
187-
'$ld:ai:generation',
188-
context,
189-
tracker_flag_data,
190-
1
191-
)
192180
expect(ld_client).to receive(:track).with(
193181
'$ld:ai:generation:error',
194182
context,
@@ -246,12 +234,6 @@
246234
tracker_flag_data,
247235
100
248236
)
249-
expect(ld_client).to receive(:track).with(
250-
'$ld:ai:generation',
251-
context,
252-
tracker_flag_data,
253-
1
254-
)
255237
expect(ld_client).to receive(:track).with(
256238
'$ld:ai:generation:success',
257239
context,
@@ -276,12 +258,6 @@
276258
tracker_flag_data,
277259
kind_of(Integer)
278260
)
279-
expect(ld_client).to receive(:track).with(
280-
'$ld:ai:generation',
281-
context,
282-
tracker_flag_data,
283-
1
284-
)
285261
expect(ld_client).to receive(:track).with(
286262
'$ld:ai:generation:error',
287263
context,
@@ -321,12 +297,6 @@
321297

322298
describe '#track_success' do
323299
it 'tracks generation and success events' do
324-
expect(ld_client).to receive(:track).with(
325-
'$ld:ai:generation',
326-
context,
327-
tracker_flag_data,
328-
1
329-
)
330300
expect(ld_client).to receive(:track).with(
331301
'$ld:ai:generation:success',
332302
context,
@@ -340,12 +310,6 @@
340310

341311
describe '#track_error' do
342312
it 'tracks generation and error events' do
343-
expect(ld_client).to receive(:track).with(
344-
'$ld:ai:generation',
345-
context,
346-
tracker_flag_data,
347-
1
348-
)
349313
expect(ld_client).to receive(:track).with(
350314
'$ld:ai:generation:error',
351315
context,
@@ -357,12 +321,6 @@
357321
end
358322

359323
it 'overwrites success with error if both are tracked' do
360-
expect(ld_client).to receive(:track).with(
361-
'$ld:ai:generation',
362-
context,
363-
tracker_flag_data,
364-
1
365-
).twice
366324
expect(ld_client).to receive(:track).with(
367325
'$ld:ai:generation:success',
368326
context,

0 commit comments

Comments
 (0)