Skip to content
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

[Bug]: v1.52.0 broken with "ModuleNotFoundError: No module named 'opentelemetry'" #6636

Open
jeromeroussin opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jeromeroussin
Copy link

What happened?

Litellm version 1.52.0 generates errors during routes and callbacks. Here is the error during callbacks:

{"message": "LiteLLM.LoggingError: [Non-Blocking] Exception occurred while success logging Traceback (most recent call last):\n File "/usr/local/lib/python3.12/site-packages/litellm/litellm_core_utils/litellm_logging.py", line 1575, in async_success_handler\n await callback.async_log_success_event(\n File "/usr/local/lib/python3.12/site-packages/litellm/_service_logger.py", line 314, in async_log_success_event\n raise e\n File "/usr/local/lib/python3.12/site-packages/litellm/_service_logger.py", line 308, in async_log_success_event\n await self.async_service_success_hook(\n File "/usr/local/lib/python3.12/site-packages/litellm/_service_logger.py", line 118, in async_service_success_hook\n from litellm.integrations.opentelemetry import OpenTelemetry\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 46, in \n class OpenTelemetryConfig:\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 47, in OpenTelemetryConfig\n from opentelemetry.sdk.trace.export import SpanExporter\nModuleNotFoundError: No module named 'opentelemetry'\n", "level": "ERROR", "timestamp": "2024-11-07T07:45:46.566727"}

Similar error during /embeddings:

2024-11-06 01:36:32 {"message": "litellm.proxy.proxy_server.embeddings(): Exception occured - No module named 'opentelemetry'", "level": "ERROR", "timestamp": "2024-11-06T01:36:24.901380", "stacktrace": "Traceback (most recent call last):\n File "/usr/local/lib/python3.12/site-packages/litellm/proxy/proxy_server.py", line 3789, in embeddings\n data = await add_litellm_data_to_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/local/lib/python3.12/site-packages/litellm/proxy/litellm_pre_call_utils.py", line 550, in add_litellm_data_to_request\n await service_logger_obj.async_service_success_hook(\n File "/usr/local/lib/python3.12/site-packages/litellm/_service_logger.py", line 118, in async_service_success_hook\n from litellm.integrations.opentelemetry import OpenTelemetry\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 46, in \n class OpenTelemetryConfig:\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 47, in OpenTelemetryConfig\n from opentelemetry.sdk.trace.export import SpanExporter\nModuleNotFoundError: No module named 'opentelemetry'"}

and chat completions:

2024-11-06 01:35:37 {"message": "litellm.proxy.proxy_server.chat_completion(): Exception occured - No module named 'opentelemetry'", "level": "ERROR", "timestamp": "2024-11-06T01:35:31.510714", "stacktrace": "Traceback (most recent call last):\n File "/usr/local/lib/python3.12/site-packages/litellm/proxy/proxy_server.py", line 3295, in chat_completion\n data = await add_litellm_data_to_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/local/lib/python3.12/site-packages/litellm/proxy/litellm_pre_call_utils.py", line 550, in add_litellm_data_to_request\n await service_logger_obj.async_service_success_hook(\n File "/usr/local/lib/python3.12/site-packages/litellm/_service_logger.py", line 118, in async_service_success_hook\n from litellm.integrations.opentelemetry import OpenTelemetry\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 46, in \n class OpenTelemetryConfig:\n File "/usr/local/lib/python3.12/site-packages/litellm/integrations/opentelemetry.py", line 47, in OpenTelemetryConfig\n from opentelemetry.sdk.trace.export import SpanExporter\nModuleNotFoundError: No module named 'opentelemetry'"}

Relevant log output

No response

Twitter / LinkedIn details

https://www.linkedin.com/in/jeromeroussin/

@jeromeroussin jeromeroussin added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant