1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-02 08:52:21 +02:00
opentelemetry-go/sdk
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
..
instrumentation Revert Adding attributes to the instrumentation scope. 2022-09-09 09:06:58 -05:00
internal Use gofumpt instead of gofmt (#4623) 2023-10-16 10:02:21 -07:00
metric Add cardinality limiting to the metric SDK as an experimental feature (#4457) 2023-12-19 07:53:01 -08:00
resource Use url.PathUnescape rather than url.QueryUnescape when parsing OTLP headers and resource attributes env vars (#4698) (#4699) 2023-11-09 12:51:59 -06:00
trace sdk/metric: Record measurements when context is done (#4671) 2023-12-15 19:14:16 +01:00
go.mod dependabot updates Sun Dec 3 16:09:27 UTC 2023 (#4740) 2023-12-03 08:38:12 -08:00
go.sum dependabot updates Sun Dec 3 16:09:27 UTC 2023 (#4740) 2023-12-03 08:38:12 -08:00
version_test.go Fix Version test in otel/sdk (#3994) 2023-04-14 07:41:27 -07:00
version.go Release 1.21.0/0.44.0 (#4724) 2023-11-16 21:11:06 +01:00