1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/sdk/metric/internal/aggregate
Tyler Yahn e3bf787c21
Add cardinality limiting to the metric SDK as an experimental feature (#4457)
* Add agg limiting func

* Add unit test for limitAttr

* Add limiting to aggregate types

* Add internal x pkg for experimental feature-flagging

* Connect cardinality limit to metric SDK

* Replace limitAttr fn with limiter type

The Attribute method is still inlinable.

* Use x.CardinalityLimit directly

* Simplify limiter test

* Add limiter benchmark

* Document the AggregationLimit field

* Test sum limits

* Test limit for last value

* Test histogram limit

* Refactor expo hist test to use existing fixtures

The tests for the exponential histogram create their own testing
fixtures. There is nothing these new fixtures do that cannot already be
done with the existing testing fixtures used by all the other aggregate
functions. Unify the exponential histogram testing to use the existing
fixtures.

* Test the ExponentialHistogram limit

* Fix lint

* Add docs

* Rename aggregation field to aggLimit

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-12-19 07:53:01 -08:00
..
aggregate_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
aggregate.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
doc.go Move aggs to internal/aggregate (#4283) 2023-07-03 10:53:00 +02:00
exponential_histogram_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
exponential_histogram.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
histogram_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
histogram.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
lastvalue_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
lastvalue.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
limit_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
limit.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
sum_test.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
sum.go Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00