Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions lib/server/ai/ai_config_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ def track_feedback(kind:)
#
def track_success
@summary.success = true
@ld_client.track(
'$ld:ai:generation',
@context,
flag_data,
1
)
@ld_client.track(
'$ld:ai:generation:success',
@context,
Expand All @@ -137,12 +131,6 @@ def track_success
#
def track_error
@summary.success = false
@ld_client.track(
'$ld:ai:generation',
@context,
flag_data,
1
)
@ld_client.track(
'$ld:ai:generation:error',
@context,
Expand Down
42 changes: 0 additions & 42 deletions spec/server/ai/config_tracker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@
end

it 'tracks duration and tokens' do
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:success',
context,
Expand Down Expand Up @@ -183,12 +177,6 @@
end

it 'tracks error for failed operation' do
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:error',
context,
Expand Down Expand Up @@ -246,12 +234,6 @@
tracker_flag_data,
100
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:success',
context,
Expand All @@ -276,12 +258,6 @@
tracker_flag_data,
kind_of(Integer)
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:error',
context,
Expand Down Expand Up @@ -321,12 +297,6 @@

describe '#track_success' do
it 'tracks generation and success events' do
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:success',
context,
Expand All @@ -340,12 +310,6 @@

describe '#track_error' do
it 'tracks generation and error events' do
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
)
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:error',
context,
Expand All @@ -357,12 +321,6 @@
end

it 'overwrites success with error if both are tracked' do
expect(ld_client).to receive(:track).with(
'$ld:ai:generation',
context,
tracker_flag_data,
1
).twice
expect(ld_client).to receive(:track).with(
'$ld:ai:generation:success',
context,
Expand Down