Skip to content

Commit 6cf2aee

Browse files
authored
chore: add data layer telemetry (#1812)
* chore: add data layer telemetry * fix: import
1 parent c482389 commit 6cf2aee

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to Chainlit will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [2.0.603] - 2025-01-28
8+
9+
### Added
10+
11+
- Data layer initialization to the telemetry
12+
13+
### Fixed
14+
15+
- Gap between the word `Used` and tool name in step name
16+
717
## [2.0.602] - 2025-01-27
818

919
### Fixed

backend/chainlit/data/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ def get_data_layer():
2525

2626
else:
2727
from chainlit.config import config
28+
from chainlit.telemetry import trace_event
2829

2930
if config.code.data_layer:
3031
# When @data_layer is configured, call it to get data layer.
3132
_data_layer = config.code.data_layer()
3233
elif database_url := os.environ.get("DATABASE_URL"):
33-
# Default to Chainlit data layer if DATABASE_URL specified.
3434
from .chainlit_data_layer import ChainlitDataLayer
3535

36+
trace_event("Init Chainlit official data layer")
37+
3638
if os.environ.get("LITERAL_API_KEY"):
3739
warnings.warn(
3840
"Both LITERAL_API_KEY and DATABASE_URL specified. Ignoring Literal AI data layer and relying on data layer pointing to DATABASE_URL."
3941
)
42+
4043
bucket_name = os.environ.get("BUCKET_NAME")
4144

4245
# AWS S3
@@ -102,6 +105,8 @@ def get_data_layer():
102105
# When LITERAL_API_KEY is defined, use Literal AI data layer
103106
from .literalai import LiteralDataLayer
104107

108+
trace_event("Init Literal AI data layer")
109+
105110
# support legacy LITERAL_SERVER variable as fallback
106111
server = os.environ.get("LITERAL_API_URL") or os.environ.get(
107112
"LITERAL_SERVER"

backend/chainlit/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
except metadata.PackageNotFoundError:
66
# Case where package metadata is not available, default to a 'non-outdated' version.
77
# Ref: config.py::load_settings()
8-
__version__ = "2.0.602"
8+
__version__ = "2.0.603"

backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "chainlit"
3-
version = "2.0.602"
3+
version = "2.0.603"
44
keywords = [
55
'LLM',
66
'Agents',

frontend/src/components/chat/Messages/Message/Step.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function Step({
3030
<div className="flex flex-col flex-grow w-0">
3131
<p
3232
className={cn(
33-
'flex items-center group/step',
33+
'flex items-center gap-1 group/step',
3434
isError && 'text-red-500',
3535
hasContent && 'cursor-pointer',
3636
!using && 'text-muted-foreground hover:text-foreground',
@@ -50,9 +50,9 @@ export default function Step({
5050
)}
5151
{hasContent ? (
5252
open ? (
53-
<ChevronUp className="invisible group-hover/step:visible !size-4 ml-1" />
53+
<ChevronUp className="invisible group-hover/step:visible !size-4" />
5454
) : (
55-
<ChevronDown className="invisible group-hover/step:visible !size-4 ml-1" />
55+
<ChevronDown className="invisible group-hover/step:visible !size-4" />
5656
)
5757
) : null}
5858
</p>

0 commit comments

Comments
 (0)