Skip to content

Commit 8a4ee05

Browse files
[anthropic] Initial usage and costs manifest (DataDog#20931)
* [anthropic] Initial usage and costs manifest * update description * shorten description * sort the order of my csv which matters for some reason * validation * nonascii * labeller update * wouldnt it be funny if the validation just happened all at once * readme updates * Apply suggestions from code review Co-authored-by: Eva Parish <eva.parish@datadoghq.com> * make instructions more succinct * ascii char --------- Co-authored-by: Eva Parish <eva.parish@datadoghq.com>
1 parent 9b197fc commit 8a4ee05

8 files changed

Lines changed: 172 additions & 0 deletions

File tree

.github/workflows/config/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ integration/ambari:
5555
- ambari/**/*
5656
integration/anthropic:
5757
- anthropic/**/*
58+
integration/anthropic_usage_and_costs:
59+
- anthropic_usage_and_costs/**/*
5860
integration/anyscale:
5961
- anyscale/**/*
6062
integration/apache:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CHANGELOG - Anthropic Usage and Costs
2+
3+
## 1.0.0 / 2025-08-02
4+
5+
***Added***:
6+
7+
* Initial Release
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Anthropic Usage and Costs
2+
3+
## Overview
4+
5+
This integration provides Datadog users with comprehensive visibility into their Anthropic API usage and associated costs. By ingesting data from Anthropic's Admin usage and cost APIs, the integration enables organizations to:
6+
7+
- **Monitor LLM token consumption** (input, output, cache usage) in near real-time
8+
- **Track costs by model, workspace, and service tier**, supporting accurate attribution and budgeting
9+
- **Understand usage trends** across teams, API keys, or user identities to optimize model usage
10+
- **Set up alerting and dashboards** that highlight anomalies in usage or unexpected cost spikes
11+
12+
This integration is especially valuable for teams using Anthropic at scale who want to manage spend, understand product adoption, and ensure efficient use of AI resources-all within the familiar Datadog observability platform.
13+
14+
## Setup
15+
16+
To get started with the Anthropic Admin API integration in Datadog, follow the steps below:
17+
18+
### 1. Generate an Admin API Key
19+
20+
You will need an [Admin API key][5] from Anthropic. This key allows access to usage and cost reports across your organization.
21+
22+
1. Navigate to your organization's settings or reach out to your Anthropic account admin to create a new Admin API key.
23+
2. Copy the API key to a secure location.
24+
25+
### 2. Configure the Datadog Integration
26+
27+
1. In Datadog, go to [**Integrations > Anthropic**](https://app.datadoghq.com/integrations?integrationId=anthropic).
28+
2. In the configuration panel, provide the **Admin API Key** by pasting the key you generated from Anthropic.
29+
3. Click **Save Configuration**.
30+
31+
Once saved, Datadog will begin polling Anthropic usage and cost endpoints using this key and populate metrics in your environment.
32+
33+
## Data Collected
34+
35+
### Metrics
36+
37+
See [metadata.csv][4] for a list of metrics provided by this integration.
38+
39+
### Service Checks
40+
41+
Anthropic Usage and Costs does not include any service checks.
42+
43+
### Events
44+
45+
Anthropic Usage and Costs does not include any events.
46+
47+
## Troubleshooting
48+
49+
Need help? Contact [Datadog support][3].
50+
51+
[1]: https://www.anthropic.com/
52+
[2]: https://app.datadoghq.com/account/settings/agent/latest
53+
[3]: https://docs.datadoghq.com/help/
54+
[4]: https://github.com/DataDog/integrations-core/blob/master/anthropic_usage_and_costs/metadata.csv
55+
[5]: https://docs.anthropic.com/en/api/administration-api
56+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Marketplace Media Carousel Guidelines
2+
3+
## Using the media gallery
4+
5+
To use the media gallery, you must upload a minimum of one image. The gallery
6+
can hold a maximum of 8 pieces of media total, and one of these pieces of media
7+
can be a video (guidelines and submission steps below). Images should be
8+
added to your /images directory and referenced in the manifest.json file.
9+
10+
11+
## Image and video requirements
12+
13+
### Images
14+
15+
```
16+
File type : .jpg or .png
17+
File size : ~500 KB per image, with a max of 1 MB per image
18+
File dimensions : The aspect ratio must be 16:9 minimum, with these constraints:
19+
20+
Width: 1440px
21+
Min height: 810px
22+
Max height: 2560px
23+
24+
File name : Use only letters, numbers, underscores, and hyphens
25+
Color mode : RGB
26+
Color profile : sRGB
27+
Description : 300 characters maximum
28+
```
29+
30+
### Video
31+
32+
To display a video in your media gallery, please send our team the zipped file
33+
or a link to download the video at `marketplace@datadog.com`. In addition,
34+
please upload a thumbnail image for your video as a part of the pull request.
35+
Once approved, we will upload the file to Vimeo and provide you with the
36+
vimeo_id to add to your manifest.json file. Please note that the gallery can
37+
only hold one video.
38+
39+
```
40+
File type : MP4 H.264
41+
File size : Max 1 video; 1 GB maximum size
42+
File dimensions : The aspect ratio must be exactly 16:9, and the resolution must be 1920x1080 or higher
43+
File name : partnerName-appName.mp4
44+
Run time : Recommendation of 60 seconds or less
45+
Description : 300 characters maximum
46+
```
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"manifest_version": "2.0.0",
3+
"app_uuid": "96f960de-2b87-41ec-8d9a-88fe75e93dc9",
4+
"app_id": "anthropic-usage-and-costs",
5+
"display_on_public_website": false,
6+
"tile": {
7+
"overview": "README.md#Overview",
8+
"configuration": "README.md#Setup",
9+
"support": "README.md#Support",
10+
"changelog": "CHANGELOG.md",
11+
"description": "Enable Anthropic customers to monitor token consumption, track spend, and attribute usage directly within Datadog.",
12+
"title": "Anthropic Usage and Costs",
13+
"media": [],
14+
"classifier_tags": [
15+
"Category::AI/ML",
16+
"Category::Metrics",
17+
"Category::Cost Management",
18+
"Submitted Data Type::Metrics",
19+
"Supported OS::Linux",
20+
"Supported OS::Windows",
21+
"Supported OS::macOS",
22+
"Offering::Integration"
23+
]
24+
},
25+
"assets": {
26+
"integration": {
27+
"auto_install": false,
28+
"source_type_id": 54188605,
29+
"source_type_name": "Anthropic Usage and Costs",
30+
"events": {
31+
"creates_events": false
32+
},
33+
"metrics": {
34+
"prefix": "anthropic.",
35+
"check": [
36+
"anthropic.input_tokens",
37+
"anthropic.output_tokens"
38+
],
39+
"metadata_path": "metadata.csv"
40+
},
41+
"service_checks": {
42+
"metadata_path": "assets/service_checks.json"
43+
}
44+
}
45+
},
46+
"author": {
47+
"support_email": "help@datadoghq.com",
48+
"name": "Datadog",
49+
"homepage": "https://www.datadoghq.com",
50+
"sales_email": "info@datadoghq.com"
51+
},
52+
"oauth": {}
53+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric
2+
anthropic.cache_creation.ephemeral_1h_input_tokens,gauge,,token,,Input tokens used during ephemeral 1 hour cache creation.,0,anthropic_usage_and_costs,cache creation ephemeral 1h input tokens,
3+
anthropic.cache_creation.ephemeral_5m_input_tokens,gauge,,token,,Input tokens used during ephemeral 5 minute cache creation.,0,anthropic_usage_and_costs,cache creation ephemeral 5m input tokens,
4+
anthropic.cache_read_input_tokens,gauge,,token,,Input tokens retrieved from anthropic cache reads.,0,anthropic_usage_and_costs,cache read input tokens,
5+
anthropic.input_tokens,gauge,,token,,Number of input tokens used in a request to Anthropic.,0,anthropic_usage_and_costs,input tokens,
6+
anthropic.output_tokens,gauge,,token,,Number of output tokens generated in a response from Anthropic.,0,anthropic_usage_and_costs,output tokens,
7+
anthropic.server_tool_use.web_search_requests,count,,request,,Number of web search requests triggered by server tool use in Anthropic.,0,anthropic_usage_and_costs,server tool use web search requests,

ddev-12.0.0.pkg

3.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)