Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix traces #109

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class RPTTimerController {
private final ErrorUtil errorUtil;


@Operation(summary = "createTimer", description = "Create a timer linked with paymentToken and rpt data", security = {@SecurityRequirement(name = "ApiKey")}, tags = {"RPTTimer"})
@Operation(summary = "createTimer", description = "Create a timer from sessionId data", security = {@SecurityRequirement(name = "ApiKey")}, tags = {"RPTTimer"})
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully paymentToken expiration timer created", content = @Content(schema = @Schema()))
@ApiResponse(responseCode = "200", description = "Successfully rpt timer created", content = @Content(schema = @Schema()))
})
@PostMapping(
value = "/timer",
Expand All @@ -51,23 +51,23 @@ public class RPTTimerController {
@Trace(businessProcess = RPT_BP_TIMER_SET, reEnabled = true)
public void createTimer(@RequestBody RPTTimerRequest request) {
try {
log.info("Invoking API operation createTimer - args: {}", sanitizeInput(request.toString()));
log.info("Invoking API operation createRPTTimer - args: {}", sanitizeInput(request.toString()));
rptTimerService.sendMessage(request);
log.info("Successful API operation createTimer");
log.info("Successful API operation createRPTTimer");
} catch (Exception ex) {
String operationId = MDC.get(Constants.MDC_OPERATION_ID);
log.error(String.format("GenericException: operation-id=[%s]", operationId != null ? operationId : "n/a"), ex);

AppException appException = new AppException(ex, AppErrorCodeMessageEnum.ERROR, ex.getMessage());
ErrorResponse errorResponse = errorUtil.forAppException(appException);
log.error("Failed API operation createTimer - error: {}", errorResponse);
log.error("Failed API operation createRPTTimer - error: {}", errorResponse);
throw ex;
}
}

@Operation(summary = "deleteTimer", description = "Delete a timer by paymentToken", security = {@SecurityRequirement(name = "ApiKey")}, tags = {"ReceiptTimer"})
@Operation(summary = "deleteTimer", description = "Delete a timer by sessionId", security = {@SecurityRequirement(name = "ApiKey")}, tags = {"RPTTimer"})
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully paymentToken expiration timer deleted", content = @Content(schema = @Schema()))
@ApiResponse(responseCode = "200", description = "Successfully rpt timer deleted", content = @Content(schema = @Schema()))
})
@DeleteMapping(
value = "/timer",
Expand Down
Loading