You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Prakhar Mathur <pr...@gojek.com> on 2019/10/30 11:52:03 UTC

Sending custom statsd tags

Hi,

We are running Flink 1.6.2. We are using flink-metrics-statsd jar in order
to send metrics to telegraf. In order to send custom metrics, we are
using MetricGroups.
Currently, we are trying to send a few custom tags but unable to find
any examples or documentation regarding the same.

Regards
Prakhar Mathur

Re: Sending custom statsd tags

Posted by vino yang <ya...@gmail.com>.
Hi Prakhar,

You need to customize StatsDReporter[1] in the Flink source.

If you want to flexibly get configurable tags from the configuration
file[2], you can refer to the implementation of DatadogHttpReporter#open[3]
(for reference only how to get the tag).

Best,
Vino

[1]:
https://github.com/apache/flink/blob/master/flink-metrics/flink-metrics-statsd/src/main/java/org/apache/flink/metrics/statsd/StatsDReporter.java#L52
[2]:
https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/metrics.html#datadog-orgapacheflinkmetricsdatadogdatadoghttpreporter
[3]:
https://github.com/apache/flink/blob/master/flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java#L114


Prakhar Mathur <pr...@gojek.com> 于2019年10月31日周四 下午2:35写道:

> Hi Chesnay,
>
> Thanks for the response, can you point me to some existing example for
> this?
>
> On Wed, Oct 30, 2019 at 5:30 PM Chesnay Schepler <ch...@apache.org>
> wrote:
>
>> Not possible, you'll have to extend the StatsDReporter yourself to add
>> arbitrary tags.
>>
>> On 30/10/2019 12:52, Prakhar Mathur wrote:
>>
>> Hi,
>>
>> We are running Flink 1.6.2. We are using flink-metrics-statsd jar in
>> order to send metrics to telegraf. In order to send custom metrics, we are
>> using MetricGroups. Currently, we are trying to send a few custom tags
>> but unable to find any examples or documentation regarding the same.
>>
>> Regards
>> Prakhar Mathur
>>
>>
>>

Re: Sending custom statsd tags

Posted by Prakhar Mathur <pr...@gojek.com>.
Hi Chesnay,

Thanks for the response, can you point me to some existing example for this?

On Wed, Oct 30, 2019 at 5:30 PM Chesnay Schepler <ch...@apache.org> wrote:

> Not possible, you'll have to extend the StatsDReporter yourself to add
> arbitrary tags.
>
> On 30/10/2019 12:52, Prakhar Mathur wrote:
>
> Hi,
>
> We are running Flink 1.6.2. We are using flink-metrics-statsd jar in
> order to send metrics to telegraf. In order to send custom metrics, we are
> using MetricGroups. Currently, we are trying to send a few custom tags
> but unable to find any examples or documentation regarding the same.
>
> Regards
> Prakhar Mathur
>
>
>

Re: Sending custom statsd tags

Posted by Chesnay Schepler <ch...@apache.org>.
Not possible, you'll have to extend the StatsDReporter yourself to add 
arbitrary tags.

On 30/10/2019 12:52, Prakhar Mathur wrote:
> Hi,
>
> We are running Flink 1.6.2. We are using flink-metrics-statsd jar in 
> order to send metrics to telegraf. In order to send custom metrics, we 
> are using MetricGroups. Currently, we are trying to send a few 
> custom tags but unable to find any examples or documentation regarding 
> the same.
>
> Regards
> Prakhar Mathur