You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Shen Zhu (Jira)" <ji...@apache.org> on 2021/11/18 04:42:00 UTC

[jira] [Commented] (FLINK-24941) Cannot report backpressure with DatadogReporter

    [ https://issues.apache.org/jira/browse/FLINK-24941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445628#comment-17445628 ] 

Shen Zhu commented on FLINK-24941:
----------------------------------

+1. I also encountered this problem.

> Cannot report backpressure with DatadogReporter
> -----------------------------------------------
>
>                 Key: FLINK-24941
>                 URL: https://issues.apache.org/jira/browse/FLINK-24941
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Metrics
>    Affects Versions: 1.10.0, 1.11.0
>            Reporter: Ori Popowski
>            Priority: Major
>
> When using {{DatadogHttpReporter}} the log is full of these errors:
>  
> {code:java}
> 2021-11-16 09:51:11,521 [Flink-MetricRegistry-thread-1] INFO  org.apache.flink.metrics.datadog.DatadogHttpReporter  - The metric flink.task.isBackPressured will not be reported because only number types are supported by this reporter. {code}
> The code shows that the reason is that {{isBackPressured}} is a Boolean and all Gauge values are converted to {{Number}} which results in {{ClassCastException}} [1].
> I understand the limitation, but:
>  # This bug can be easily fixed
>  # Monitoring backpressure is extremely important. Without backpressure monitroing there's no way of seeing backpressure history and no alerts.
> h3. Workaround
> For anyone interested, rewrite the {{org.apache.flink.metrics.datadog.DGauge}} to map Booleans to integers (0 => false, 1 => true), and use the maven/sbt shade plugin to take your own version of this class into the final JAR instead the existing class from the flink-metrics-datadog package.
>  
> [1] https://github.com/apache/flink/blob/release-1.11/flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java#L184-L188
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)