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

chore(llmobs): remove beta auto span linking flag, decorator linking #13077

Merged
merged 4 commits into from
Apr 7, 2025

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Apr 4, 2025

This PR removes the _DD_LLMOBS_AUTO_SPAN_LINKING_ENABLED configuration flag. This is a beta feature that was previously private, but no longer disabled by default. However removing this flag is not a breaking change, as this will simply add functionality (add span linking in our integrations and decorators).

This PR also removes the auto span linking feature for decorator spans. This was an experimental feature that we started when we first introduced span linking, but we've decided to remove this for now and keep span linking limited to our integrations.

In hindsight it should be noted that adding this option to the config.py file was probably a mistake, since it was a private feature flag that was destined to be removed fairly soon. We should have just read it directly as an environment variable, but wanted to reiterate that removing this from the config.py file is not a breaking change (although it would be normally) since this is a private feature flag for experimental users.

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

@Yun-Kim Yun-Kim added the changelog/no-changelog A changelog entry is not required for this PR. label Apr 4, 2025
@Yun-Kim Yun-Kim requested review from a team as code owners April 4, 2025 17:04
Copy link
Contributor

github-actions bot commented Apr 4, 2025

CODEOWNERS have been resolved as:

ddtrace/llmobs/_integrations/base.py                                    @DataDog/ml-observability
ddtrace/llmobs/_integrations/langchain.py                               @DataDog/ml-observability
ddtrace/llmobs/decorators.py                                            @DataDog/ml-observability
ddtrace/settings/_config.py                                             @DataDog/apm-core-python
tests/llmobs/_utils.py                                                  @DataDog/ml-observability
tests/llmobs/test_llmobs_decorators.py                                  @DataDog/ml-observability
tests/telemetry/test_writer.py                                          @DataDog/apm-python
tests/utils.py                                                          @DataDog/python-guild

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 238 ± 5 ms.

The average import time from base is: 238 ± 4 ms.

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

The difference is not statistically significant (z = -1.89).

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.879 ms (0.79%)
ddtrace.bootstrap.sitecustomize 1.219 ms (0.51%)
ddtrace.bootstrap.preload 1.219 ms (0.51%)
ddtrace.internal.products 1.219 ms (0.51%)
ddtrace.internal.remoteconfig.client 0.599 ms (0.25%)
ddtrace 0.660 ms (0.28%)

@pr-commenter
Copy link

pr-commenter bot commented Apr 4, 2025

Benchmarks

Benchmark execution time: 2025-04-07 18:54:39

Comparing candidate commit 291112d in PR branch yunkim/llmobs-enable-span-linking with baseline commit 612d802 in branch main.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 495 metrics, 2 unstable metrics.

scenario:iast_aspects-ospathsplit_aspect

  • 🟥 execution_time [+449.754ns; +512.441ns] or [+11.590%; +13.205%]

@Yun-Kim Yun-Kim changed the title chore(llmobs): remove beta auto span linking flag chore(llmobs): remove beta auto span linking flag, decorator linking Apr 4, 2025
@christophe-papazian
Copy link
Contributor

christophe-papazian commented Apr 7, 2025

Approved, but some llmobs snapshot tests are failing, (maybe?) due to the span_links tag

@Yun-Kim Yun-Kim enabled auto-merge (squash) April 7, 2025 18:19
@Yun-Kim Yun-Kim merged commit 0d3e280 into main Apr 7, 2025
740 checks passed
@Yun-Kim Yun-Kim deleted the yunkim/llmobs-enable-span-linking branch April 7, 2025 18:56
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.

4 participants