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 04e303b commit bad62cb
Show file tree
Hide file tree
Showing 4 changed files with 645 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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|The server logging level. Use DEBUG for dev purposes and INFO in prod|

Example of the MODEL_RATES configuration:

Expand Down
3 changes: 3 additions & 0 deletions aidial_analytics_realtime/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import aiohttp
import starlette.requests
import uvicorn
from aidial_sdk.telemetry.init import TelemetryConfig, init_telemetry
from fastapi import Depends, FastAPI, Request
from fastapi.responses import JSONResponse

Expand Down Expand Up @@ -54,6 +55,8 @@ async def lifespan(app: FastAPI):

app = FastAPI(lifespan=lifespan)

init_telemetry(app, TelemetryConfig())

configure_loggers()


Expand Down
Loading

0 comments on commit bad62cb

Please sign in to comment.