forked from phoenix/litellm-mirror
fix otel logging fixes
This commit is contained in:
parent
009c63f194
commit
e96d2e3b1b
2 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,8 @@ class OpenTelemetry(CustomLogger):
|
|||
from opentelemetry.sdk.trace import TracerProvider
|
||||
|
||||
self.config = config
|
||||
self.OTEL_ENDPOINT = self.config.endpoint
|
||||
self.OTEL_BEARER_TOKEN = self.config.bearer_token
|
||||
provider = TracerProvider(resource=Resource(attributes=LITELLM_RESOURCE))
|
||||
provider.add_span_processor(self._get_span_processor())
|
||||
|
||||
|
|
|
@ -2399,6 +2399,12 @@ class ProxyConfig:
|
|||
and callback in known_compatible_callbacks
|
||||
):
|
||||
imported_list.append(callback)
|
||||
elif isinstance(callback, str) and callback == "otel":
|
||||
from litellm.integrations.opentelemetry import (
|
||||
OpenTelemetry,
|
||||
)
|
||||
|
||||
imported_list.append(OpenTelemetry())
|
||||
elif isinstance(callback, str) and callback == "presidio":
|
||||
from litellm.proxy.hooks.presidio_pii_masking import (
|
||||
_OPTIONAL_PresidioPIIMasking,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue