Skip to content

Commit e685ad9

Browse files
authored
Merge branch 'main' into fix-strands-errors
2 parents 2108116 + b2c7cf2 commit e685ad9

12 files changed

+1
-49
lines changed

newrelic/hooks/external_botocore.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ def create_chat_completion_message_event(
270270

271271
if settings.ai_monitoring.record_content.enabled:
272272
chat_completion_message_dict["content"] = content
273-
if request_timestamp:
274-
chat_completion_message_dict["timestamp"] = request_timestamp
275273

276274
chat_completion_message_dict.update(llm_metadata_dict)
277275

newrelic/hooks/mlmodel_gemini.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,6 @@ def create_chat_completion_message_event(
564564

565565
if settings.ai_monitoring.record_content.enabled:
566566
chat_completion_output_message_dict["content"] = message_content
567-
if request_timestamp:
568-
chat_completion_output_message_dict["timestamp"] = request_timestamp
569567

570568
chat_completion_output_message_dict.update(llm_metadata)
571569

newrelic/hooks/mlmodel_langchain.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,7 @@ def create_chat_completion_message_event(
817817
}
818818
if settings.ai_monitoring.record_content.enabled:
819819
chat_completion_output_message_dict["content"] = message
820-
if request_timestamp:
821-
chat_completion_output_message_dict["timestamp"] = request_timestamp
820+
822821
chat_completion_output_message_dict.update(llm_metadata_dict)
823822
transaction.record_custom_event("LlmChatCompletionMessage", chat_completion_output_message_dict)
824823

newrelic/hooks/mlmodel_openai.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ def create_chat_completion_message_event(
216216

217217
if settings.ai_monitoring.record_content.enabled:
218218
chat_completion_output_message_dict["content"] = message_content
219-
if request_timestamp:
220-
chat_completion_output_message_dict["timestamp"] = request_timestamp
221219

222220
chat_completion_output_message_dict.update(llm_metadata)
223221

tests/external_botocore/_test_bedrock_chat_completion_converse.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
{"type": "LlmChatCompletionMessage"},
8080
{
8181
"id": None, # UUID that varies with each run
82-
"timestamp": None,
8382
"llm.conversation_id": "my-awesome-id",
8483
"llm.foo": "bar",
8584
"request_id": "c20d345e-6878-4778-b674-6b187bae8ecf",
@@ -161,7 +160,6 @@
161160
{"type": "LlmChatCompletionMessage"},
162161
{
163162
"id": None, # UUID that varies with each run
164-
"timestamp": None,
165163
"llm.conversation_id": "my-awesome-id",
166164
"llm.foo": "bar",
167165
"request_id": "f070b880-e0fb-4537-8093-796671c39239",

tests/external_botocore/_test_bedrock_chat_completion_invoke_model.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
{"type": "LlmChatCompletionMessage"},
7272
{
7373
"id": None, # UUID that varies with each run
74-
"timestamp": None,
7574
"llm.conversation_id": "my-awesome-id",
7675
"llm.foo": "bar",
7776
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -133,7 +132,6 @@
133132
{"type": "LlmChatCompletionMessage"},
134133
{
135134
"id": None, # UUID that varies with each run
136-
"timestamp": None,
137135
"llm.conversation_id": "my-awesome-id",
138136
"llm.foo": "bar",
139137
"request_id": "81508a1c-33a8-4294-8743-f0c629af2f49",
@@ -196,7 +194,6 @@
196194
{"type": "LlmChatCompletionMessage"},
197195
{
198196
"id": "1234-1",
199-
"timestamp": None,
200197
"llm.conversation_id": "my-awesome-id",
201198
"llm.foo": "bar",
202199
"request_id": "228ee63f-4eca-4b7d-b679-bc920de63525",
@@ -258,7 +255,6 @@
258255
{"type": "LlmChatCompletionMessage"},
259256
{
260257
"id": None, # UUID that varies with each run
261-
"timestamp": None,
262258
"llm.conversation_id": "my-awesome-id",
263259
"llm.foo": "bar",
264260
"request_id": "6a886158-b39f-46ce-b214-97458ab76f2f",
@@ -320,7 +316,6 @@
320316
{"type": "LlmChatCompletionMessage"},
321317
{
322318
"id": None, # UUID that varies with each run
323-
"timestamp": None,
324319
"llm.conversation_id": "my-awesome-id",
325320
"llm.foo": "bar",
326321
"request_id": "ab38295d-df9c-4141-8173-38221651bf46",
@@ -383,7 +378,6 @@
383378
{"type": "LlmChatCompletionMessage"},
384379
{
385380
"id": None, # UUID that varies with each run
386-
"timestamp": None,
387381
"llm.conversation_id": "my-awesome-id",
388382
"llm.foo": "bar",
389383
"request_id": "12912a17-aa13-45f3-914c-cc82166f3601",
@@ -445,7 +439,6 @@
445439
{"type": "LlmChatCompletionMessage"},
446440
{
447441
"id": None, # UUID that varies with each run
448-
"timestamp": None,
449442
"llm.conversation_id": "my-awesome-id",
450443
"llm.foo": "bar",
451444
"request_id": "a168214d-742d-4244-bd7f-62214ffa07df",
@@ -509,7 +502,6 @@
509502
{"type": "LlmChatCompletionMessage"},
510503
{
511504
"id": None, # UUID that varies with each run
512-
"timestamp": None,
513505
"llm.conversation_id": "my-awesome-id",
514506
"llm.foo": "bar",
515507
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -569,7 +561,6 @@
569561
{"type": "LlmChatCompletionMessage"},
570562
{
571563
"id": None, # UUID that varies with each run
572-
"timestamp": None,
573564
"llm.conversation_id": "my-awesome-id",
574565
"llm.foo": "bar",
575566
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
@@ -628,7 +619,6 @@
628619
{"type": "LlmChatCompletionMessage"},
629620
{
630621
"id": None, # UUID that varies with each run
631-
"timestamp": None,
632622
"llm.conversation_id": "my-awesome-id",
633623
"llm.foo": "bar",
634624
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
@@ -668,7 +658,6 @@
668658
{"type": "LlmChatCompletionMessage"},
669659
{
670660
"id": None, # UUID that varies with each run
671-
"timestamp": None,
672661
"llm.conversation_id": "my-awesome-id",
673662
"llm.foo": "bar",
674663
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
@@ -687,7 +676,6 @@
687676
{"type": "LlmChatCompletionMessage"},
688677
{
689678
"id": None, # UUID that varies with each run
690-
"timestamp": None,
691679
"llm.conversation_id": "my-awesome-id",
692680
"llm.foo": "bar",
693681
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
@@ -747,7 +735,6 @@
747735
{"type": "LlmChatCompletionMessage"},
748736
{
749737
"id": None, # UUID that varies with each run
750-
"timestamp": None,
751738
"llm.conversation_id": "my-awesome-id",
752739
"llm.foo": "bar",
753740
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
@@ -811,7 +798,6 @@
811798
{"type": "LlmChatCompletionMessage"},
812799
{
813800
"id": None, # UUID that varies with each run
814-
"timestamp": None,
815801
"llm.conversation_id": "my-awesome-id",
816802
"llm.foo": "bar",
817803
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -871,7 +857,6 @@
871857
{"type": "LlmChatCompletionMessage"},
872858
{
873859
"id": None, # UUID that varies with each run
874-
"timestamp": None,
875860
"llm.conversation_id": "my-awesome-id",
876861
"llm.foo": "bar",
877862
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
@@ -931,7 +916,6 @@
931916
{"type": "LlmChatCompletionMessage"},
932917
{
933918
"id": None, # UUID that varies with each run
934-
"timestamp": None,
935919
"llm.conversation_id": "my-awesome-id",
936920
"llm.foo": "bar",
937921
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
@@ -991,7 +975,6 @@
991975
{"type": "LlmChatCompletionMessage"},
992976
{
993977
"id": None, # UUID that varies with each run
994-
"timestamp": None,
995978
"llm.conversation_id": "my-awesome-id",
996979
"llm.foo": "bar",
997980
"request_id": "96c7306d-2d60-4629-83e9-dbd6befb0e4e",
@@ -1051,7 +1034,6 @@
10511034
{"type": "LlmChatCompletionMessage"},
10521035
{
10531036
"id": None, # UUID that varies with each run
1054-
"timestamp": None,
10551037
"llm.conversation_id": "my-awesome-id",
10561038
"llm.foo": "bar",
10571039
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
@@ -1116,7 +1098,6 @@
11161098
{"type": "LlmChatCompletionMessage"},
11171099
{
11181100
"id": None, # UUID that varies with each run
1119-
"timestamp": None,
11201101
"llm.conversation_id": "my-awesome-id",
11211102
"llm.foo": "bar",
11221103
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -1178,7 +1159,6 @@
11781159
{"type": "LlmChatCompletionMessage"},
11791160
{
11801161
"id": None, # UUID that varies with each run
1181-
"timestamp": None,
11821162
"request_id": "b427270f-371a-458d-81b6-a05aafb2704c",
11831163
"span_id": None,
11841164
"trace_id": "trace-id",
@@ -1240,7 +1220,6 @@
12401220
{"type": "LlmChatCompletionMessage"},
12411221
{
12421222
"id": None, # UUID that varies with each run
1243-
"timestamp": None,
12441223
"request_id": "a645548f-0b3a-47ce-a675-f51e6e9037de",
12451224
"span_id": None,
12461225
"trace_id": "trace-id",
@@ -1301,7 +1280,6 @@
13011280
{"type": "LlmChatCompletionMessage"},
13021281
{
13031282
"id": None, # UUID that varies with each run
1304-
"timestamp": None,
13051283
"llm.conversation_id": "my-awesome-id",
13061284
"llm.foo": "bar",
13071285
"request_id": "1efe6197-80f9-43a6-89a5-bb536c1b822f",
@@ -1364,7 +1342,6 @@
13641342
{"type": "LlmChatCompletionMessage"},
13651343
{
13661344
"id": None, # UUID that varies with each run
1367-
"timestamp": None,
13681345
"request_id": "4f8ab6c5-42d1-4e35-9573-30f9f41f821e",
13691346
"span_id": None,
13701347
"trace_id": "trace-id",
@@ -1426,7 +1403,6 @@
14261403
{"type": "LlmChatCompletionMessage"},
14271404
{
14281405
"id": None, # UUID that varies with each run
1429-
"timestamp": None,
14301406
"request_id": "6dd99878-0919-4f92-850c-48f50f923b76",
14311407
"span_id": None,
14321408
"trace_id": "trace-id",

tests/mlmodel_gemini/test_text_generation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
{"type": "LlmChatCompletionMessage"},
7676
{
7777
"id": None,
78-
"timestamp": None,
7978
"llm.conversation_id": "my-awesome-id",
8079
"llm.foo": "bar",
8180
"span_id": None,

tests/mlmodel_langchain/test_chain.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
{"type": "LlmChatCompletionMessage"},
185185
{
186186
"id": None,
187-
"timestamp": None,
188187
"llm.conversation_id": "my-awesome-id",
189188
"llm.foo": "bar",
190189
"request_id": None,
@@ -244,7 +243,6 @@
244243
{"type": "LlmChatCompletionMessage"},
245244
{
246245
"id": None,
247-
"timestamp": None,
248246
"llm.conversation_id": "my-awesome-id",
249247
"llm.foo": "bar",
250248
"request_id": None,
@@ -302,7 +300,6 @@
302300
{"type": "LlmChatCompletionMessage"},
303301
{
304302
"id": None,
305-
"timestamp": None,
306303
"llm.conversation_id": "my-awesome-id",
307304
"llm.foo": "bar",
308305
"request_id": None,
@@ -360,7 +357,6 @@
360357
{"type": "LlmChatCompletionMessage"},
361358
{
362359
"id": None,
363-
"timestamp": None,
364360
"llm.conversation_id": "my-awesome-id",
365361
"llm.foo": "bar",
366362
"request_id": None,
@@ -456,7 +452,6 @@
456452
{"type": "LlmChatCompletionMessage"},
457453
{
458454
"id": None,
459-
"timestamp": None,
460455
"request_id": None,
461456
"span_id": None,
462457
"trace_id": "trace-id",
@@ -534,7 +529,6 @@
534529
{"type": "LlmChatCompletionMessage"},
535530
{
536531
"id": None,
537-
"timestamp": None,
538532
"request_id": None,
539533
"span_id": None,
540534
"trace_id": "trace-id",
@@ -569,7 +563,6 @@
569563
{"type": "LlmChatCompletionMessage"},
570564
{
571565
"id": None,
572-
"timestamp": None,
573566
"request_id": None,
574567
"span_id": None,
575568
"trace_id": "trace-id",
@@ -587,7 +580,6 @@
587580
{"type": "LlmChatCompletionMessage"},
588581
{
589582
"id": None,
590-
"timestamp": None,
591583
"request_id": None,
592584
"span_id": None,
593585
"trace_id": "trace-id",
@@ -645,7 +637,6 @@
645637
{"type": "LlmChatCompletionMessage"},
646638
{
647639
"id": None,
648-
"timestamp": None,
649640
"llm.conversation_id": "my-awesome-id",
650641
"llm.foo": "bar",
651642
"request_id": None,
@@ -704,7 +695,6 @@
704695
{"type": "LlmChatCompletionMessage"},
705696
{
706697
"id": None,
707-
"timestamp": None,
708698
"llm.conversation_id": "my-awesome-id",
709699
"llm.foo": "bar",
710700
"request_id": None,

tests/mlmodel_openai/test_chat_completion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
{"type": "LlmChatCompletionMessage"},
112112
{
113113
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
114-
"timestamp": None,
115114
"llm.conversation_id": "my-awesome-id",
116115
"llm.foo": "bar",
117116
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",

tests/mlmodel_openai/test_chat_completion_stream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
{"type": "LlmChatCompletionMessage"},
113113
{
114114
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
115-
"timestamp": None,
116115
"llm.conversation_id": "my-awesome-id",
117116
"llm.foo": "bar",
118117
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",

0 commit comments

Comments
 (0)