Skip to content

Commit 5479afd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 081afac of spec repo
1 parent 7465a34 commit 5479afd

8 files changed

Lines changed: 496 additions & 44 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42828,6 +42828,9 @@ components:
4282842828
description: Attributes of the SPA Recommendation resource. Contains recommendations
4282942829
for both driver and executor components.
4283042830
properties:
42831+
confidence_level:
42832+
format: double
42833+
type: number
4283142834
driver:
4283242835
$ref: '#/components/schemas/ComponentRecommendation'
4283342836
executor:
@@ -86625,13 +86628,79 @@ paths:
8662586628
x-unstable: '**Note**: This feature is in private beta. To request access, use
8662686629
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
8662786630
docs.'
86628-
/api/v2/spa/recommendations/{service}/{shard}:
86631+
/api/v2/spa/recommendations/{service}:
8662986632
get:
86630-
description: Retrieve resource recommendations for a Spark job. The caller (Spark
86631-
Gateway or DJM UI) provides a service name and shard identifier, and SPA returns
86632-
structured recommendations for driver and executor resources.
86633+
description: This endpoint is currently experimental and restricted to Datadog
86634+
internal use only. Retrieve resource recommendations for a Spark job. The
86635+
caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured
86636+
recommendations for driver and executor resources. The version with a shard
86637+
should be preferred, where possible, as it gives more accurate results.
8663386638
operationId: GetSPARecommendations
8663486639
parameters:
86640+
- description: The recommendation service should not use its metrics cache.
86641+
in: query
86642+
name: bypass_cache
86643+
schema:
86644+
type: string
86645+
- description: The service name for a spark job.
86646+
in: path
86647+
name: service
86648+
required: true
86649+
schema:
86650+
type: string
86651+
responses:
86652+
'200':
86653+
content:
86654+
application/json:
86655+
example:
86656+
data:
86657+
attributes:
86658+
driver:
86659+
estimation:
86660+
cpu:
86661+
max: 1500
86662+
p75: 1000
86663+
p95: 1200
86664+
ephemeral_storage: 896
86665+
heap: 6144
86666+
memory: 7168
86667+
overhead: 1024
86668+
executor:
86669+
estimation:
86670+
cpu:
86671+
max: 2000
86672+
p75: 1200
86673+
p95: 1500
86674+
ephemeral_storage: 512
86675+
heap: 3072
86676+
memory: 4096
86677+
overhead: 1024
86678+
id: dedupeactivecontexts:adp_dedupeactivecontexts_org2
86679+
type: recommendation
86680+
schema:
86681+
$ref: '#/components/schemas/RecommendationDocument'
86682+
description: OK
86683+
'400':
86684+
$ref: '#/components/responses/BadRequestResponse'
86685+
'403':
86686+
$ref: '#/components/responses/NotAuthorizedResponse'
86687+
'429':
86688+
$ref: '#/components/responses/TooManyRequestsResponse'
86689+
security:
86690+
- AuthZ: []
86691+
summary: Get SPA Recommendations
86692+
tags:
86693+
- Spa
86694+
x-unstable: '**Note**: This endpoint is in preview and may change in the future.
86695+
It is not yet recommended for production use.'
86696+
/api/v2/spa/recommendations/{service}/{shard}:
86697+
get:
86698+
description: This endpoint is currently experimental and restricted to Datadog
86699+
internal use only. Retrieve resource recommendations for a Spark job. The
86700+
caller (Spark Gateway or DJM UI) provides a service name and shard identifier,
86701+
and SPA returns structured recommendations for driver and executor resources.
86702+
operationId: GetSPARecommendationsWithShard
86703+
parameters:
8663586704
- description: The shard tag for a spark job, which differentiates jobs within
8663686705
the same service that have different resource needs
8663786706
in: path
@@ -86645,6 +86714,11 @@ paths:
8664586714
required: true
8664686715
schema:
8664786716
type: string
86717+
- description: The recommendation service should not use its metrics cache.
86718+
in: query
86719+
name: bypass_cache
86720+
schema:
86721+
type: string
8664886722
responses:
8664986723
'200':
8665086724
content:
@@ -86683,11 +86757,13 @@ paths:
8668386757
$ref: '#/components/responses/NotAuthorizedResponse'
8668486758
'429':
8668586759
$ref: '#/components/responses/TooManyRequestsResponse'
86686-
summary: Get SPA Recommendations
86760+
security:
86761+
- AuthZ: []
86762+
summary: Get SPA Recommendations with a shard parameter
8668786763
tags:
8668886764
- Spa
86689-
x-unstable: '**Note**: This endpoint is in public beta and may change in the
86690-
future. It is not yet recommended for production use.'
86765+
x-unstable: '**Note**: This endpoint is in preview and may change in the future.
86766+
It is not yet recommended for production use.'
8669186767
/api/v2/spans/analytics/aggregate:
8669286768
post:
8669386769
description: 'The API endpoint to aggregate spans into buckets and compute metrics

examples/v2/spa/GetSPARecommendations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static void main(String[] args) {
1212
SpaApi apiInstance = new SpaApi(defaultClient);
1313

1414
try {
15-
RecommendationDocument result = apiInstance.getSPARecommendations("shard", "service");
15+
RecommendationDocument result = apiInstance.getSPARecommendations("service");
1616
System.out.println(result);
1717
} catch (ApiException e) {
1818
System.err.println("Exception when calling SpaApi#getSPARecommendations");
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get SPA Recommendations with a shard parameter returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.SpaApi;
6+
import com.datadog.api.client.v2.model.RecommendationDocument;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getSPARecommendationsWithShard", true);
12+
SpaApi apiInstance = new SpaApi(defaultClient);
13+
14+
try {
15+
RecommendationDocument result =
16+
apiInstance.getSPARecommendationsWithShard("shard", "service");
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling SpaApi#getSPARecommendationsWithShard");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ public class ApiClient {
901901
put("v2.getSLOReport", false);
902902
put("v2.getSLOReportJobStatus", false);
903903
put("v2.getSPARecommendations", false);
904+
put("v2.getSPARecommendationsWithShard", false);
904905
put("v2.createSCAResolveVulnerableSymbols", false);
905906
put("v2.createSCAResult", false);
906907
put("v2.addMemberTeam", false);

0 commit comments

Comments
 (0)