parisni commented on code in PR #8997:
URL: https://github.com/apache/hudi/pull/8997#discussion_r1234966252
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/datadog/DatadogHttpClient.java:
##########
@@ -84,8 +84,8 @@ private void validateApiKey() {
try (CloseableHttpResponse response = client.execute(request)) {
int statusCode = response.getStatusLine().getStatusCode();
ValidationUtils.checkState(statusCode == HttpStatus.SC_OK, "API key is
invalid.");
- } catch (IOException e) {
- throw new IllegalStateException("Failed to connect to Datadog to
validate API key.", e);
+ } catch (IOException | IllegalStateException e) {
+ LOG.warn(String.format("Failed to connect to Datadog to validate API
key. %s", e.getMessage()));
Review Comment:
To me, the metric provider is responsible to contact the user if metrics
won't work (mailing alarm, oncall ...). But the ingestion jobs should not stop
working. Not having metrics is a minor problem versus having all the company
pipelines broken because of a token renewal issue.
Also users configure the metrics provider to alarm in case of no metrics.
At least I assume some user won't want their nightly jobs broken because of
token, this would also be the case for an API or any metrics collection, outage
is a minor problem versus stopping working.
Currently same apply for pushing metrics, if it does not work, it is only a
warning see
https://github.com/apache/hudi/blob/0763a870ec67021aabc254500835721615865182/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/Metrics.java#L124-L132
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]