Hi Tengda,
Which sink version do you use?
I have recently (Flink 1.18, 1.19) added the metrics to the initialization
context for the committers for the new SinkV2 API [1]. With this you have a
place to collect the desired metrics.

I hope this helps,
Peter

[1]
https://cwiki.apache.org/confluence/plugins/servlet/mobile?contentId=263430387#content/view/263430387

On Thu, Sep 19, 2024, 23:59 Tang, Tengda via user <user@flink.apache.org>
wrote:

> Hi Flink team,
>
>
>
> We want to add customized metrics for measuring “user-facing/end-to-end
> latency” in Flink application.
>
> Per this post
> https://stackoverflow.com/questions/56578919/latency-monitoring-in-flink-application,
> the suggestion is to add a histogram metric in the sink operator myself,
> which depicts the difference between the current processing time and the
> event time to get a distribution of the event time lag at the source.
>
> However, how can I add this customized metric in sink operator?
>
>
>
> I know I could adding the customized metrics using  RichSinkFunction, but
> in this case, I cannot benefits from the internal Sink operators like
> DynamoDB sink
> https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/dynamodb/
>
> And it’s also recommended to use these Internal Sink operations.
>
>
>
> Is there any way I could add histogram metric into Sink operators like
> DynamoDB sink?
>
>
>
>
>
> Thanks,
>
> Tengda
> This message is confidential and subject to terms at:
> https://www.jpmorgan.com/emaildisclaimer including on confidential,
> privileged or legal entity information, malicious content and monitoring of
> electronic messages. If you are not the intended recipient, please delete
> this message and notify the sender immediately. Any unauthorized use is
> strictly prohibited.
>

Reply via email to