[
https://issues.apache.org/jira/browse/FLINK-22533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427168#comment-17427168
]
Igal Shilman commented on FLINK-22533:
--------------------------------------
[~nferrario] check out the branch again,
you can rewrite your example in the following way:
{code:java}
binder.bindIngressRouter(myIngress) { message, downstream ->
if (message.isValid && message.auctionId > 0) {
downstream.forward(Identifiers.storageType,
message.auctionId.toString(), message)
} else {
downstream.metrics().counter("invalid-events").inc();
}
}
{code}
> Allow creating custom metrics
> -----------------------------
>
> Key: FLINK-22533
> URL: https://issues.apache.org/jira/browse/FLINK-22533
> Project: Flink
> Issue Type: Improvement
> Components: Stateful Functions
> Reporter: Igal Shilman
> Assignee: Igal Shilman
> Priority: Minor
> Labels: auto-deprioritized-major
>
> Currently it is not possible to create custom metrics in StateFun.
> Let us consider supporting these.
>
> Mailing list thread:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Custom-metrics-in-Stateful-Functions-td43282.html
--
This message was sent by Atlassian Jira
(v8.3.4#803005)