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
2 changes: 0 additions & 2 deletions newrelic/hooks/external_botocore.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ def create_chat_completion_message_event(

if settings.ai_monitoring.record_content.enabled:
chat_completion_message_dict["content"] = content
if request_timestamp:
chat_completion_message_dict["timestamp"] = request_timestamp

chat_completion_message_dict.update(llm_metadata_dict)

Expand Down
2 changes: 0 additions & 2 deletions newrelic/hooks/mlmodel_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,6 @@ def create_chat_completion_message_event(

if settings.ai_monitoring.record_content.enabled:
chat_completion_output_message_dict["content"] = message_content
if request_timestamp:
chat_completion_output_message_dict["timestamp"] = request_timestamp

chat_completion_output_message_dict.update(llm_metadata)

Expand Down
3 changes: 1 addition & 2 deletions newrelic/hooks/mlmodel_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,7 @@ def create_chat_completion_message_event(
}
if settings.ai_monitoring.record_content.enabled:
chat_completion_output_message_dict["content"] = message
if request_timestamp:
chat_completion_output_message_dict["timestamp"] = request_timestamp

chat_completion_output_message_dict.update(llm_metadata_dict)
transaction.record_custom_event("LlmChatCompletionMessage", chat_completion_output_message_dict)

Expand Down
2 changes: 0 additions & 2 deletions newrelic/hooks/mlmodel_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def create_chat_completion_message_event(

if settings.ai_monitoring.record_content.enabled:
chat_completion_output_message_dict["content"] = message_content
if request_timestamp:
chat_completion_output_message_dict["timestamp"] = request_timestamp

chat_completion_output_message_dict.update(llm_metadata)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "c20d345e-6878-4778-b674-6b187bae8ecf",
Expand Down Expand Up @@ -161,7 +160,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "f070b880-e0fb-4537-8093-796671c39239",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
Expand Down Expand Up @@ -133,7 +132,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "81508a1c-33a8-4294-8743-f0c629af2f49",
Expand Down Expand Up @@ -196,7 +194,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": "1234-1",
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "228ee63f-4eca-4b7d-b679-bc920de63525",
Expand Down Expand Up @@ -258,7 +255,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "6a886158-b39f-46ce-b214-97458ab76f2f",
Expand Down Expand Up @@ -320,7 +316,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "ab38295d-df9c-4141-8173-38221651bf46",
Expand Down Expand Up @@ -383,7 +378,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "12912a17-aa13-45f3-914c-cc82166f3601",
Expand Down Expand Up @@ -445,7 +439,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "a168214d-742d-4244-bd7f-62214ffa07df",
Expand Down Expand Up @@ -509,7 +502,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
Expand Down Expand Up @@ -569,7 +561,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
Expand Down Expand Up @@ -628,7 +619,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
Expand Down Expand Up @@ -668,7 +658,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
Expand All @@ -687,7 +676,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
Expand Down Expand Up @@ -747,7 +735,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
Expand Down Expand Up @@ -811,7 +798,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
Expand Down Expand Up @@ -871,7 +857,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
Expand Down Expand Up @@ -931,7 +916,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
Expand Down Expand Up @@ -991,7 +975,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "96c7306d-2d60-4629-83e9-dbd6befb0e4e",
Expand Down Expand Up @@ -1051,7 +1034,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
Expand Down Expand Up @@ -1116,7 +1098,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
Expand Down Expand Up @@ -1178,7 +1159,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"request_id": "b427270f-371a-458d-81b6-a05aafb2704c",
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -1240,7 +1220,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"request_id": "a645548f-0b3a-47ce-a675-f51e6e9037de",
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -1301,7 +1280,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "1efe6197-80f9-43a6-89a5-bb536c1b822f",
Expand Down Expand Up @@ -1364,7 +1342,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"request_id": "4f8ab6c5-42d1-4e35-9573-30f9f41f821e",
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -1426,7 +1403,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None, # UUID that varies with each run
"timestamp": None,
"request_id": "6dd99878-0919-4f92-850c-48f50f923b76",
"span_id": None,
"trace_id": "trace-id",
Expand Down
1 change: 0 additions & 1 deletion tests/mlmodel_gemini/test_text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"span_id": None,
Expand Down
10 changes: 0 additions & 10 deletions tests/mlmodel_langchain/test_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down Expand Up @@ -244,7 +243,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down Expand Up @@ -302,7 +300,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down Expand Up @@ -360,7 +357,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down Expand Up @@ -456,7 +452,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"request_id": None,
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -534,7 +529,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"request_id": None,
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -569,7 +563,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"request_id": None,
"span_id": None,
"trace_id": "trace-id",
Expand All @@ -587,7 +580,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"request_id": None,
"span_id": None,
"trace_id": "trace-id",
Expand Down Expand Up @@ -645,7 +637,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down Expand Up @@ -704,7 +695,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": None,
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": None,
Expand Down
1 change: 0 additions & 1 deletion tests/mlmodel_openai/test_chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",
Expand Down
1 change: 0 additions & 1 deletion tests/mlmodel_openai/test_chat_completion_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",
Expand Down
1 change: 0 additions & 1 deletion tests/mlmodel_openai/test_chat_completion_stream_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": "chatcmpl-CocmvmDih6DGKIgPUbrzKFxGnMyco-2",
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "req_f821c73df45f4e30821a81a2d751fe64",
Expand Down
1 change: 0 additions & 1 deletion tests/mlmodel_openai/test_chat_completion_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
{"type": "LlmChatCompletionMessage"},
{
"id": "chatcmpl-CoLlpfFdbk9D0AbjizzpQ8hMwX9AY-2",
"timestamp": None,
"llm.conversation_id": "my-awesome-id",
"llm.foo": "bar",
"request_id": "req_983c5abb07aa4f51b858f855fc614d08",
Expand Down
Loading