Skip to content

chore: update mcp latest version to 2.3.0 - #19447

Draft
dd-octo-sts[bot] wants to merge 1 commit into
mainfrom
upgrade-latest-mcp-version
Draft

dd-octo-sts[bot] wants to merge 1 commit into
mainfrom
upgrade-latest-mcp-version

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Update mcp lockfiles and dependency package lockfiles.
This performs the following updates:

  1. Some mcp locks use mcp latest. This updates that package and its dependencies.
  2. Some locks pin mcp but use the latest version of another package. This updates those dependencies.

@dd-octo-sts dd-octo-sts Bot added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 3, 2026
@dd-octo-sts
dd-octo-sts Bot requested review from a team as code owners August 3, 2026 00:49
@dd-octo-sts dd-octo-sts Bot added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 3, 2026
@dd-octo-sts
dd-octo-sts Bot requested review from juanjux and quinna-h August 3, 2026 00:49
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

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

ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.riot/requirements/145f918.txt                                          @DataDog/apm-python
.riot/requirements/1531241.txt                                          @DataDog/apm-python
.riot/requirements/1592050.txt                                          @DataDog/apm-python
.riot/requirements/1aa359d.txt                                          @DataDog/apm-python
.riot/requirements/5a978d2.txt                                          @DataDog/apm-python
.riot/requirements/6939c9a.txt                                          @DataDog/apm-python
.riot/requirements/c815af0.txt                                          @DataDog/apm-python
.riot/requirements/ebf73f9.txt                                          @DataDog/apm-python
.riot/requirements/fe50ba7.txt                                          @DataDog/apm-python
.riot/requirements/ff873f4.txt                                          @DataDog/apm-python
scripts/integration_registry/registry.yaml                              @DataDog/apm-idm-python
supported_versions.json                                                 @DataDog/python-guild @DataDog/apm-idm-python

@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: e81ee7ebac

ℹ️ 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 .riot/requirements/145f918.txt Outdated
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
mcp==1.28.1
mcp==2.0.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.

P1 Badge Keep MCP latest below v2 until the integration is migrated

Locking the latest MCP venvs to 2.0.0 makes this suite install SDK v2, but the integration is still written against v1 internals: patch() imports and wraps mcp.shared.session.BaseSession, and the tests still use create_connected_server_and_client_session; the MCP v2 migration guide lists both as removed. In any venv using this lockfile (and the identical latest MCP lockfiles), the autouse setup calls patch() and will fail before the tests run, and users on MCP 2 won't get instrumentation, so please keep the latest constraint below 2 or migrate the patch/tests before advertising 2.0.0 support.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | llmobs/mcp 1/2 — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | llmobs/mcp 2/2 — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ecff024 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-07 01:23:49

Comparing candidate commit ecff024 in PR branch upgrade-latest-mcp-version with baseline commit 049682f in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 9 performance regressions! Performance is the same for 590 metrics, 10 unstable metrics, 7 known flaky benchmarks, 17 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationextract-full_t_id_datadog_headers

  • 🟥 execution_time [+2.006µs; +2.115µs] or [+13.987%; +14.749%]

scenario:iastaspects-format_map_noaspect

  • 🟥 execution_time [+72.039µs; +76.560µs] or [+20.245%; +21.515%]

scenario:iastaspects-title_aspect

  • 🟥 execution_time [+92.665µs; +96.817µs] or [+34.997%; +36.564%]

scenario:iastaspectsremodule-re_expand_aspect

  • 🟥 execution_time [+105.171µs; +115.970µs] or [+16.614%; +18.320%]

scenario:msgpackencoderscenario-simple_one_span

  • 🟥 execution_time [+461.282ns; +537.410ns] or [+10.987%; +12.800%]

scenario:openfeatureflagevaluation-hook-enqueue-typical

  • 🟥 execution_time [+1.614µs; +1.785µs] or [+7.445%; +8.230%]

scenario:otelspan-start

  • 🟥 execution_time [+1.910ms; +2.728ms] or [+7.803%; +11.146%]

scenario:recursivecomputation-shallow

  • 🟥 execution_time [+52.605µs; +55.937µs] or [+7.478%; +7.952%]

scenario:span-start-finish-telemetry

  • 🟥 execution_time [+4.627ms; +4.882ms] or [+11.161%; +11.777%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-736.834ns; +732.306ns] or [-6.985%; +6.942%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-40.206ns; +39.493ns] or [-6.039%; +5.932%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1924.997ns; +1938.560ns] or [-9.563%; +9.630%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-2018.238ns; +1699.574ns] or [-10.379%; +8.740%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-392.536ns; +379.627ns] or [-9.067%; +8.769%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-229.809ns; +232.980ns] or [-8.496%; +8.614%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-109.333ns; +77.923ns] or [-8.053%; +5.739%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-4822.446ns; +4403.947ns] or [-10.063%; +9.189%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-889.064ns; +981.274ns] or [-8.809%; +9.722%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-57.736µs; +50.425µs] or [-10.188%; +8.898%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.918µs; +3.036µs] or [+20.307%; +21.129%]

scenario:iastaspects-rstrip_aspect

  • 🟥 execution_time [+112.768µs; +121.208µs] or [+33.370%; +35.868%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+140.316µs; +146.356µs] or [+36.013%; +37.563%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+24.432µs; +28.745µs] or [+15.719%; +18.494%]

scenario:span-start

  • 🟥 execution_time [+1.105ms; +1.524ms] or [+8.845%; +12.205%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+247.134ns; +285.020ns] or [+12.734%; +14.686%]

scenario:tracer-small

  • 🟥 execution_time [+46.294µs; +47.682µs] or [+18.676%; +19.236%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-casefold_noaspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:telemetryaddmetric-record-100-metrics

@emmettbutler
emmettbutler force-pushed the upgrade-latest-mcp-version branch from e81ee7e to a6c4f83 Compare August 4, 2026 16:17
@emmettbutler

Copy link
Copy Markdown
Collaborator

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-04 16:22:59 UTC ℹ️ Start processing command /merge


2026-08-04 16:23:07 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-08-04 20:37:08 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@dd-octo-sts
dd-octo-sts Bot force-pushed the upgrade-latest-mcp-version branch from a6c4f83 to 20390e3 Compare August 13, 2026 00:35
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 201 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 201 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=132)
ddtrace.appsec._contrib.django -×-> ddtrace.trace  (product:appsec -> product:tracing, score=130)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=130)
ddtrace.llmobs._integrations.llama_index -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=130)
ddtrace.llmobs._integrations.pydantic_ai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=130)

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

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

@wconti27
wconti27 requested a review from a team as a code owner September 3, 2026 00:31
Comment thread ddtrace/contrib/internal/mcp/patch.py Outdated
try:
llmobs_context_provider = integration._get_llmobs_context_provider()
previous_llmobs_context = llmobs_context_provider.active() if llmobs_context_provider else None
tracer.context_provider.activate(None)

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.

Might be missing something here, mcp 1.x kept the server spans nested under the ambient context and this detaches them into their own traces. Is there something about MCP that needs the clear?

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

AIF-3

@emmettbutler

Copy link
Copy Markdown
Collaborator

Converted to draft because prechecks are failing

@dd-octo-sts dd-octo-sts Bot changed the title chore: update mcp latest version to 2.0.0 chore: update mcp latest version to 2.3.0 Oct 7, 2026
@dd-octo-sts
dd-octo-sts Bot force-pushed the upgrade-latest-mcp-version branch from cafbb6b to ecff024 Compare October 7, 2026 00:51
@timonschmidt

timonschmidt commented Oct 8, 2026 •

Copy link
Copy Markdown

The llmobs/mcp failures here come from mcp 2.x removing mcp.shared.session, which the integration wraps. #20881 adds mcp 2.x support; this lock update should pass once it lands.

edit: I bumped the version in #20881 already so this would be redundant.

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

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants