-
Notifications
You must be signed in to change notification settings - Fork 825
Add optional dependencies with extras for selective instrumentation #3427
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
base: main
Are you sure you want to change the base?
Changes from all commits
58172f5
93eaecd
af7e1be
5bc321a
e1d8859
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||||||||||||
| from setuptools import setup, find_packages | ||||||||||||||||
|
|
||||||||||||||||
| setup( | ||||||||||||||||
| name='traceloop-sdk', | ||||||||||||||||
| version='1.0.0', | ||||||||||||||||
| packages=find_packages(), | ||||||||||||||||
| install_requires=[ | ||||||||||||||||
| # Core minimum dependencies required for all installs | ||||||||||||||||
| 'opentelemetry-sdk>=0.52b1', | ||||||||||||||||
| # Add other core required packages here | ||||||||||||||||
| ], | ||||||||||||||||
|
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid SDK version spec; add API and correct ranges. opentelemetry-sdk follows 1.x, not 0.52b1. This spec will fail to resolve. Also add opentelemetry-api to install_requires. Apply: - 'opentelemetry-sdk>=0.52b1',
+ 'opentelemetry-api>=1.22,<2',
+ 'opentelemetry-sdk>=1.22,<2',Optionally add: + python_requires=">=3.8",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| extras_require={ | ||||||||||||||||
| 'full': [ | ||||||||||||||||
| 'opentelemetry-instrumentation-alephalpha==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-anthropic==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-bedrock==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-chromadb==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-cohere==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-crewai==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-google-generativeai==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-groq==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-haystack==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-lancedb==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-langchain==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-llamaindex==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-logging==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-marqo==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-milvus==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-mistralai==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-ollama==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-openai==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-pinecone==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-qdrant==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-replicate==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-requests==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-sagemaker==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-sqlalchemy==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-threading==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-together==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-transformers==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-urllib3==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-vertexai==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-watsonx==0.39.0', | ||||||||||||||||
| 'opentelemetry-instrumentation-weaviate==0.39.0', | ||||||||||||||||
| 'opentelemetry-semantic-conventions-ai==0.4.3', | ||||||||||||||||
| 'opentelemetry-util-http==0.52b1', | ||||||||||||||||
| ], | ||||||||||||||||
| 'minimal': [ | ||||||||||||||||
| 'opentelemetry-instrumentation-requests==0.52b1', | ||||||||||||||||
| 'opentelemetry-instrumentation-urllib3==0.52b1', | ||||||||||||||||
| ], | ||||||||||||||||
| 'openai': [ | ||||||||||||||||
| 'opentelemetry-instrumentation-openai==0.39.0', | ||||||||||||||||
| ], | ||||||||||||||||
| 'langchain': [ | ||||||||||||||||
| 'opentelemetry-instrumentation-langchain==0.39.0', | ||||||||||||||||
| ], | ||||||||||||||||
| # Add other targeted optional groups here | ||||||||||||||||
| } | ||||||||||||||||
|
Comment on lines
+12
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVersion drift across extras; verify compatibility and consider grouping. Mixing 0.39.0 (LLM/AI vendors) with 0.52b1 (core) may be fine if they target API 1.x, but please verify the supported matrix and pin consistently where needed. Consider building 'full' from the union of smaller groups to reduce duplication. Run: 🏁 Script executed: #!/bin/bash
# Check existence and latest versions on PyPI to validate pins
for pkg in opentelemetry-sdk opentelemetry-api \
opentelemetry-instrumentation-openai \
opentelemetry-instrumentation-requests \
opentelemetry-instrumentation-langchain \
opentelemetry-semantic-conventions-ai \
opentelemetry-util-http
do
echo "== $pkg =="
curl -s "https://pypi.org/pypi/$pkg/json" | jq -r '.info.version, (.releases | keys | join(" "))' | head -n1
done
# Sanity: does "0.52b1" exist for SDK? (expected: no)
curl -s https://pypi.org/pypi/opentelemetry-sdk/json | jq -r '.releases | has("0.52b1")'Length of output: 310 I need to verify whether the specific 0.52b1 versions pinned in setup.py actually exist on PyPI, as the core SDK doesn't have this version. Critical: dependency pins are broken and will fail installation. The 0.52b1 versions do exist for instrumentation packages like requests (released Mar 20, 2025), but the vendor packages pinned to 0.39.0 (openai, langchain, anthropic, etc.) are not available on PyPI. For example, opentelemetry-instrumentation-openai latest version is 0.47.3 (Sep 21, 2025), with no 0.39.0 release found in the version history. This means the
Update all pins to valid, available versions on PyPI and align instrumentation versions to a consistent release window. |
||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude venv and non-package dirs from distribution.
find_packages() will happily pick up myenv/ if present. Exclude it (and tests/examples) to avoid shipping venv artifacts.
Apply:
📝 Committable suggestion
🤖 Prompt for AI Agents