datadog-mcp 1.0.10 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +21 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Datadog MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://sonarcloud.io/summary/new_code?id=TANTIOPE_datadog-mcp-server)
|
|
4
|
-
[](https://github.com/tantiope/datadog-mcp-server/actions/workflows/
|
|
4
|
+
[](https://github.com/tantiope/datadog-mcp-server/actions/workflows/release.yml)
|
|
5
5
|
[](https://www.npmjs.com/package/datadog-mcp)
|
|
6
6
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
7
|
[](https://sonarcloud.io/summary/new_code?id=TANTIOPE_datadog-mcp-server)
|
package/dist/index.js
CHANGED
|
@@ -384,7 +384,9 @@ var InputSchema = {
|
|
|
384
384
|
query: z2.string().optional().describe("Search query (for search action)"),
|
|
385
385
|
name: z2.string().optional().describe("Filter by name (for list action)"),
|
|
386
386
|
tags: z2.array(z2.string()).optional().describe("Filter by tags"),
|
|
387
|
-
groupStates: z2.array(z2.string()).optional().describe(
|
|
387
|
+
groupStates: z2.array(z2.string()).optional().describe(
|
|
388
|
+
"Filter multi-alert monitors by group states (e.g., alert by host). Does NOT filter by overall monitor status. Values: alert, warn, no data, ok"
|
|
389
|
+
),
|
|
388
390
|
limit: z2.number().optional().describe("Maximum number of monitors to return"),
|
|
389
391
|
config: z2.record(z2.unknown()).optional().describe("Monitor configuration (for create/update)"),
|
|
390
392
|
message: z2.string().optional().describe("Mute message (for mute action)"),
|
|
@@ -1395,6 +1397,8 @@ function formatSpan(span) {
|
|
|
1395
1397
|
const tags = attrs.tags ?? [];
|
|
1396
1398
|
const nestedAttrs = attrs.attributes ?? {};
|
|
1397
1399
|
const custom = attrs.custom ?? {};
|
|
1400
|
+
const attrsError = attrs.error ?? {};
|
|
1401
|
+
const customError = custom.error ?? {};
|
|
1398
1402
|
const tagMap = {};
|
|
1399
1403
|
for (const tag of tags) {
|
|
1400
1404
|
const [key, value] = tag.split(":");
|
|
@@ -1410,13 +1414,13 @@ function formatSpan(span) {
|
|
|
1410
1414
|
} else if (typeof custom["duration"] === "number") {
|
|
1411
1415
|
durationNs = custom["duration"];
|
|
1412
1416
|
}
|
|
1413
|
-
const status =
|
|
1417
|
+
const status = attrs.status ?? custom["status"] ?? tagMap["status"] ?? "";
|
|
1414
1418
|
return {
|
|
1415
1419
|
traceId: attrs.traceId ?? "",
|
|
1416
1420
|
spanId: attrs.spanId ?? "",
|
|
1417
1421
|
service: attrs.service ?? "",
|
|
1418
1422
|
resource: attrs.resourceName ?? "",
|
|
1419
|
-
operation:
|
|
1423
|
+
operation: attrs.operationName ?? custom["operation_name"] ?? "",
|
|
1420
1424
|
type: attrs.type ?? "",
|
|
1421
1425
|
status,
|
|
1422
1426
|
duration: formatDurationNs(durationNs),
|
|
@@ -1427,8 +1431,8 @@ function formatSpan(span) {
|
|
|
1427
1431
|
url: tagMap["http.url"] ?? ""
|
|
1428
1432
|
},
|
|
1429
1433
|
error: {
|
|
1430
|
-
type: tagMap["error.type"] ?? "",
|
|
1431
|
-
message: tagMap["error.message"] ?? tagMap["error.msg"] ?? ""
|
|
1434
|
+
type: attrsError["type"] ?? customError["type"] ?? tagMap["error.type"] ?? "",
|
|
1435
|
+
message: customError["message"] ?? tagMap["error.message"] ?? tagMap["error.msg"] ?? ""
|
|
1432
1436
|
},
|
|
1433
1437
|
env: attrs.env ?? tagMap["env"] ?? "",
|
|
1434
1438
|
tags
|
|
@@ -1626,7 +1630,7 @@ async function listApmServices(api, params, limits) {
|
|
|
1626
1630
|
const buckets = response.data ?? [];
|
|
1627
1631
|
const services = buckets.map((bucket) => ({
|
|
1628
1632
|
name: bucket.attributes?.by?.["service"] ?? "",
|
|
1629
|
-
spanCount: bucket.attributes?.
|
|
1633
|
+
spanCount: bucket.attributes?.compute?.["c0"] ?? 0
|
|
1630
1634
|
})).filter((s) => s.name !== "");
|
|
1631
1635
|
return {
|
|
1632
1636
|
services,
|