Skip to content

chore: add ddtrace-internal as dependency#18969

Draft
emmettbutler wants to merge 3 commits into
mainfrom
emmett.butler/depend-on-internal
Draft

chore: add ddtrace-internal as dependency#18969
emmettbutler wants to merge 3 commits into
mainfrom
emmett.butler/depend-on-internal

Conversation

@emmettbutler

Copy link
Copy Markdown
Collaborator

No description provided.

@emmettbutler emmettbutler requested review from a team as code owners July 9, 2026 18:12
@emmettbutler emmettbutler requested review from Yun-Kim and ncybul July 9, 2026 18:12
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codeowners resolved as

lib-injection/sources/requirements.csv                                  @DataDog/apm-core-python
requirements.csv                                                        @DataDog/apm-core-python

@datadog-official

datadog-official Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 38 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v113741491-d2b8243-musllinux_1_2_x86_64, 1]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-py | build linux serverless: [arm64, cp315-cp315, v113741357-d2b8243-manylinux2014_aarch64, 1]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-py | build linux: [amd64, cp315-cp315, v113741491-d2b8243-musllinux_1_2_x86_64]   View in Datadog   GitLab

View all 38 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 2 jobs - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 534379a | Docs | Datadog PR Page | Give us feedback!

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Jul 9, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 4974 circular imports that already exist on the base branch and have not been changed by this PR.

Show existing cycles (showing 5 of 4974 shortest)
ddtrace.internal.datastreams -> ddtrace.internal.datastreams.kombu -> ddtrace.internal.datastreams
ddtrace.internal.datastreams -> ddtrace.internal.datastreams.aiokafka -> ddtrace.internal.datastreams
ddtrace.internal.datastreams -> ddtrace.internal.datastreams.kafka -> ddtrace.internal.datastreams
ddtrace.internal.core -> ddtrace._trace.span -> ddtrace.internal.core
ddtrace.internal.datastreams -> ddtrace.internal.datastreams.google_cloud_pubsub -> ddtrace.internal.datastreams

To see all cycles, download the cycles-base.json and cycles-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/cycles.py compare cycles-base.json cycles-pr.json

@emmettbutler emmettbutler marked this pull request as draft July 9, 2026 18:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e22afe9516

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread pyproject.toml
"bytecode>=0.15.1,<1; python_version~='3.12.0'",
"bytecode>=0.14.0,<1; python_version~='3.11.0'",
"bytecode>=0.13.0,<1; python_version<'3.11'",
"ddtrace-internal<1.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a lower bound for ddtrace-internal

This new runtime dependency only has an upper bound, but scripts/check-dependency-bounds rejects project dependencies without both lower and upper bounds and the generated “Check project dependencies” job runs that script for pyproject.toml changes. Please add the minimum ddtrace-internal version that contains the APIs ddtrace needs, for example alongside the existing <1.0 cap, so this dependency policy check does not fail and older prereleases cannot satisfy constrained installs.

Useful? React with 👍 / 👎.

Comment thread riotfile.py Outdated
},
command="pytest -v -n auto {cmdargs} tests/internal/",
pkgs={
"datadog-internal": "==0.0.0rc12",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the same ddtrace-internal package in the riot venv

The product metadata added in this commit requires ddtrace-internal, but this riot environment asks pip to install a different distribution, datadog-internal. When riot run internal builds this venv, pip resolves pkgs literally, so this extra package does not pin or exercise the dependency that was added and can fail venv creation if datadog-internal is unavailable; please use ddtrace-internal here.

Useful? React with 👍 / 👎.

Comment thread pyproject.toml
Comment thread pyproject.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question about this: I remember hearing/reading that there was a maximum size we needed not to go over for serverless to be happy with ddtrace as a dependency. If we add ddtrace-internal as a dependency, are we not potentially making the layer with ddtrace in it bigger because of duplication (I'm mainly concerned about any native dependencies ddtrace-internal would have that "normal" ddtrace would also have).

(I don't have a solution, I just wanted to raise the question 😅)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants