Skip to content

Commit 4b842eb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 23cdfee of spec repo
1 parent e57d6bf commit 4b842eb

23 files changed

+1027
-2
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "4413e63",
3-
"generated": "2025-08-19 20:28:35.046"
2+
"spec_repo_commit": "23cdfee",
3+
"generated": "2025-08-22 13:44:15.082"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9284,6 +9284,15 @@ components:
92849284
that evaluates to a boolean.
92859285
example: ${true}
92869286
type: string
9287+
ComponentRecommendation:
9288+
description: Resource recommendation for a single Spark component (driver or
9289+
executor). Contains estimation data used to patch Spark job specs.
9290+
properties:
9291+
estimation:
9292+
$ref: '#/components/schemas/Estimation'
9293+
required:
9294+
- estimation
9295+
type: object
92879296
ComponentType:
92889297
description: The UI component type.
92899298
enum:
@@ -10480,6 +10489,28 @@ components:
1048010489
type: string
1048110490
x-enum-varnames:
1048210491
- COST_BY_ORG
10492+
Cpu:
10493+
description: CPU usage statistics derived from historical Spark job metrics.
10494+
Provides multiple estimates so users can choose between conservative and cost-saving
10495+
risk profiles.
10496+
properties:
10497+
max:
10498+
description: Maximum CPU usage observed for the job, expressed in millicores.
10499+
This represents the upper bound of usage.
10500+
format: int64
10501+
type: integer
10502+
p75:
10503+
description: 75th percentile of CPU usage (millicores). Represents a cost-saving
10504+
configuration while covering most workloads.
10505+
format: int64
10506+
type: integer
10507+
p95:
10508+
description: 95th percentile of CPU usage (millicores). Balances performance
10509+
and cost, providing a safer margin than p75.
10510+
format: int64
10511+
type: integer
10512+
type: object
10513+
x-model-simple-name: SpaCpu
1048310514
CreateActionConnectionRequest:
1048410515
description: Request used to create an action connection.
1048510516
properties:
@@ -15937,6 +15968,33 @@ components:
1593715968
type: string
1593815969
x-enum-varnames:
1593915970
- ESCALATION_POLICY_STEPS
15971+
Estimation:
15972+
description: Recommended resource values for a Spark driver or executor, derived
15973+
from recent real usage metrics. Used by SPA to propose more efficient pod
15974+
sizing.
15975+
properties:
15976+
cpu:
15977+
$ref: '#/components/schemas/Cpu'
15978+
ephemeral_storage:
15979+
description: Recommended ephemeral storage allocation (in MiB). Derived
15980+
from job temporary storage patterns.
15981+
format: int64
15982+
type: integer
15983+
heap:
15984+
description: Recommended JVM heap size (in MiB).
15985+
format: int64
15986+
type: integer
15987+
memory:
15988+
description: Recommended total memory allocation (in MiB). Includes both
15989+
heap and overhead.
15990+
format: int64
15991+
type: integer
15992+
overhead:
15993+
description: Recommended JVM overhead (in MiB). Computed as total memory
15994+
- heap.
15995+
format: int64
15996+
type: integer
15997+
type: object
1594015998
Event:
1594115999
description: The metadata associated with a request.
1594216000
properties:
@@ -32835,6 +32893,52 @@ components:
3283532893
x-enum-varnames:
3283632894
- ANY
3283732895
- ALL
32896+
RecommendationAttributes:
32897+
description: Attributes of the SPA Recommendation resource. Contains recommendations
32898+
for both driver and executor components.
32899+
properties:
32900+
driver:
32901+
$ref: '#/components/schemas/ComponentRecommendation'
32902+
executor:
32903+
$ref: '#/components/schemas/ComponentRecommendation'
32904+
required:
32905+
- driver
32906+
- executor
32907+
type: object
32908+
RecommendationData:
32909+
description: JSON:API resource object for SPA Recommendation. Includes type,
32910+
optional ID, and resource attributes with structured recommendations.
32911+
properties:
32912+
attributes:
32913+
$ref: '#/components/schemas/RecommendationAttributes'
32914+
id:
32915+
description: Resource identifier for the recommendation. Optional in responses.
32916+
type: string
32917+
type:
32918+
$ref: '#/components/schemas/RecommendationType'
32919+
required:
32920+
- type
32921+
- attributes
32922+
type: object
32923+
RecommendationDocument:
32924+
description: JSON:API document containing a single Recommendation resource.
32925+
Returned by SPA when the Spark Gateway requests recommendations.
32926+
properties:
32927+
data:
32928+
$ref: '#/components/schemas/RecommendationData'
32929+
required:
32930+
- data
32931+
type: object
32932+
RecommendationType:
32933+
default: recommendation
32934+
description: JSON:API resource type for Spark Pod Autosizing recommendations.
32935+
Identifies the Recommendation resource returned by SPA.
32936+
enum:
32937+
- recommendation
32938+
example: recommendation
32939+
type: string
32940+
x-enum-varnames:
32941+
- RECOMMENDATION
3283832942
RegisterAppKeyResponse:
3283932943
description: The response object after creating an app key registration.
3284032944
properties:
@@ -65710,6 +65814,69 @@ paths:
6571065814
x-unstable: '**Note**: This feature is in private beta. To request access, use
6571165815
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
6571265816
docs.'
65817+
/api/v2/spa/recommendations/{service}/{shard}:
65818+
get:
65819+
description: Retrieve resource recommendations for a Spark job. The caller (Spark
65820+
Gateway or DJM UI) provides a service name and shard identifier, and SPA returns
65821+
structured recommendations for driver and executor resources.
65822+
operationId: GetSPARecommendations
65823+
parameters:
65824+
- description: The shard tag for a spark job, which differentiates jobs within
65825+
the same service that have different resource needs
65826+
in: path
65827+
name: shard
65828+
required: true
65829+
schema:
65830+
type: string
65831+
- description: The service name for a spark job
65832+
in: path
65833+
name: service
65834+
required: true
65835+
schema:
65836+
type: string
65837+
responses:
65838+
'200':
65839+
content:
65840+
application/json:
65841+
example:
65842+
data:
65843+
attributes:
65844+
driver:
65845+
estimation:
65846+
cpu:
65847+
max: 1500
65848+
p75: 1000
65849+
p95: 1200
65850+
ephemeral_storage: 896
65851+
heap: 6144
65852+
memory: 7168
65853+
overhead: 1024
65854+
executor:
65855+
estimation:
65856+
cpu:
65857+
max: 2000
65858+
p75: 1200
65859+
p95: 1500
65860+
ephemeral_storage: 512
65861+
heap: 3072
65862+
memory: 4096
65863+
overhead: 1024
65864+
id: dedupeactivecontexts:adp_dedupeactivecontexts_org2
65865+
type: recommendation
65866+
schema:
65867+
$ref: '#/components/schemas/RecommendationDocument'
65868+
description: OK
65869+
'400':
65870+
$ref: '#/components/responses/BadRequestResponse'
65871+
'403':
65872+
$ref: '#/components/responses/NotAuthorizedResponse'
65873+
'429':
65874+
$ref: '#/components/responses/TooManyRequestsResponse'
65875+
summary: Get SPA Recommendations
65876+
tags:
65877+
- Spa
65878+
x-unstable: '**Note**: This endpoint is in public beta and may change in the
65879+
future. It is not yet recommended for production use.'
6571365880
/api/v2/spans/analytics/aggregate:
6571465881
post:
6571565882
description: 'The API endpoint to aggregate spans into buckets and compute metrics
@@ -69127,6 +69294,9 @@ tags:
6912769294
externalDocs:
6912869295
url: https://docs.datadoghq.com/service_catalog/service_definitions#metadata-schema-v30-beta
6912969296
name: Software Catalog
69297+
- description: SPA (Spark Pod Autosizing) API. Provides resource recommendations and
69298+
cost insights to help optimize Spark job configurations.
69299+
name: Spa
6913069300
- description: Search and aggregate your spans from your Datadog platform over HTTP.
6913169301
name: Spans
6913269302
- description: Manage configuration of [span-based metrics](https://app.datadoghq.com/apm/traces/generate-metrics)

features/v2/spa.feature

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
@endpoint(spa) @endpoint(spa-v2)
2+
Feature: Spa
3+
SPA (Spark Pod Autosizing) API. Provides resource recommendations and cost
4+
insights to help optimize Spark job configurations.
5+
6+
Background:
7+
Given a valid "apiKeyAuth" key in the system
8+
And a valid "appKeyAuth" key in the system
9+
And an instance of "Spa" API
10+
And operation "GetSPARecommendations" enabled
11+
And new "GetSPARecommendations" request
12+
13+
@generated @skip @team:DataDog/data-and-analytics-processing
14+
Scenario: Get SPA Recommendations returns "Bad Request" response
15+
Given request contains "shard" parameter from "REPLACE.ME"
16+
And request contains "service" parameter from "REPLACE.ME"
17+
When the request is sent
18+
Then the response status is 400 Bad Request
19+
20+
@generated @skip @team:DataDog/data-and-analytics-processing
21+
Scenario: Get SPA Recommendations returns "OK" response
22+
Given request contains "shard" parameter from "REPLACE.ME"
23+
And request contains "service" parameter from "REPLACE.ME"
24+
When the request is sent
25+
Then the response status is 200 OK
26+
27+
@skip @team:DataDog/data-and-analytics-processing
28+
Scenario: GetSPARecommendations returns a JSON:API Recommendation with driver and executor estimations
29+
Given request contains "service" parameter with value "dedupeactivecontexts"
30+
And request contains "shard" parameter with value "adp_dedupeactivecontexts_org2"
31+
When the request is sent
32+
Then the response status is 404 Not Found
33+
And the response "data.type" is equal to "recommendation"
34+
And the response "data" has field "attributes"
35+
And the response "data.attributes" has field "driver"
36+
And the response "data.attributes" has field "executor"
37+
And the response "data.attributes.driver" has field "estimation"
38+
And the response "data.attributes.driver.estimation" has field "cpu"
39+
And the response "data.attributes.driver.estimation" has field "memory"
40+
And the response "data.attributes.driver.estimation" has field "ephemeral_storage"
41+
And the response "data.attributes.driver.estimation" has field "heap"
42+
And the response "data.attributes.driver.estimation" has field "overhead"
43+
And the response "data.attributes.driver.estimation.cpu" has field "max"
44+
And the response "data.attributes.driver.estimation.cpu" has field "p95"
45+
And the response "data.attributes.driver.estimation.cpu" has field "p75"
46+
And the response "data.attributes.executor" has field "estimation"
47+
And the response "data.attributes.executor.estimation" has field "cpu"
48+
And the response "data.attributes.executor.estimation" has field "memory"
49+
And the response "data.attributes.executor.estimation" has field "ephemeral_storage"
50+
And the response "data.attributes.executor.estimation" has field "heap"
51+
And the response "data.attributes.executor.estimation" has field "overhead"
52+
And the response "data.attributes.executor.estimation.cpu" has field "max"
53+
And the response "data.attributes.executor.estimation.cpu" has field "p95"
54+
And the response "data.attributes.executor.estimation.cpu" has field "p75"

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3362,6 +3362,12 @@
33623362
"type": "safe"
33633363
}
33643364
},
3365+
"GetSPARecommendations": {
3366+
"tag": "Spa",
3367+
"undo": {
3368+
"type": "safe"
3369+
}
3370+
},
33653371
"AggregateSpans": {
33663372
"tag": "Spans",
33673373
"undo": {

packages/datadog-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ apiInstance
423423
| Slack Integration | @datadog/datadog-api-client-slack-integration | [README.md](../../services/slack-integration/README.md) |
424424
| Snapshots | @datadog/datadog-api-client-snapshots | [README.md](../../services/snapshots/README.md) |
425425
| Software Catalog | @datadog/datadog-api-client-software-catalog | [README.md](../../services/software-catalog/README.md) |
426+
| Spa | @datadog/datadog-api-client-spa | [README.md](../../services/spa/README.md) |
426427
| Spans | @datadog/datadog-api-client-spans | [README.md](../../services/spans/README.md) |
427428
| Spans Metrics | @datadog/datadog-api-client-spans-metrics | [README.md](../../services/spans-metrics/README.md) |
428429
| Synthetics | @datadog/datadog-api-client-synthetics | [README.md](../../services/synthetics/README.md) |

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7476,6 +7476,17 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
74767476
},
74777477
operationResponseType: "SLOReportStatusGetResponse",
74787478
},
7479+
"SpaApi.V2.GetSPARecommendations": {
7480+
shard: {
7481+
type: "string",
7482+
format: "",
7483+
},
7484+
service: {
7485+
type: "string",
7486+
format: "",
7487+
},
7488+
operationResponseType: "RecommendationDocument",
7489+
},
74797490
"SpansApi.V2.AggregateSpans": {
74807491
body: {
74817492
type: "SpansAggregateRequest",

services/spa/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

services/spa/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# @datadog/datadog-api-client-spa
2+
3+
## Description
4+
5+
SPA (Spark Pod Autosizing) API. Provides resource recommendations and cost insights to help optimize Spark job configurations.
6+
7+
## Navigation
8+
9+
- [Installation](#installation)
10+
- [Getting Started](#getting-started)
11+
12+
## Installation
13+
14+
```sh
15+
# NPM
16+
npm install @datadog/datadog-api-client-spa
17+
# Yarn
18+
yarn add @datadog/datadog-api-client-spa
19+
```
20+
21+
## Getting Started
22+
```ts
23+
import { createConfiguration } from "@datadog/datadog-api-client";
24+
import { SpaApiV2 } from "@datadog/datadog-api-client-spa";
25+
import { v2 } from "@datadog/datadog-api-client-spa";
26+
27+
const configuration = createConfiguration();
28+
// Enable unstable operations
29+
const configurationOpts = {
30+
unstableOperations: {
31+
"SpaApi.v2.getSPARecommendations": true
32+
}
33+
}
34+
35+
const configuration = createConfiguration(configurationOpts);
36+
const apiInstance = new SpaApiV2(configuration);
37+
const params = {/* parameters */};
38+
39+
apiInstance.getSPARecommendations(params).then((data) => {
40+
console.log("API called successfully. Returned data: " + JSON.stringify(data));
41+
}).catch((error) => {
42+
console.error("Error calling API: " + error);
43+
});
44+
```

0 commit comments

Comments
 (0)