beam-telemetry/telemetry_metrics

Filtering on measurements

bryannaegele opened this issue · 5 comments

I'm currently logging a debug "skipping event due to missing measurement" which is helpful for identifying an issue but is sometimes an unavoidable thing, such as :idle being nil in an Ecto query.

I could add a "report once" check but that would require another ets lookup on something that could be very frequent. Not a huge deal. Or we could enable filtering on measurements here, which we discussed during the addition of filtering on metadata.

Thoughts?

How about adding an option to disable logging for specific events? Although that is mostly equivalent to filtering, but tailored to only that specific use-case.

If we add filtering, I think it needs to be implemented via keep, drop, to avoid adding new options.

If we added it here then it would just be adding a second arg to keep/drop with the measurement values.

The other alternative is I just silently drop events with nil measurement values but warn on missing measurement keys. 🤷🏻