Skip to content

Commit 60d095d

Browse files
committed
feat: respect percall telemetry override
1 parent 7def860 commit 60d095d

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/main/java/dev/openfga/sdk/api/OpenFgaApi.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private CompletableFuture<ApiResponse<BatchCheckResponse>> batchCheck(
145145

146146
try {
147147
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
148-
return new HttpRequestAttempt<>(request, "batchCheck", BatchCheckResponse.class, apiClient, configuration, this.telemetry)
148+
return new HttpRequestAttempt<>(request, "batchCheck", BatchCheckResponse.class, apiClient, configuration, configuration.getTelemetry())
149149
.addTelemetryAttributes(telemetryAttributes)
150150
.attemptHttpRequest();
151151
} catch (ApiException e) {
@@ -201,7 +201,7 @@ private CompletableFuture<ApiResponse<CheckResponse>> check(
201201

202202
try {
203203
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
204-
return new HttpRequestAttempt<>(request, "check", CheckResponse.class, apiClient, configuration, this.telemetry)
204+
return new HttpRequestAttempt<>(request, "check", CheckResponse.class, apiClient, configuration, configuration.getTelemetry())
205205
.addTelemetryAttributes(telemetryAttributes)
206206
.attemptHttpRequest();
207207
} catch (ApiException e) {
@@ -251,7 +251,7 @@ private CompletableFuture<ApiResponse<CreateStoreResponse>> createStore(
251251

252252
try {
253253
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
254-
return new HttpRequestAttempt<>(request, "createStore", CreateStoreResponse.class, apiClient, configuration, this.telemetry)
254+
return new HttpRequestAttempt<>(request, "createStore", CreateStoreResponse.class, apiClient, configuration, configuration.getTelemetry())
255255
.addTelemetryAttributes(telemetryAttributes)
256256
.attemptHttpRequest();
257257
} catch (ApiException e) {
@@ -300,7 +300,7 @@ private CompletableFuture<ApiResponse<Void>> deleteStore(String storeId, Configu
300300

301301
try {
302302
HttpRequest request = buildHttpRequest("DELETE", path, configuration);
303-
return new HttpRequestAttempt<>(request, "deleteStore", Void.class, apiClient, configuration, this.telemetry)
303+
return new HttpRequestAttempt<>(request, "deleteStore", Void.class, apiClient, configuration, configuration.getTelemetry())
304304
.addTelemetryAttributes(telemetryAttributes)
305305
.attemptHttpRequest();
306306
} catch (ApiException e) {
@@ -356,7 +356,7 @@ private CompletableFuture<ApiResponse<ExpandResponse>> expand(
356356

357357
try {
358358
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
359-
return new HttpRequestAttempt<>(request, "expand", ExpandResponse.class, apiClient, configuration, this.telemetry)
359+
return new HttpRequestAttempt<>(request, "expand", ExpandResponse.class, apiClient, configuration, configuration.getTelemetry())
360360
.addTelemetryAttributes(telemetryAttributes)
361361
.attemptHttpRequest();
362362
} catch (ApiException e) {
@@ -406,7 +406,7 @@ private CompletableFuture<ApiResponse<GetStoreResponse>> getStore(String storeId
406406

407407
try {
408408
HttpRequest request = buildHttpRequest("GET", path, configuration);
409-
return new HttpRequestAttempt<>(request, "getStore", GetStoreResponse.class, apiClient, configuration, this.telemetry)
409+
return new HttpRequestAttempt<>(request, "getStore", GetStoreResponse.class, apiClient, configuration, configuration.getTelemetry())
410410
.addTelemetryAttributes(telemetryAttributes)
411411
.attemptHttpRequest();
412412
} catch (ApiException e) {
@@ -462,7 +462,7 @@ private CompletableFuture<ApiResponse<ListObjectsResponse>> listObjects(
462462

463463
try {
464464
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
465-
return new HttpRequestAttempt<>(request, "listObjects", ListObjectsResponse.class, apiClient, configuration, this.telemetry)
465+
return new HttpRequestAttempt<>(request, "listObjects", ListObjectsResponse.class, apiClient, configuration, configuration.getTelemetry())
466466
.addTelemetryAttributes(telemetryAttributes)
467467
.attemptHttpRequest();
468468
} catch (ApiException e) {
@@ -513,7 +513,7 @@ private CompletableFuture<ApiResponse<ListStoresResponse>> listStores(
513513

514514
try {
515515
HttpRequest request = buildHttpRequest("GET", path, configuration);
516-
return new HttpRequestAttempt<>(request, "listStores", ListStoresResponse.class, apiClient, configuration, this.telemetry)
516+
return new HttpRequestAttempt<>(request, "listStores", ListStoresResponse.class, apiClient, configuration, configuration.getTelemetry())
517517
.addTelemetryAttributes(telemetryAttributes)
518518
.attemptHttpRequest();
519519
} catch (ApiException e) {
@@ -569,7 +569,7 @@ private CompletableFuture<ApiResponse<ListUsersResponse>> listUsers(
569569

570570
try {
571571
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
572-
return new HttpRequestAttempt<>(request, "listUsers", ListUsersResponse.class, apiClient, configuration, this.telemetry)
572+
return new HttpRequestAttempt<>(request, "listUsers", ListUsersResponse.class, apiClient, configuration, configuration.getTelemetry())
573573
.addTelemetryAttributes(telemetryAttributes)
574574
.attemptHttpRequest();
575575
} catch (ApiException e) {
@@ -625,7 +625,7 @@ private CompletableFuture<ApiResponse<ReadResponse>> read(
625625

626626
try {
627627
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
628-
return new HttpRequestAttempt<>(request, "read", ReadResponse.class, apiClient, configuration, this.telemetry)
628+
return new HttpRequestAttempt<>(request, "read", ReadResponse.class, apiClient, configuration, configuration.getTelemetry())
629629
.addTelemetryAttributes(telemetryAttributes)
630630
.attemptHttpRequest();
631631
} catch (ApiException e) {
@@ -684,7 +684,7 @@ private CompletableFuture<ApiResponse<ReadAssertionsResponse>> readAssertions(
684684
try {
685685
HttpRequest request = buildHttpRequest("GET", path, configuration);
686686
return new HttpRequestAttempt<>(
687-
request, "readAssertions", ReadAssertionsResponse.class, apiClient, configuration, this.telemetry)
687+
request, "readAssertions", ReadAssertionsResponse.class, apiClient, configuration, configuration.getTelemetry())
688688
.addTelemetryAttributes(telemetryAttributes)
689689
.attemptHttpRequest();
690690
} catch (ApiException e) {
@@ -742,12 +742,12 @@ private CompletableFuture<ApiResponse<ReadAuthorizationModelResponse>> readAutho
742742
try {
743743
HttpRequest request = buildHttpRequest("GET", path, configuration);
744744
return new HttpRequestAttempt<>(
745-
request,
746-
"readAuthorizationModel",
747-
ReadAuthorizationModelResponse.class,
748-
apiClient,
749-
configuration,
750-
this.telemetry)
745+
request,
746+
"readAuthorizationModel",
747+
ReadAuthorizationModelResponse.class,
748+
apiClient,
749+
configuration,
750+
configuration.getTelemetry())
751751
.addTelemetryAttributes(telemetryAttributes)
752752
.attemptHttpRequest();
753753
} catch (ApiException e) {
@@ -807,12 +807,12 @@ private CompletableFuture<ApiResponse<ReadAuthorizationModelsResponse>> readAuth
807807
try {
808808
HttpRequest request = buildHttpRequest("GET", path, configuration);
809809
return new HttpRequestAttempt<>(
810-
request,
811-
"readAuthorizationModels",
812-
ReadAuthorizationModelsResponse.class,
813-
apiClient,
814-
configuration,
815-
this.telemetry)
810+
request,
811+
"readAuthorizationModels",
812+
ReadAuthorizationModelsResponse.class,
813+
apiClient,
814+
configuration,
815+
configuration.getTelemetry())
816816
.addTelemetryAttributes(telemetryAttributes)
817817
.attemptHttpRequest();
818818
} catch (ApiException e) {
@@ -898,7 +898,7 @@ private CompletableFuture<ApiResponse<ReadChangesResponse>> readChanges(
898898

899899
try {
900900
HttpRequest request = buildHttpRequest("GET", path, configuration);
901-
return new HttpRequestAttempt<>(request, "readChanges", ReadChangesResponse.class, apiClient, configuration, this.telemetry)
901+
return new HttpRequestAttempt<>(request, "readChanges", ReadChangesResponse.class, apiClient, configuration, configuration.getTelemetry())
902902
.addTelemetryAttributes(telemetryAttributes)
903903
.attemptHttpRequest();
904904
} catch (ApiException e) {
@@ -953,7 +953,7 @@ private CompletableFuture<ApiResponse<Object>> write(String storeId, WriteReques
953953

954954
try {
955955
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
956-
return new HttpRequestAttempt<>(request, "write", Object.class, apiClient, configuration, this.telemetry)
956+
return new HttpRequestAttempt<>(request, "write", Object.class, apiClient, configuration, configuration.getTelemetry())
957957
.addTelemetryAttributes(telemetryAttributes)
958958
.attemptHttpRequest();
959959
} catch (ApiException e) {
@@ -1020,7 +1020,7 @@ private CompletableFuture<ApiResponse<Void>> writeAssertions(
10201020

10211021
try {
10221022
HttpRequest request = buildHttpRequest("PUT", path, body, configuration);
1023-
return new HttpRequestAttempt<>(request, "writeAssertions", Void.class, apiClient, configuration, this.telemetry)
1023+
return new HttpRequestAttempt<>(request, "writeAssertions", Void.class, apiClient, configuration, configuration.getTelemetry())
10241024
.addTelemetryAttributes(telemetryAttributes)
10251025
.attemptHttpRequest();
10261026
} catch (ApiException e) {
@@ -1078,12 +1078,12 @@ private CompletableFuture<ApiResponse<WriteAuthorizationModelResponse>> writeAut
10781078
try {
10791079
HttpRequest request = buildHttpRequest("POST", path, body, configuration);
10801080
return new HttpRequestAttempt<>(
1081-
request,
1082-
"writeAuthorizationModel",
1083-
WriteAuthorizationModelResponse.class,
1084-
apiClient,
1085-
configuration,
1086-
this.telemetry)
1081+
request,
1082+
"writeAuthorizationModel",
1083+
WriteAuthorizationModelResponse.class,
1084+
apiClient,
1085+
configuration,
1086+
configuration.getTelemetry())
10871087
.addTelemetryAttributes(telemetryAttributes)
10881088
.attemptHttpRequest();
10891089
} catch (ApiException e) {

0 commit comments

Comments
 (0)