-
Notifications
You must be signed in to change notification settings - Fork 707
Add in Datadog LLM Observability Documentation #998
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
Open
sabrenner
wants to merge
7
commits into
google:main
Choose a base branch
from
sabrenner:sabrenner/datadog-agent-observability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
81f78f7
add datadog docs
sabrenner aec3a3c
update screenshot & verbiage
sabrenner 93f69b9
Merge branch 'main' of github.com:sabrenner/google-adk-docs into sabr…
sabrenner 7e78368
Update docs/observability/datadog.md
sabrenner 36746e7
Formatting
koverholt 534d66f
Merge branch 'main' into sabrenner/datadog-agent-observability
koverholt 8f2a432
Merge branch 'main' into sabrenner/datadog-agent-observability
koverholt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # Agent Observability with Datadog | ||
|
|
||
| [Datadog LLM | ||
| Observability](https://www.datadoghq.com/product/llm-observability/) helps AI | ||
| engineers, data scientists, and application developers quickly develop, | ||
| evaluate, and monitor LLM applications. Confidently improve output quality, | ||
| performance, costs, and overall risk with structured experiments, end-to-end | ||
| tracing across AI agents, and evaluations. | ||
|
|
||
| ## Overview | ||
|
|
||
| Datadog LLM Observability can [automatically instrument and trace your agents | ||
| built on Google | ||
| ADK](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#google-adk), | ||
| allowing you to: | ||
|
|
||
| - **Observe agent executions and interactions** - Automatically capture every | ||
| agent run, tool call, and code execution within your agents | ||
| - **Capture LLM calls and responses** made with the underlying Google GenAI SDK | ||
| - **Debug issues** by providing error rates, token usage and cost, and | ||
| out-of-the-box evaluations on your LLM calls and tool usage | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Sign up for a [Datadog account](https://www.datadoghq.com/) if you do not have | ||
| one and [get your API | ||
| key](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys). | ||
|
|
||
| ## Installation | ||
|
|
||
| Install the required packages: | ||
|
|
||
| ```bash | ||
| pip install ddtrace | ||
| ``` | ||
|
|
||
| ## Setup | ||
|
|
||
| ### Configure Environment Variables | ||
|
|
||
| You will also need to specify an ML Application name in the following | ||
| environment variables. An ML Application is a grouping of LLM Observability | ||
| traces associated with a specific LLM-based application. See [ML Application | ||
| Naming | ||
| Guidelines](https://docs.datadoghq.com/llm_observability/instrumentation/sdk?tab=python#application-naming-guidelines) | ||
| for more information on limitations with ML Application names. | ||
|
|
||
| ```shell | ||
| export DD_API_KEY=<YOUR_DD_API_KEY> | ||
| export DD_SITE=<YOUR_DD_SITE> | ||
| export DD_LLMOBS_ENABLED=true | ||
| export DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> | ||
| export DD_LLMOBS_AGENTLESS_ENABLED=true | ||
| export DD_APM_TRACING_ENABLED=false # Only set this if you are not using Datadog APM | ||
| ``` | ||
|
|
||
| Additionally, configure any LLM provider API keys: | ||
|
|
||
| ```shell | ||
| export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY> | ||
| # or | ||
| export GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY> | ||
| ... | ||
| ``` | ||
|
|
||
| ### Run Your Application | ||
|
|
||
| Once you have configured your environment variables, you can run your | ||
| application and start observing your LLM-based applications. | ||
|
|
||
| ```shell | ||
| ddtrace-run python your_application.py | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest updating this command to reflect ADK usage, as in: or |
||
| ``` | ||
|
|
||
| ## Observe | ||
|
|
||
| Navigate to the [Datadog LLM Observability Traces | ||
| View](https://app.datadoghq.com/llm/traces) to see the traces generated by your | ||
| application. | ||
|
|
||
|  | ||
|
|
||
| ## Support and Resources | ||
| - [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/) | ||
| - [Datadog Support](https://docs.datadoghq.com/help/) | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding a link or code snippet for a sample agent, something along the lines of: