-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Yahya/create anthropic #19024
Merged
+181
−1
Merged
Yahya/create anthropic #19024
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
d62fe60
Anthropic skeleton code
yahya-mouman 25966f9
Anthropic documentation
yahya-mouman 72d5168
Anthropic label
yahya-mouman 7cba749
Remove dashboards
yahya-mouman 43c71ee
Remove tabs
yahya-mouman eb2172c
indentation
yahya-mouman 4ca8443
Update anthropic/manifest.json
yahya-mouman 175397d
add dashboards
yahya-mouman 7e9dd0f
move dashboards
yahya-mouman c82db26
1 line dashboard
yahya-mouman cbe4adc
Update anthropic/README.md
yahya-mouman 318dd1d
Update anthropic/README.md
yahya-mouman b55bd83
Update anthropic/README.md
yahya-mouman df7bc5d
Update anthropic/README.md
yahya-mouman dfbeb24
Update anthropic/README.md
yahya-mouman 63408a2
No Metrics
yahya-mouman c1e42e9
Remove images readme
yahya-mouman cff0241
Merge remote-tracking branch 'origin/yahya/create-anthropic' into yah…
yahya-mouman e4dc2e1
Correction
yahya-mouman e3b1d3a
Update anthropic/README.md
yahya-mouman cfe897c
Add code owners
yahya-mouman a8b0bbe
Merge remote-tracking branch 'origin/yahya/create-anthropic' into yah…
yahya-mouman 71d1eb0
Update anthropic/manifest.json
yahya-mouman 92ef4ca
Update anthropic/README.md
yahya-mouman 02a5d5a
Merge branch 'master' into yahya/create-anthropic
yahya-mouman 2d5d799
Update dead sdk link
yahya-mouman 8511c3e
remove metrics
yahya-mouman 50c206d
Delete anthropic/metadata.csv
yahya-mouman e16ac5e
Merge branch 'master' into yahya/create-anthropic
steveny91 2fa4534
remove dashboard
yahya-mouman 939e6ae
remove dashboard
yahya-mouman 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
This file contains 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,7 @@ | ||
# CHANGELOG - Anthropic | ||
|
||
## 1.0.0 / 2024-11-08 | ||
|
||
***Added***: | ||
|
||
* Initial Release |
This file contains 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,133 @@ | ||
# Anthropic | ||
|
||
## Overview | ||
Monitor, troubleshoot, and evaluate your LLM-powered applications, such as chatbots or data extraction tools, | ||
using Anthropic. | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If you are building LLM applications, use LLM Observability to investigate the root cause of issues, | ||
monitor operational performance, and evaluate the quality, privacy, and safety of your LLM applications. | ||
|
||
See the [LLM Observability tracing view video](https://imgix.datadoghq.com/video/products/llm-observability/expedite-troubleshooting.mp4?fm=webm&fit=max) for an example of how you can investigate a trace. | ||
|
||
## Setup | ||
|
||
### LLM Observability: Get end-to-end visibility into your LLM application using Anthropic | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
You can enable LLM Observability in different environments. Follow the appropriate setup based on your scenario: | ||
|
||
<!-- xxx tabs xxx --> | ||
<!-- xxx tab "Python" xxx --> | ||
|
||
#### Installation for Python | ||
|
||
##### If you do not have the Datadog Agent: | ||
1. Install the `ddtrace` package: | ||
|
||
```shell | ||
pip install ddtrace | ||
``` | ||
|
||
2. Start your application with the following command, enabling Agentless mode: | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```shell | ||
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_AGENTLESS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> ddtrace-run python <YOUR_APP>.py | ||
``` | ||
|
||
##### If you already have the Datadog Agent installed: | ||
1. Make sure the Agent is running and that APM and StatsD are enabled. For example, use the following command with Docker: | ||
|
||
```shell | ||
docker run -d \ | ||
--cgroupns host \ | ||
--pid host \ | ||
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | ||
-v /proc/:/host/proc/:ro \ | ||
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | ||
-e DD_API_KEY=<DATADOG_API_KEY> \ | ||
-p 127.0.0.1:8126:8126/tcp \ | ||
-p 127.0.0.1:8125:8125/udp \ | ||
-e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \ | ||
-e DD_APM_ENABLED=true \ | ||
gcr.io/datadoghq/agent:latest | ||
``` | ||
|
||
2. If you haven't already, install the `ddtrace` package: | ||
|
||
```shell | ||
pip install ddtrace | ||
``` | ||
|
||
3. Start your application using the `ddtrace-run` command to automatically enable tracing: | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```shell | ||
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> ddtrace-run python <your_app>.py | ||
``` | ||
|
||
**Note**: If the Agent is running on a custom host or port, set `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT` accordingly. | ||
|
||
##### If you are running LLM Observability in a serverless environment (AWS Lambda): | ||
1. Install the **Datadog-Python** and **Datadog-Extension** Lambda layers as part of your AWS Lambda setup. | ||
2. Enable LLM Observability by setting the following environment variables: | ||
|
||
```shell | ||
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> | ||
``` | ||
|
||
**Note**: In serverless environments, Datadog automatically flushes spans at the end of the Lambda function. | ||
|
||
##### Automatic Anthropic tracing | ||
|
||
The Anthropic integration provides automatic tracing for the Anthropic Python SDK's chat message calls. This captures latency, errors, input/output messages, and token usage for Anthropic operations. | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The following methods are traced for both synchronous and asynchronous Anthropic operations: | ||
- Chat messages (including streamed calls): `Anthropic().messages.create()`, `AsyncAnthropic().messages.create()` | ||
- Streamed chat messages: `Anthropic().messages.stream()`, `AsyncAnthropic().messages.stream()` | ||
|
||
No additional setup is required for these methods. | ||
|
||
##### Validation | ||
Validate that LLM Observability is properly capturing spans by checking your application logs for successful span creation. You can also run the following command to check the status of the `dd-trace` integration: | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```shell | ||
ddtrace-run --info | ||
``` | ||
|
||
Look for the following message to confirm the setup: | ||
|
||
```shell | ||
Agent error: None | ||
``` | ||
|
||
##### Debugging | ||
If you encounter issues during setup, enable debug logging by passing the `--debug` flag: | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```shell | ||
ddtrace-run --debug | ||
``` | ||
|
||
This displays any errors related to data transmission or instrumentation, including issues with Anthropic traces. | ||
|
||
<!-- xxz tab xxx --> | ||
<!-- xxz tabs xxx --> | ||
|
||
## Data Collected | ||
|
||
### Metrics | ||
|
||
See [metadata.csv][2] for a list of metrics provided by this integration. | ||
|
||
### Service Checks | ||
|
||
The Anthropic integration does not include any service checks. | ||
|
||
### Events | ||
|
||
The Anthropic integration does not include any events. | ||
|
||
## Troubleshooting | ||
|
||
Need help? Contact [Datadog support][3]. | ||
|
||
[1]: https://docs.datadoghq.com/integrations/anthropic/ | ||
[2]: https://github.com/DataDog/integrations-core/blob/main/anthropic/metadata.csv | ||
[3]: https://docs.datadoghq.com/help/ | ||
|
Empty file.
This file contains 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 @@ | ||
[] |
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains 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,41 @@ | ||
# Marketplace Media Carousel Guidelines | ||
|
||
## Using the media gallery | ||
|
||
Please upload images to use the media gallery. Integrations require a minimum of 3 images. Images should highlight your product, your integration, and a full image of the Datadog integration dashboard. The gallery | ||
can hold a maximum of 8 pieces of media total, and one of these pieces of media | ||
can be a video (guidelines and submission steps below). Images should be | ||
added to your /images directory and referenced in the manifest.json file. | ||
|
||
|
||
## Image and video requirements | ||
|
||
### Images | ||
|
||
``` | ||
File type : .jpg or .png | ||
File size : ~500 KB per image, with a max of 1 MB per image | ||
File dimensions : The image must be between 1440px and 2880px width, with a 16:9 aspect ratio (for example: 1440x810) | ||
File name : Use only letters, numbers, underscores, and hyphens | ||
Color mode : RGB | ||
Color profile : sRGB | ||
Description : 300 characters maximum | ||
``` | ||
|
||
### Video | ||
|
||
To display a video in your media gallery, please send our team the zipped file | ||
or a link to download the video at `marketplace@datadog.com`. In addition, | ||
please upload a thumbnail image for your video as a part of the pull request. | ||
Once approved, we will upload the file to Vimeo and provide you with the | ||
vimeo_id to add to your manifest.json file. Please note that the gallery can | ||
only hold one video. | ||
|
||
``` | ||
File type : MP4 H.264 | ||
File size : Max 1 video; 1 GB maximum size | ||
File dimensions : The aspect ratio must be exactly 16:9, and the resolution must be 1920x1080 or higher | ||
File name : partnerName-appName.mp4 | ||
Run time : Recommendation of 60 seconds or less | ||
Description : 300 characters maximum | ||
``` |
This file contains 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,49 @@ | ||
{ | ||
"manifest_version": "2.0.0", | ||
"app_uuid": "53fe7c3e-57eb-42ca-8e43-ec92c04b6160", | ||
"app_id": "anthropic", | ||
"display_on_public_website": true, | ||
"tile": { | ||
"overview": "README.md#Overview", | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"configuration": "README.md#Setup", | ||
"support": "README.md#Support", | ||
"changelog": "CHANGELOG.md", | ||
"description": "Optimize Anthropic usage: cost estimates, prompt sampling and performance metrics.", | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"title": "Anthropic", | ||
"media": [], | ||
"classifier_tags": [ | ||
"Category::AI/ML", | ||
"Category::Metrics", | ||
"Category::Cost Management", | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Submitted Data Type::Traces", | ||
"Supported OS::Linux", | ||
"Supported OS::Windows", | ||
"Supported OS::macOS", | ||
"Offering::Integration" | ||
] | ||
}, | ||
"assets": { | ||
"integration": { | ||
"auto_install": false, | ||
"source_type_id": 31102434, | ||
"source_type_name": "Anthropic", | ||
"events": { | ||
"creates_events": false | ||
}, | ||
"metrics": { | ||
"prefix": "anthropic.", | ||
"check": [], | ||
"metadata_path": "metadata.csv" | ||
}, | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"service_checks": { | ||
"metadata_path": "assets/service_checks.json" | ||
} | ||
} | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"author": { | ||
"support_email": "help@datadoghq.com", | ||
"name": "Datadog", | ||
"homepage": "https://www.datadoghq.com", | ||
"sales_email": "info@datadoghq.com" | ||
} | ||
} |
This file contains 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 @@ | ||
metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags | ||
yahya-mouman marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
To me, this reads as if Anthropic is the one doing the monitoring, troubleshooting, and evaluating. Should this be reworded to emphasize that the integration is for monitoring Anthropic-based LLM applications?
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.
Feel free to propose a rewording and let's have our PM @barieom validate it.
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.
@barieom Do you agree with this? If you don't think it's an issue, we can leave it as-is. My overall recommendation is to reword the sentence. For example:
This makes it clear that it's the integration (and thus implying that Datadog is involved) that helps monitor your LLM applications.
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.
yes that works!