DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
605 stars 303 forks source link

add aggregator #841

Open andrewqian2001datadog opened 1 week ago

andrewqian2001datadog commented 1 week ago

What does this PR do?

This PR adds the aggregator functionality for client side aggregation, it is pushing to a feature branch. This has already been implemented for the GO client.

Issue

Description of the Change

Adds a class that periodically aggregates metrics for a given flush_interval and then sends the aggregated metrics to intake. A metric will be aggregated if there was another matching context sent within the same flush interval.

Possible Drawbacks

A possible drawback is that the current code relies on object oriented programming (inheritance) for the add_metric and other functions, it requires that the MetricAggregator objects will have the same fields

Verification Process

Unit tests that verify the aggregator.py class matches the existing behavior in the client side aggregator for the go client.

Release Notes

No behavioral changes until the base.py class is changed

Review checklist (to be filled by reviewers)