litellm icon indicating copy to clipboard operation
litellm copied to clipboard

feat: Add option to skip creating opentelemetry exporter

Open aburgel opened this issue 8 months ago • 1 comments

Title

Add option to skip creating opentelemetry exporter

Relevant issues

N/A

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • [X] I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • [ ] I have added a screenshot of my new test passing locally
  • [X] My PR passes all unit tests on (make test-unit)[https://docs.litellm.ai/docs/extras/contributing_code]
  • [X] My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

If you're using litellm as a library (not the proxy server) you may want to use the opentelemetry integration, but not have litellm create its own exporter. In my case, we use opentelemetry auto-instrumentation which sets up exporters for you.

If you do it this way, litellm will create its own tracer, which will be connected to the existing exporter.

FYI, I didn't update the docs yet, if the code looks good, I can do so.

aburgel avatar Mar 14 '25 21:03 aburgel

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 10:13pm

vercel[bot] avatar Mar 14 '25 21:03 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 22 '25 22:04 CLAassistant

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jul 23 '25 00:07 github-actions[bot]