Skip to content

Commit 57da743

Browse files
Merge branch 'master' into domalessi/apm-basic-docs
Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents b04bda5 + 4efff92 commit 57da743

1,010 files changed

Lines changed: 91663 additions & 31612 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ hugo/config/ @DataDog/corpweb
99
hugo/package.json @DataDog/corpweb
1010
hugo/go.mod @DataDog/corpweb
1111
hugo/go.sum @DataDog/corpweb
12-
hugo/i18n/ @DataDog/corpweb
1312
hugo/archetypes/ @DataDog/corpweb
1413

1514
# Websites Platform
16-
astro/ @DataDog/WebOps-Platform
15+
astro/ @DataDog/WebOps-Platform
16+
shared/ @DataDog/WebOps-Platform
1717
hugo/babel.config.js @DataDog/WebOps-Platform
1818
hugo/data/reference/ @DataDog/WebOps-Platform
1919
datadog-ci.preview.json @DataDog/WebOps-Platform

.github/workflows/gif_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout code
2222
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2323
with:
24-
fetch-depth: 0
24+
fetch-depth: 1
2525
persist-credentials: false
2626

2727
# Branch Name Validation to be run prior to workflow

.vscode/markdown.code-snippets

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,27 @@
9191
"scope": "markdown",
9292
"prefix": ";;callout",
9393
"body": [
94-
"{{< callout url="#" btn_hidden=\"false\" header=\"Join the Preview!\">}}",
94+
"{{< callout url=\"#\" btn_hidden=\"false\" header=\"Join the Preview!\">}}",
9595
"<Product name> is in Preview. Use this form to submit your request today.",
9696
"{{< /callout >}}"
9797
],
9898
"description": "A callout with all parameters"
9999
},
100100

101+
"Skill callout": {
102+
"scope": "markdown",
103+
"prefix": ";;skill-callout",
104+
"body": [
105+
"{{< skill-callout",
106+
" title=\"${1:Set up APM with an agent}\"",
107+
" text=\"${2:Install the `dd-apm` skill in your AI coding agent for guided APM setup.}\"",
108+
" action_name=\"${3:copy_dd_apm_skill_install_cmd}\" >}}",
109+
"${4:npx skills add https://github.com/datadog-labs/agent-skills --skill dd-apm --full-depth -y}",
110+
"{{< /skill-callout >}}"
111+
],
112+
"description": "Agent skill install command callout"
113+
},
114+
101115
"Integration count": {
102116
"scope": "markdown",
103117
"prefix": ";;integration",

hugo/assets/scripts/build-api-pages.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,10 @@ const filterJson = (actionType, data, parentExample = null, requiredKeys = [], l
359359
}
360360
}
361361

362-
if(actionType === "request" && value.readOnly) {
363-
// skip
364-
} else if(actionType === "curl" && value.readOnly) {
365-
// skip
366-
} else {
362+
const shouldSkip = ((actionType === "request" || actionType === "curl") && value.readOnly)
363+
|| (actionType === "response" && value.writeOnly);
364+
365+
if(!shouldSkip) {
367366

368367
let prefixType = '';
369368
let suffixType = '';
@@ -978,6 +977,10 @@ const rowRecursive = (tableType, data, isNested, requiredFields=[], level = 0, p
978977
if (typeof data === 'object') {
979978
Object.entries(data).forEach(([key, value]) => {
980979

980+
if(tableType === "response" && value.writeOnly) {
981+
return;
982+
}
983+
981984
// calculate child data in advance
982985
// we do this here so that we can add classes to html with this knowledge
983986
let childData = null;

hugo/assets/scripts/tests/build-api-pages.test.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,31 @@ describe(`filterExampleJson`, () => {
929929
expect(actual).toEqual(expected);
930930
});
931931

932+
it('should hide writeonly fields on response json', () => {
933+
const mockSchema = {
934+
"description": "This is a test with writeonly",
935+
"properties": {
936+
"secret": {
937+
"description": "This is a write only field",
938+
"writeOnly": true,
939+
"type": "string"
940+
},
941+
"metric": {
942+
"description": "This is explicitly not writeonly",
943+
"writeOnly": false,
944+
"type": "string"
945+
},
946+
"length": {
947+
"description": "This is implicitly by omission not writeonly",
948+
"type": "string"
949+
}
950+
}
951+
};
952+
const actual = bp.filterExampleJson('response', mockSchema);
953+
const expected = {'metric':'string', 'length': 'string'};
954+
expect(actual).toEqual(expected);
955+
});
956+
932957
it('should show boolean without quotes', () => {
933958
const mockSchema = {
934959
"description": "A dashboard is Datadog’s tool for visually tracking, analyzing, and displaying\nkey performance metrics, which enable you to monitor the health of your infrastructure.",
@@ -2615,6 +2640,25 @@ describe(`descColumn`, () => {
26152640

26162641
describe(`rowRecursive`, () => {
26172642

2643+
it('should hide writeonly fields in response models', () => {
2644+
const mockData = {
2645+
"secretField": {
2646+
"type": "string",
2647+
"writeOnly": true
2648+
},
2649+
"visibleField": {
2650+
"type": "string"
2651+
}
2652+
};
2653+
2654+
const response = bp.rowRecursive("response", mockData, false);
2655+
const request = bp.rowRecursive("request", mockData, false);
2656+
2657+
expect(response).not.toContain('secretField');
2658+
expect(response).toContain('visibleField');
2659+
expect(request).toContain('secretField');
2660+
});
2661+
26182662
it('should handle fields named required (properties->required)', () => {
26192663
/*
26202664
Required fields are usually an array of string e.g ['foo'.'bar']
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// Bordered card promoting an agent skill install command.
2+
// Markup lives in layouts/shortcodes/skill-callout.html.
3+
//
4+
// The command inside the card is an ordinary highlighted shell block, so it
5+
// inherits the site's code block styling and hover copy button from
6+
// pages/_global.scss. Only the card around it is styled here.
7+
//
8+
// Class names are full BEM so they survive the eventual port to the Astro
9+
// site, which pairs each component with a BEM-named CSS module.
10+
11+
.skill-callout {
12+
margin: 0 0 30px;
13+
padding: 20px 22px 22px;
14+
border: 1px solid #e4e2ee;
15+
border-radius: 8px;
16+
background: #fff;
17+
// Same purple-tinted shadow the tooltip uses, so the card lifts off the
18+
// page without introducing a new shadow value.
19+
box-shadow: 0 4px 15px rgba($ddpurple, 0.1), 0 2px 5px rgba($ddpurple, 0.08);
20+
21+
// Body copy in the card matches the site's paragraph scale (18px/27px in
22+
// pages/_global.scss) so the card reads as part of the page rather than as
23+
// a shrunken aside. The heading is set apart by weight, not size.
24+
&__text {
25+
margin: 0 0 16px;
26+
max-width: 60ch;
27+
color: #5c5c72;
28+
font-size: 18px;
29+
line-height: 27px;
30+
31+
p {
32+
margin: 0;
33+
font-size: inherit;
34+
line-height: inherit;
35+
color: inherit;
36+
}
37+
38+
// Inline code reads as a tinted pill so a skill name such as `dd-apm`
39+
// stands out from the surrounding prose. Sizing follows the site's
40+
// inline code; only the tint differs.
41+
code {
42+
padding: 0 5px;
43+
border-radius: 4px;
44+
background: #f1eafb;
45+
color: #5a2a94;
46+
font-size: 14px;
47+
}
48+
}
49+
}
50+
51+
// `.main p` in pages/_global.scss sets the paragraph scale and outranks a flat
52+
// BEM class, so the heading needs the element qualifier to set its own size.
53+
p.skill-callout__title {
54+
margin: 0 0 6px;
55+
color: #1b1b2e;
56+
font-size: 18px;
57+
font-weight: 600;
58+
line-height: 27px;
59+
}
60+
61+
// `.main pre` in pages/_global.scss adds a 24px bottom margin meant to separate
62+
// consecutive code blocks. The card's own padding provides that spacing here,
63+
// so the margin would read as dead space. Needs the element qualifier to match
64+
// that rule's specificity.
65+
.skill-callout__command pre {
66+
margin: 0;
67+
}
68+
69+
@media (max-width: 575px) {
70+
.skill-callout {
71+
padding: 16px 16px 18px;
72+
}
73+
}

hugo/assets/styles/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ $baseImgURL: '{{.Site.Params.img_url}}';
6969
@import 'components/expression-language';
7070
@import 'components/ddsql-schema';
7171
@import 'components/admonitions';
72+
@import 'components/skill-callout'; // Skill callout shortcode styles
7273
@import 'components/metrics-table';
7374

7475
@import 'components/main-nav'; // imported from websites-modules

hugo/config/_default/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ module:
146146
target: assets
147147
- source: assets
148148
target: assets
149-
- source: i18n
149+
- source: ../shared/i18n
150150
target: i18n
151151
- source: archetypes
152152
target: archetypes

hugo/config/_default/menus/api.en.yaml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6277,6 +6277,58 @@ menu:
62776277
- GetUsageSummaryAvailableFields
62786278
unstable: []
62796279
order: 13
6280+
- name: Update a usage quota
6281+
url: /api/latest/usage-metering/update-a-usage-quota/
6282+
identifier: usage-metering-update-a-usage-quota
6283+
parent: usage-metering
6284+
generated: true
6285+
params:
6286+
versions:
6287+
- v2
6288+
operationids:
6289+
- UpdateQuota
6290+
unstable:
6291+
- v2
6292+
order: 16
6293+
- name: Delete a usage quota
6294+
url: /api/latest/usage-metering/delete-a-usage-quota/
6295+
identifier: usage-metering-delete-a-usage-quota
6296+
parent: usage-metering
6297+
generated: true
6298+
params:
6299+
versions:
6300+
- v2
6301+
operationids:
6302+
- DeleteQuota
6303+
unstable:
6304+
- v2
6305+
order: 17
6306+
- name: Create or update usage quotas
6307+
url: /api/latest/usage-metering/create-or-update-usage-quotas/
6308+
identifier: usage-metering-create-or-update-usage-quotas
6309+
parent: usage-metering
6310+
generated: true
6311+
params:
6312+
versions:
6313+
- v2
6314+
operationids:
6315+
- CreateQuotas
6316+
unstable:
6317+
- v2
6318+
order: 15
6319+
- name: List usage quotas
6320+
url: /api/latest/usage-metering/list-usage-quotas/
6321+
identifier: usage-metering-list-usage-quotas
6322+
parent: usage-metering
6323+
generated: true
6324+
params:
6325+
versions:
6326+
- v2
6327+
operationids:
6328+
- ListQuotas
6329+
unstable:
6330+
- v2
6331+
order: 14
62806332
- name: Get projected cost across your account
62816333
url: /api/latest/usage-metering/get-projected-cost-across-your-account/
62826334
identifier: usage-metering-get-projected-cost-across-your-account
@@ -8428,6 +8480,19 @@ menu:
84288480
unstable:
84298481
- v2
84308482
order: 28
8483+
- name: Get an annotated queue interaction
8484+
url: /api/latest/agent-observability/get-an-annotated-queue-interaction/
8485+
identifier: agent-observability-get-an-annotated-queue-interaction
8486+
parent: agent-observability
8487+
generated: true
8488+
params:
8489+
versions:
8490+
- v2
8491+
operationids:
8492+
- GetLLMObsAnnotatedInteraction
8493+
unstable:
8494+
- v2
8495+
order: 73
84318496
- name: Get annotated queue interactions
84328497
url: /api/latest/agent-observability/get-annotated-queue-interactions/
84338498
identifier: agent-observability-get-annotated-queue-interactions
@@ -17862,6 +17927,23 @@ menu:
1786217927
- SubmitProductAnalyticsEvent
1786317928
unstable: []
1786417929
order: 1
17930+
- name: Product Catalog
17931+
url: /api/latest/product-catalog/
17932+
identifier: product-catalog
17933+
generated: true
17934+
- name: List SKUs
17935+
url: /api/latest/product-catalog/list-skus/
17936+
identifier: product-catalog-list-skus
17937+
parent: product-catalog
17938+
generated: true
17939+
params:
17940+
versions:
17941+
- v2
17942+
operationids:
17943+
- ListProductCatalogSKUs
17944+
unstable:
17945+
- v2
17946+
order: 1
1786517947
- name: RUM
1786617948
url: /api/latest/rum/
1786717949
identifier: rum
@@ -22214,6 +22296,23 @@ menu:
2221422296
- UpdateFlakyTestsManagementPolicies
2221522297
unstable: []
2221622298
order: 7
22299+
- name: Threat Intelligence
22300+
url: /api/latest/threat-intelligence/
22301+
identifier: threat-intelligence
22302+
generated: true
22303+
- name: Ingest STIX threat intelligence
22304+
url: /api/latest/threat-intelligence/ingest-stix-threat-intelligence/
22305+
identifier: threat-intelligence-ingest-stix-threat-intelligence
22306+
parent: threat-intelligence
22307+
generated: true
22308+
params:
22309+
versions:
22310+
- v2
22311+
operationids:
22312+
- AddSTIXThreatIntel
22313+
unstable:
22314+
- v2
22315+
order: 1
2221722316
- name: Twilio Integration Accounts
2221822317
url: /api/latest/twilio-integration-accounts/
2221922318
identifier: twilio-integration-accounts

0 commit comments

Comments
 (0)