Feat: Add Langtrace integration (#5341)

* Feat: Add Langtrace integration

* add langtrace service name

* fix timestamps for traces

* add tests

* Discard Callback + use existing otel logger

* cleanup

* remove print statments

* remove callback

* add docs

* docs

* add logging docs

* format logging

* remove emoji and add litellm proxy example

* format logging

* format `logging.md`

* add langtrace docs to logging.md

* sync conflict
This commit is contained in:
Ali Waleed 2024-10-11 16:49:53 +03:00 committed by GitHub
parent 42174fde4e
commit 7ec414a3cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 291 additions and 0 deletions

View file

@ -352,6 +352,13 @@ class OpenTelemetry(CustomLogger):
set_arize_ai_attributes(span, kwargs, response_obj)
return
elif self.callback_name == "langtrace":
from litellm.integrations.langtrace import LangtraceAttributes
LangtraceAttributes().set_langtrace_attributes(
span, kwargs, response_obj
)
return
from litellm.proxy._types import SpanAttributes
optional_params = kwargs.get("optional_params", {})