-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
## Fix OpenTelemetry Logging functionality #15645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@tomhaynes is attempting to deploy a commit to the CLERKIEAI Team on Vercel. A member of the Team first needs to authorize it. |
04969cb to
85f082a
Compare
|
hey @tomhaynes do you mind explaining the change you made here? I don't follow what was causing the previous error - so it'll be helpful to understand the change |
|
Hi sure @krrishdholakia, there were two issues I was bumping into. I'm looking to forward logs to an otel-collector, I initially followed these docs https://docs.litellm.ai/docs/proxy/logging#opentelemetry Initially there were just no logs generated (metrics / traces come through fine). I found a change from last month that seemed to require This sounded similar to this issue open-telemetry/opentelemetry-python#3552 (comment) that this LogRecord object should not be instantiated in this way. I also noticed that the code hardcodes the grpc exporter rather than setting it dynamically based on protocol (although the attribute error manifests with either grpc/http). I tweaked the import to The second issue I saw was similar to this #13942 - regarding the endpoint configuration, specifically the path appended to it ( Thanks to @mubashir1osmani who was helping me investigate this, and has confirmed that other customers are also failing to get otel logging through. |
|
Thanks for explaining that! @mubashir1osmani please feel free to submit a PR to update any relevant documentation on our end |
Bugfixes
Relevant issues
No ticket, but previously enabling otel logging caused an AttributeError because it was assuming the wrong logging provider.
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitType
🐛 Bug Fix
✅ Test
Changes