Document Python agent versioning in SDK reference - #39077
Draft
ncybul wants to merge 1 commit into
Draft
Conversation
|
I can only run on private repositories. |
Contributor
Preview links (active after the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
Documents how to set an agent version when manually instrumenting agents with the Python SDK, so you can identify which version of an agent produced a span in the Agent Observability trace view. This documents the SDK support added in DataDog/dd-trace-py#19490.
All edits are in
hugo/content/en/llm_observability/instrumentation/sdk.md, within the existing Python tabs:versionargument to the agent decorator's arguments, updates the example to@agent(version="v3"), and adds a context-manager example usingLLMObs.agent(name="weather-agent", version="v3").agentargument (shape{"version": "..."}, also accepted through theddtrace.llmobs.Agenttyped dictionary) to theLLMObs.annotate()arguments, applied when annotating an agent span.agentargument to theLLMObs.annotation_context()arguments and adds an example that versions auto-instrumented agent spans.How was this tested?
Merge readiness
For Datadog employees:
<name>/<description>convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.AI assistance
Written with Bits Code (Claude Code): it made the documentation edits and drafted this PR description. The content was reviewed for accuracy.
Additional notes
PR by Bits - View session in Datadog
Comment @DataDog to request changes