feat: add configurable metric export interval to lambda telemetry API receiver#2114
feat: add configurable metric export interval to lambda telemetry API receiver#2114herin049 wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
|
Good stuff! Getting back to this later today but overall seems good! 🚀 |
wpessers
left a comment
There was a problem hiding this comment.
I've been thinking about this change for a while now. And I know this PR is actually in response to my earlier comment on the previous PR for adding telemetryAPI metrics support: #2066 (comment)
But I think I've come around on the idea... Maybe it's fine to keep the behaviour as is. Because the metrics are still the same / correct whether you flush them once or multiple times. And probably the volume of metrics is acceptable so that we don't really need to be doing this aggregation before flushing?
If sending multiple metrics "exports" from the collector to your observability backend of choice is a concern, we have the batch processor for that, that can be configured to be used inside the telemetry pipelines of the collector.
TLDR: I'm thinking it's actually fine to always flush the metrics, the change (although nicely, cleanly implemented) introduces some extra complexity that feels a little bit unnecessary. What do you think @herin049 ? It's possible that I'm missing some nuances / reasons why it might still be a good idea to add this anyway.
Followup to changes made in #2066. The changes in this PR add a configurable metric export interval to prevent metrics from being generated for every Lambda invocation, reducing the number of metric datapoints generated. Relevant tests have been added to test the new exporting behavior and configuration changes. Furthermore, relevant documentation has been added documenting how to configure metric temporality and export intervals.