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

Efrat Levitan commented on FLINK-39893:
---------------------------------------

Thank you [~bruceqiu].

I think the solution is valid in terms of respecting the non-monotonic contract 
of {{org.apache.flink.metrics.Counter}}

but the inherent downside is losing counter reset detection for all flink 
metrics, while most of them are still entitled to it.

I plan to publish a FLIP soon recognizing monotonic counters in flink metrics 
system to solve this conflict.

> Respect non-monotonic counter accumulation in openTelemetry reporter
> --------------------------------------------------------------------
>
>                 Key: FLINK-39893
>                 URL: https://issues.apache.org/jira/browse/FLINK-39893
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Metrics
>    Affects Versions: 2.2.1
>            Reporter: Efrat Levitan
>            Priority: Major
>              Labels: pull-request-available
>
> Otel reporter 
> [drops|https://github.com/apache/flink/blob/master/flink-metrics/flink-metrics-otel/src/main/java/org/apache/flink/metrics/otel/OpenTelemetryMetricAdapter.java#L66-L73]
>  the non-incremental datapoint with a warn, which is incorrect because flink 
> {{Counter}} does not guarantee monotonicity (i.e 
> [supports|https://github.com/apache/flink/blob/master/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/Counter.java#L35-L45]
>  {{{}dec{}}}, or {{inc}} by a negative)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to