datadog-mcp 1.0.8 → 1.0.10
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/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -905,7 +905,7 @@ var InputSchema3 = {
|
|
|
905
905
|
"Sampling mode: first (chronological, default), spread (evenly across time range), diverse (distinct message patterns)"
|
|
906
906
|
),
|
|
907
907
|
compact: z4.boolean().optional().describe(
|
|
908
|
-
"Strip custom attributes for token efficiency. Keeps: id, timestamp, service, status, message (truncated), dd.trace_id, error info"
|
|
908
|
+
"Strip custom attributes for token efficiency. Keeps: id, timestamp, service, host, status, message (truncated), dd.trace_id, dd.span_id, pod_name, kube_namespace, kube_container_name, error info"
|
|
909
909
|
),
|
|
910
910
|
groupBy: z4.array(z4.string()).optional().describe("Fields to group by (for aggregate)"),
|
|
911
911
|
compute: z4.record(z4.unknown()).optional().describe("Compute operations (for aggregate)")
|
|
@@ -931,6 +931,14 @@ function formatLog(log) {
|
|
|
931
931
|
function formatLogCompact(log) {
|
|
932
932
|
const attrs = log.attributes ?? {};
|
|
933
933
|
const nestedAttrs = attrs.attributes ?? {};
|
|
934
|
+
const tags = attrs.tags ?? [];
|
|
935
|
+
const findTagValue = (tagPrefix) => {
|
|
936
|
+
const tag = tags.find((t) => t.startsWith(tagPrefix + ":"));
|
|
937
|
+
return tag ? tag.substring(tagPrefix.length + 1) : "";
|
|
938
|
+
};
|
|
939
|
+
const podName = findTagValue("pod_name");
|
|
940
|
+
const namespace = findTagValue("kube_namespace");
|
|
941
|
+
const container = findTagValue("kube_container_name");
|
|
934
942
|
let timestamp = "";
|
|
935
943
|
if (attrs.timestamp) {
|
|
936
944
|
const ts = attrs.timestamp;
|
|
@@ -953,6 +961,9 @@ function formatLogCompact(log) {
|
|
|
953
961
|
traceId,
|
|
954
962
|
spanId
|
|
955
963
|
};
|
|
964
|
+
if (podName) entry.podName = podName;
|
|
965
|
+
if (namespace) entry.namespace = namespace;
|
|
966
|
+
if (container) entry.container = container;
|
|
956
967
|
if (errorType || errorMessage) {
|
|
957
968
|
entry.error = {
|
|
958
969
|
type: errorType,
|