Skip to content

Commit

Permalink
feat: support otlp telemetry via DIAL SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik committed Feb 3, 2025
1 parent 01f8f42 commit 9a6b7bb
Show file tree
Hide file tree
Showing 4 changed files with 650 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Also, following environment valuables can be used to configure the service behav
|MODEL_RATES| {} | Specifies per-token price rates for models in JSON format|
|TOPIC_MODEL| ./topic_model | Specifies the name or path for the topic model. If the model is specified by name, it will be downloaded from, the [Huggingface]( https://huggingface.co/).|
|TOPIC_EMBEDDINGS_MODEL| None | Specifies the name or path for the embeddings model used with the topic model. If the model is specified by name, it will be downloaded from, the [Huggingface]( https://huggingface.co/). If None, the name will be used from the topic model config.|
|LOG_LEVEL|INFO|Log level. Use DEBUG for dev purposes and INFO in prod|

Example of the MODEL_RATES configuration:
```json
Expand Down Expand Up @@ -88,7 +89,7 @@ Example of the MODEL_RATES configuration:
______
# Developer environment

This project uses [Python>=3.11](https://www.python.org/downloads/) and [Poetry>=1.6.1](https://python-poetry.org/) as a dependency manager.
This project uses [Python>=3.11](https://www.python.org/downloads/) and [Poetry>=1.6.1](https://python-poetry.org/) as a dependency manager.
Check out Poetry's [documentation on how to install it](https://python-poetry.org/docs/#installation) on your system before proceeding.

To install requirements:
Expand Down
4 changes: 4 additions & 0 deletions aidial_analytics_realtime/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from datetime import datetime

import uvicorn
from aidial_sdk.telemetry.init import TelemetryConfig, init_telemetry
from fastapi import Depends, FastAPI, Request

from aidial_analytics_realtime.analytics import (
Expand All @@ -26,6 +27,9 @@


app = FastAPI()

init_telemetry(app, TelemetryConfig())

logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] - %(message)s",
Expand Down
Loading

0 comments on commit 9a6b7bb

Please sign in to comment.