chore: track letta version in tracing and nightly versions (#2491)
This commit is contained in:
5
.github/workflows/docker-image-nightly.yml
vendored
5
.github/workflows/docker-image-nightly.yml
vendored
@@ -23,5 +23,8 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build and push the Docker image (letta)
|
||||
run: |
|
||||
docker build . --file Dockerfile --tag letta/letta:nightly
|
||||
docker build . \
|
||||
--file Dockerfile \
|
||||
--tag letta/letta:nightly \
|
||||
--build-arg LETTA_VERSION="nightly-$(date +%Y%m%d)-$(git rev-parse --short HEAD)"
|
||||
docker push letta/letta:nightly
|
||||
|
||||
@@ -70,6 +70,9 @@ ENV LETTA_ENVIRONMENT=${LETTA_ENVIRONMENT} \
|
||||
POSTGRES_DB=letta \
|
||||
COMPOSIO_DISABLE_VERSION_CHECK=true
|
||||
|
||||
# Set for other builds
|
||||
ARG LETTA_VERSION
|
||||
ENV LETTA_VERSION=${LETTA_VERSION}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import os
|
||||
|
||||
__version__ = "0.7.14"
|
||||
|
||||
if os.environ.get("LETTA_VERSION"):
|
||||
__version__ = os.environ["LETTA_VERSION"]
|
||||
|
||||
|
||||
# import clients
|
||||
from letta.client.client import RESTClient
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ from opentelemetry.sdk.trace import TracerProvider
|
||||
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
||||
from opentelemetry.trace import Status, StatusCode
|
||||
|
||||
from letta import __version__ as letta_version
|
||||
|
||||
tracer = trace.get_tracer(__name__)
|
||||
_is_tracing_initialized = False
|
||||
_excluded_v1_endpoints_regex: List[str] = [
|
||||
@@ -24,6 +26,7 @@ _excluded_v1_endpoints_regex: List[str] = [
|
||||
# "^GET /v1/agents/(?P<agent_id>[^/]+)/archival-memory$",
|
||||
# "^GET /v1/agents/(?P<agent_id>[^/]+)/sources$",
|
||||
# r"^POST /v1/voice-beta/.*/chat/completions$",
|
||||
"^GET /v1/health$",
|
||||
]
|
||||
|
||||
|
||||
@@ -149,7 +152,8 @@ def setup_tracing(
|
||||
resource=Resource.create(
|
||||
{
|
||||
"service.name": service_name,
|
||||
"device.id": uuid.getnode(), # MAC address as unique device identifier
|
||||
"device.id": uuid.getnode(), # MAC address as unique device identifier,
|
||||
"letta.version": letta_version,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user