Skip to content

Commit

Permalink
feat: enable open telemetry tracing. (#49)
Browse files Browse the repository at this point in the history
* Enable open telemetry tracing.
  • Loading branch information
Oleksii-Klimov authored Jan 8, 2024
1 parent 810afc2 commit 2b0a14f
Show file tree
Hide file tree
Showing 4 changed files with 562 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG POETRY_VERSION=1.6.1
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3

# Install alpine-sdk to compile some langchain dependencies (numexpr, numpy)
RUN apk add --no-cache alpine-sdk
RUN apk add --no-cache alpine-sdk linux-headers

RUN pip install --upgrade pip
RUN pip install poetry==$POETRY_VERSION
Expand Down
6 changes: 5 additions & 1 deletion aidial_assistant/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

from aidial_sdk import DIALApp
from aidial_sdk.telemetry.types import TelemetryConfig, TracingConfig
from starlette.responses import Response

from aidial_assistant.application.assistant_application import (
Expand All @@ -16,7 +17,10 @@

logging.config.dictConfig(get_log_config(log_level))

app = DIALApp()
telemetry_config = TelemetryConfig(
service_name="aidial-assistant", tracing=TracingConfig()
)
app = DIALApp(telemetry_config=telemetry_config)
app.add_chat_completion("assistant", AssistantApplication(config_dir))


Expand Down
Loading

0 comments on commit 2b0a14f

Please sign in to comment.