Skip to content

fix(llmobs): fix crew ai type error#13511

Merged
lievan merged 13 commits intomainfrom
evan.li/crew-fix
May 29, 2025
Merged

fix(llmobs): fix crew ai type error#13511
lievan merged 13 commits intomainfrom
evan.li/crew-fix

Conversation

@lievan
Copy link
Contributor

@lievan lievan commented May 27, 2025

Fixes a TypeError with crewai>=1.121.0 caused by crew ai supporting empty context

Also updates the crewai version we test with to be a min compatible version with 1.121.0

image

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@lievan lievan changed the title fix(llmobs): cherry pick fix(llmobs): fix crew ai type error May 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 27, 2025

CODEOWNERS have been resolved as:

.riot/requirements/158ac30.txt                                          @DataDog/apm-python
.riot/requirements/16628a6.txt                                          @DataDog/apm-python
.riot/requirements/181e571.txt                                          @DataDog/apm-python
.riot/requirements/321c69b.txt                                          @DataDog/apm-python
.riot/requirements/8b0105d.txt                                          @DataDog/apm-python
.riot/requirements/f27aa11.txt                                          @DataDog/apm-python
releasenotes/notes/crewai-fix-8d66e3489f87d046.yaml                     @DataDog/apm-python
ddtrace/contrib/integration_registry/registry.yaml                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/llmobs/_integrations/crewai.py                                  @DataDog/ml-observability
lib-injection/sources/min_compatible_versions.csv                       @DataDog/apm-core-python
min_compatible_versions.csv                                             @DataDog/apm-core-python
riotfile.py                                                             @DataDog/apm-python
supported_versions_output.json                                          @DataDog/apm-core-python
supported_versions_table.csv                                            @DataDog/apm-core-python

@github-actions
Copy link
Contributor

github-actions bot commented May 27, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 234 ± 4 ms.

The average import time from base is: 236 ± 3 ms.

The import time difference between this PR and base is: -1.9 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.940 ms (0.83%)
ddtrace.bootstrap.sitecustomize 1.266 ms (0.54%)
ddtrace.bootstrap.preload 1.266 ms (0.54%)
ddtrace.internal.remoteconfig.client 0.619 ms (0.26%)
ddtrace 0.674 ms (0.29%)
ddtrace.internal._unpatched 0.024 ms (0.01%)

@lievan lievan marked this pull request as ready for review May 27, 2025 16:16
@lievan lievan requested review from a team as code owners May 27, 2025 16:16
@pr-commenter
Copy link

pr-commenter bot commented May 27, 2025

Benchmarks

Benchmark execution time: 2025-05-29 15:34:41

Comparing candidate commit 1e3f7f2 in PR branch evan.li/crew-fix with baseline commit 074b3be in branch main.

Found 2 performance improvements and 4 performance regressions! Performance is the same for 503 metrics, 7 unstable metrics.

scenario:iastaspects-replace_aspect

  • 🟥 execution_time [+600.417ns; +658.983ns] or [+12.645%; +13.878%]

scenario:iastaspectsospath-ospathjoin_aspect

  • 🟥 execution_time [+1.121µs; +1.186µs] or [+18.233%; +19.293%]

scenario:iastaspectsospath-ospathsplit_aspect

  • 🟥 execution_time [+718.221ns; +901.967ns] or [+14.675%; +18.429%]

scenario:iastaspectsospath-ospathsplitdrive_aspect

  • 🟥 execution_time [+444.632ns; +495.589ns] or [+12.130%; +13.520%]

scenario:iastdjangostartup-appsec

  • 🟩 execution_time [-1.100s; -1.004s] or [-55.765%; -50.939%]

scenario:iastdjangostartup-tracer

  • 🟩 execution_time [-866.546ms; -756.149ms] or [-49.279%; -43.001%]

@lievan lievan requested a review from a team as a code owner May 27, 2025 18:27
@lievan lievan requested a review from quinna-h May 27, 2025 18:27
@lievan lievan enabled auto-merge (squash) May 27, 2025 19:31
@lievan lievan merged commit c8005b4 into main May 29, 2025
740 of 742 checks passed
@lievan lievan deleted the evan.li/crew-fix branch May 29, 2025 16:36
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.

3 participants