Skip to content

Conversation

@github-actions
Copy link
Contributor

Backport 269b3d8 from #12889 to 2.21.

Due to a regression in #11961, agentless writers fail to init in LLMObs on fork, as the agentless_url is not passed down in recreate, resulting in:

File "/app/.venv/lib/python3.11/site-packages/ddtrace/llmobs/_writer.py", line 255, in __init__ 	
	raise ValueError("agentless_url is required for agentless mode")
	
ValueError: agentless_url is required for agentless mode

The fix is passing the value down appropriately.

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

…12889)

Due to a regression in
#11961, agentless writers
fail to init in LLMObs on fork, as the `agentless_url` is not passed
down in `recreate`, resulting in:

```
File "/app/.venv/lib/python3.11/site-packages/ddtrace/llmobs/_writer.py", line 255, in __init__
	raise ValueError("agentless_url is required for agentless mode")

ValueError: agentless_url is required for agentless mode
```

The fix is passing the value down appropriately.

## Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 269b3d8)
@github-actions github-actions bot requested review from a team as code owners March 26, 2025 15:04
@github-actions github-actions bot requested review from gnufede and quinna-h March 26, 2025 15:04
@sabrenner sabrenner enabled auto-merge (squash) March 26, 2025 15:07
@pr-commenter
Copy link

pr-commenter bot commented Mar 26, 2025

Benchmarks

Benchmark execution time: 2025-04-02 19:21:56

Comparing candidate commit 577b133 in PR branch backport-12889-to-2.21 with baseline commit b1fd163 in branch 2.21.

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

scenario:iast_aspects-ospathjoin_aspect

  • 🟩 execution_time [-462.814ns; -391.376ns] or [-8.346%; -7.058%]

@sabrenner sabrenner closed this Mar 27, 2025
auto-merge was automatically disabled March 27, 2025 13:43

Pull request was closed

@sabrenner sabrenner reopened this Mar 27, 2025
@github-actions
Copy link
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/llmobs-agentless-writer-on-fork-fix-d43c50cbf3d86297.yaml  @DataDog/apm-python
ddtrace/llmobs/_writer.py                                               @DataDog/ml-observability
tests/llmobs/test_llmobs_service.py                                     @DataDog/ml-observability

@sabrenner sabrenner merged commit 5a9c90d into 2.21 Apr 2, 2025
294 checks passed
@sabrenner sabrenner deleted the backport-12889-to-2.21 branch April 2, 2025 19:55
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