opentelemetry-java/sdk/metrics-testing
Josh Suereth f6754b66cf
Allow exporters to influence Aggregation (#3762)
* Major refactoring to Aggregator

- Remove all state from Aggregator but for exemplar reservoir factory.
  - Reosurce/IL passed from MP/MeterSharedState
  - MetricDescriptor already stored on MetricStorage.
- Give Aggregators explicit "diff" and "merge" operations, split Sum aggregator
- Update Storage to use explicit diff/merge in appropriate locations.
- Aggregtors are now passed AggregationTemporality in as a parameter
- Update MetricStorage to take requested aggregation tempoarlity as parameter, always storing data for either.

Note: Things compile, aggregator + storage tests pass, but e2e is broken until aggregation temporality is appropriatley wired through to readers.

* Remove extraneous bits of information from AggregatorFactory interface

* Spotless + remove extraneous pieces of data from Aggregation interface.

* Added supported + preferred temprality to export interfaces.

- Add supported/preferred temporality to export interfaces
- Update tracking of collection information through internal packages to pass
  one data class instead of many individual components.

* Finish wiring configured temporality through Views.

- Update gauge tests to account for start time (as recommended in spec).
- Allow configured temporality to be null for views
- Propogate configured temporality from View API through to storage

* Fix remaining gauge tests

* Update exporters to specify desired temporality

* Other build fixes

* Fix javadoc

* add tests for cumulative+delta in temporal storage

- Add cumulative+delta tests
- Fix error messages from sum data assert

* Move diffInPlace and megeInPlace into utility class

* Add explicit test for delta vs. cumulative exporters.

* Spotless fixes

* Remove AggregatorFactory

This interface was fully replaced by Aggregation, and offerred little benefit post-refactor.

* Fixes from review

* Add javadoc for new parameters in temporal metric storage.

* Fixes from review.

* Add some unit tests for the aggregation config

* Add "diff" unit test for histogram + lastvalue

* Apply suggestions from code review

Co-authored-by: John Watson <jkwatson@gmail.com>

* Fixes from code review.

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-10-26 09:39:31 -07:00
..
src Allow exporters to influence Aggregation (#3762) 2021-10-26 09:39:31 -07:00
README.md Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
build.gradle.kts Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
gradle.properties Migrate Metrics SDK "data' package to Attributes (#3352) 2021-07-01 09:15:44 -07:00

README.md

OpenTelemetry Metrics SDK Testing

Javadocs