Do you mind sharing the code how do you register your metrics with the
TriggerContext? It could help us identify where does name collisions
come from. As far as I am aware it should be fine to use the
TriggerContext for registering metrics.

Best,

Dawid

On 16/03/2021 17:35, Aleksander Sumowski wrote:
> Hi all,
> I'd like to measure how many events arrive within allowed lateness
> grouped by particular feature of the event. We assume particular type
> of events have way more late arrivals and would like to verify this.
> The natural place to make the measurement would be our custom trigger
> within onElement method as this is the place where we know whether
> event is late of not. The issue is that the only way to register
> MetricGroup at this moment is via Trigger.TriggerContext - which leads
> to re-registering and lots of logs:
>
>
>       
> `Name collision: Group already contains a Metric with the name XXX.
> Metric will not be reported.`
>
>
> Any hints how to tackle it?
>
> Thanks,
> Aleksander

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to