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
6 changes: 5 additions & 1 deletion CHANGLOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [0.1.20] - 2025-11-10
## [0.1.21] - 2025-12-23
### Added
- runtime scene support get from env

## [0.1.20] - 2025-12-08
### Added
- langchain callback support langchain V1
- langchain callback support set tag and name
Expand Down
2 changes: 1 addition & 1 deletion cozeloop/integration/langchain/trace_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def _new_flow_span(self, node_name: str, span_type: str, **kwargs: Any) -> Span:
flow_span = _trace_callback_client.start_span(span_name, span_type, child_of=parent_span)
run_id = str(kwargs['run_id'])
self.run_map[run_id] = Run(run_id, flow_span, span_type)
# set default tags
# set runtime
flow_span.set_runtime(RuntimeInfo())
# set extra tags
flow_span.set_tags(self._tags) # global tags
Expand Down
4 changes: 4 additions & 0 deletions cozeloop/internal/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: MIT

import logging
import os
from abc import ABC
from typing import Dict, Any, List, Optional
from datetime import datetime
Expand Down Expand Up @@ -369,6 +370,9 @@ def set_start_time_first_resp(self, start_time_first_resp: int):
def set_runtime(self, runtime: Runtime) -> None:
r = runtime
r.scene = V_SCENE_CUSTOM
scene = os.getenv('COZELOOP_SCENE') # record scene from env
if scene:
r.scene = scene
with self.lock:
if self.system_tag_map is None:
self.system_tag_map = {}
Expand Down
2 changes: 1 addition & 1 deletion cozeloop/internal/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT

VERSION = 'v0.1.20'
VERSION = 'v0.1.21'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cozeloop"
version = "0.1.20"
version = "0.1.21"
description = "coze loop sdk"
authors = ["JiangQi715 <[email protected]>"]
license = "MIT"
Expand Down