Skip to content

Commit 3a72e82

Browse files
committed
Fix remaining benchmarks
1 parent 5a701ea commit 3a72e82

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

tests/agent_benchmarks/bench_agent_apis.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
global_settings,
4646
ignore_transaction,
4747
in_function,
48-
initialize,
4948
insert_html_snippet,
5049
message_trace,
5150
message_transaction,
@@ -57,6 +56,8 @@
5756
record_custom_event,
5857
record_custom_metric,
5958
record_custom_metrics,
59+
record_log_event,
60+
record_ml_event,
6061
set_background_task,
6162
set_error_group_callback,
6263
set_llm_token_count_callback,
@@ -69,6 +70,7 @@
6970
web_transaction,
7071
wsgi_application,
7172
)
73+
from newrelic.api.ml_model import record_llm_feedback_event
7274
from newrelic.api.transaction import record_dimensional_metric, record_dimensional_metrics
7375

7476
from . import benchmark
@@ -261,21 +263,23 @@ def bench_notice_error(self):
261263
def bench_record_custom_event(self):
262264
record_custom_event("TestEvent", {"attribute1": "value1", "attribute2": 2})
263265

264-
@background_task()
265-
def bench_record_exception(self):
266-
pass
267-
268266
@background_task()
269267
def bench_record_llm_feedback_event(self):
270-
pass
268+
record_llm_feedback_event(
269+
rating="Good",
270+
trace_id="123456789abcdefgh",
271+
category="informative",
272+
message="message",
273+
metadata={"foo": "bar"},
274+
)
271275

272276
@background_task()
273277
def bench_record_log_event(self):
274-
pass
278+
record_log_event("log message", "info", timestamp=1760046878, attributes={"key": "value"})
275279

276280
@background_task()
277281
def bench_record_ml_event(self):
278-
pass
282+
record_ml_event("ParamsListEvent", ["not", "a", "dict"])
279283

280284

281285
@benchmark

0 commit comments

Comments
 (0)