Skip to content

Commit c641eb4

Browse files
authored
extend and print trace search time range (#342)
*Issue description:* Lambda canary randomly fails, try to test if it is caused by xray service misses annotation SLA https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/12561234254/job/35019797312#step:21:335 *Description of changes:* *Rollback procedure:* <Can we safely revert this commit if needed? If not, detail what must be done to safely revert and why it is needed.> *Ensure you've run the following tests on your changes and include the link below:* To do so, create a `test.yml` file with `name: Test` and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing. NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the [needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds) keyword to run tests in succession. - Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2 - Run EC2 tests in all regions - Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 9e8fda7 commit c641eb4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

validator/src/main/java/com/amazon/aoc/enums/GenericConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@Getter
2121
public enum GenericConstants {
2222
// retry
23-
SLEEP_IN_MILLISECONDS("10000"), // ms
23+
SLEEP_IN_MILLISECONDS("30000"), // ms
2424
SLEEP_IN_SECONDS("30"),
2525
MAX_RETRIES("10"),
2626

validator/src/main/java/com/amazon/aoc/services/XRayService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
import com.amazonaws.services.xray.model.TraceSummary;
2626
import java.util.Date;
2727
import java.util.List;
28+
import lombok.extern.log4j.Log4j2;
2829
import org.joda.time.DateTime;
2930

31+
@Log4j2
3032
public class XRayService {
3133
private AWSXRay awsxRay;
32-
private final int SEARCH_PERIOD = 600;
34+
private final int SEARCH_PERIOD = 600 * 3;
3335
public static String DEFAULT_TRACE_ID = "1-00000000-000000000000000000000000";
3436

3537
public XRayService(String region) {
@@ -53,6 +55,7 @@ public List<Trace> listTraceByIds(List<String> traceIdList) {
5355
public List<TraceSummary> searchTraces(String traceFilter) {
5456
Date currentDate = new Date();
5557
Date pastDate = new DateTime(currentDate).minusSeconds(SEARCH_PERIOD).toDate();
58+
log.info("--start-time: " + pastDate + ", --end-time: " + currentDate + ", traceFilter: " + traceFilter);
5659
GetTraceSummariesResult traceSummaryResult =
5760
awsxRay.getTraceSummaries(
5861
new GetTraceSummariesRequest()

0 commit comments

Comments
 (0)