Skip to content

Commit

Permalink
Rename EFD metrics constants to known tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-tkachenko-datadog committed Jan 22, 2025
1 parent 61ffadd commit 79081f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ public Map<String, Collection<TestIdentifier>> getKnownTestsByModule(
TracerEnvironment tracerEnvironment) throws IOException {
OkHttpUtils.CustomListener telemetryListener =
new TelemetryListener.Builder(metricCollector)
.requestCount(CiVisibilityCountMetric.EFD_REQUEST)
.requestErrors(CiVisibilityCountMetric.EFD_REQUEST_ERRORS)
.requestDuration(CiVisibilityDistributionMetric.EFD_REQUEST_MS)
.responseBytes(CiVisibilityDistributionMetric.EFD_RESPONSE_BYTES)
.requestCount(CiVisibilityCountMetric.KNOWN_TESTS_REQUEST)
.requestErrors(CiVisibilityCountMetric.KNOWN_TESTS_REQUEST_ERRORS)
.requestDuration(CiVisibilityDistributionMetric.KNOWN_TESTS_REQUEST_MS)
.responseBytes(CiVisibilityDistributionMetric.KNOWN_TESTS_RESPONSE_BYTES)
.build();

String uuid = uuidGenerator.get();
Expand Down Expand Up @@ -293,7 +293,7 @@ private Map<String, Collection<TestIdentifier>> parseTestIdentifiers(KnownTestsD
}

LOGGER.debug("Received {} known tests in total", knownTestsCount);
metricCollector.add(CiVisibilityDistributionMetric.EFD_RESPONSE_TESTS, knownTestsCount);
metricCollector.add(CiVisibilityDistributionMetric.KNOWN_TESTS_RESPONSE_TESTS, knownTestsCount);
return knownTestsCount > 0
? testIdentifiers
// returning null if there are no known tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ public enum CiVisibilityCountMetric {
*/
ITR_FORCED_RUN("itr_forced_run", EventType.class),
/** The number of requests sent to the known tests endpoint */
EFD_REQUEST("known_tests.request", RequestCompressed.class),
KNOWN_TESTS_REQUEST("known_tests.request", RequestCompressed.class),
/** The number of known tests requests sent to the known tests endpoint that errored */
EFD_REQUEST_ERRORS("known_tests.request_errors", ErrorType.class, StatusCode.class),
KNOWN_TESTS_REQUEST_ERRORS("known_tests.request_errors", ErrorType.class, StatusCode.class),
/** The number of requests sent to the flaky tests endpoint */
FLAKY_TESTS_REQUEST("flaky_tests.request", RequestCompressed.class),
/** The number of tests requests sent to the flaky tests endpoint that errored */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public enum CiVisibilityDistributionMetric {
/** The number of files covered inside a coverage payload */
CODE_COVERAGE_FILES("code_coverage.files"),
/* The time it takes to get the response of the known tests endpoint request in ms */
EFD_REQUEST_MS("known_tests.request_ms"),
KNOWN_TESTS_REQUEST_MS("known_tests.request_ms"),
/** The number of bytes received by the known tests endpoint */
EFD_RESPONSE_BYTES("known_tests.response_bytes", ResponseCompressed.class),
KNOWN_TESTS_RESPONSE_BYTES("known_tests.response_bytes", ResponseCompressed.class),
/** The number of tests received by the known tests endpoint */
EFD_RESPONSE_TESTS("known_tests.response_tests"),
KNOWN_TESTS_RESPONSE_TESTS("known_tests.response_tests"),
/** The time it takes to get the response of the flaky tests endpoint request in ms */
FLAKY_TESTS_REQUEST_MS("flaky_tests.request_ms"),
/** The number of bytes received by the flaky tests endpoint */
Expand Down

0 comments on commit 79081f8

Please sign in to comment.