Skip to content

Commit 9cb27ce

Browse files
committed
test
1 parent 93d1691 commit 9cb27ce

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

tests/otel_integrations/test_langchain.py

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,29 @@ def add(a: float, b: float) -> float:
7373
assert actual_event == IsPartialDict(expected_event)
7474

7575
assert [
76-
(span['name'], len(span['attributes'].get('all_messages_events', [])))
76+
(
77+
span['name'],
78+
len(span['attributes'].get('all_messages_events', [])),
79+
'gen_ai.usage.input_tokens' in span['attributes'],
80+
)
7781
for span in sorted(spans, key=lambda s: s['start_time'])
7882
] == snapshot(
7983
[
80-
('LangGraph', 4),
81-
('agent', 2),
82-
('call_model', 2),
83-
('RunnableSequence', 2),
84-
('Prompt', 1),
85-
('ChatOpenAI', 2),
86-
('should_continue', 2),
87-
('tools', 0),
88-
('add', 0),
89-
('agent', 4),
90-
('call_model', 4),
91-
('RunnableSequence', 4),
92-
('Prompt', 3),
93-
('ChatOpenAI', 4),
94-
('should_continue', 4),
84+
('LangGraph', 4, False),
85+
('agent', 2, False),
86+
('call_model', 2, False),
87+
('RunnableSequence', 2, False),
88+
('Prompt', 1, False),
89+
('ChatOpenAI', 2, True),
90+
('should_continue', 2, False),
91+
('tools', 0, False),
92+
('add', 0, False),
93+
('agent', 4, False),
94+
('call_model', 4, False),
95+
('RunnableSequence', 4, False),
96+
('Prompt', 3, False),
97+
('ChatOpenAI', 4, True),
98+
('should_continue', 4, False),
9599
]
96100
)
97101

0 commit comments

Comments
 (0)