Skip to content

Commit 93e2bbe

Browse files
committed
update
1 parent 01fe6ae commit 93e2bbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cozeloop/integration/langchain/trace_callback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def on_agent_finish(self, finish: AgentFinish, **kwargs: Any) -> Any:
200200
return
201201

202202
def _end_flow_span(self, span: Span):
203-
span.set_tags(self._tags)
204203
span.finish()
205204

206205
def _get_model_tags(self, response: LLMResult, **kwargs: Any) -> Dict[str, Any]:
@@ -328,8 +327,9 @@ def _new_flow_span(self, node_name: str, span_type: str, **kwargs: Any) -> Span:
328327
# set default tags
329328
flow_span.set_runtime(RuntimeInfo())
330329
# set extra tags
330+
flow_span.set_tags(self._tags) # global tags
331331
try:
332-
if self.tags_fn:
332+
if self.tags_fn: # add tags fn
333333
tags = self.tags_fn(node_name)
334334
if isinstance(tags, dict):
335335
flow_span.set_tags(tags)

0 commit comments

Comments
 (0)