* 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>
* Rename MetricData to MetricDataBuilder and extract MetaData interface
* rename abstract class and pull create methods up
* add package private constructor for consistency/safety
* move the defaults into their respective types
* rename default -> empty
* Initial implementation of simple ExemplarReservoirs
- Add an implementation of naive fixed-bucket reservoir sampling
- Add an implementation of FixedSizeHistogram reservoir sampling where latest-measurement per-histogram-bucket is kept.
- Add assertions for exemplars.
* Remove explicit locks for mild performance boost.
* Create a new random holder abstraction.
- Create new random holder abstraction that allows
- ThreadLocalRandom when efficient
- simple detection of Android + workaround for TLR
- Overridable with mocked random for testing.
- Update tracing RandomIdGenerator to leverage new RnadomHolder
- Expand exemplar reservoir tests to use new random holder
- Remove android-only random id generator test
* Add api diff + fix silly naming thing.
* Move random hodler to be Supplier, other updates from code review.
* Fixes from review.
* Fix bytebuddy issue with mocking.
* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/exemplar/AbstractFixedSizeExemplarReservoir.java
Co-authored-by: John Watson <jkwatson@gmail.com>
* Fix name from review.
* Update sdk/common/src/main/java/io/opentelemetry/sdk/internal/RandomSupplier.java
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update the API to the latest SDK specification.
* API updates to other sdk areas.
* First half of SDK updates for API.
Passing off to other cmoputer.
* Get SDK compiling again.
* Get tests compiling again (and failing).
* Fix bad copy-paste error.
* Get all SDK tests passing.
* More fixes to builds across SDK impls.
* Remove unecessary publics
* more fixes for new API.
* spotless fixes.
* Make tests for metric points order independent.
* Restore readme.
* Fix readmes.
* Add noop meter provider tests for code coverage.
* Add code coverage for assertion library.
* Fix wierd test failure that gradle cache is preventing me from seeing locally.
* Fix javadoc/spelling comments from review.
* Remove marker interfaces.
* Switch from atomic ref to volatile.
* Fixes from review.
* Apply suggestions from code review
Co-authored-by: John Watson <jkwatson@gmail.com>
* Fixes from review.
* Fixes from review.
* Update OTLP HTTP exporter to use new metrics api
Co-authored-by: John Watson <jkwatson@gmail.com>
* Add Exemplars into `metrics.data` pacakge
- Add Exemplars to match OTLP spec
- Add assertj helpers for exemplar extraction on points.
* Wire exemplar export to OTLP exporter
* Wire exemplar export to Prometheus exporter
* Add javadoc for AbstractSampledPointDataAssert
* Fixes from review.
* Fixes from review.
* Fixes from review.
* Fixes from spotless.
* Fixes froom review.
* Add clarification to javadoc from review.
* ONe last javadoc cleanup.
* Fixes to javadoc build.
* Update method name from review.
* Fixes from review.
* Update java metrics data model and create assertion based testing library.
* Update existing SDK for Label => Attribute in data model
- Finish wiring through changes to all code/tests.
- DOES NOT touch API
- Update existing tests to use new testing library to be sensitive to attribute vs. label hashing alterations + equality of the metrics.data package types.
* Fix javadoc breakages
* Fix JMH compile
* Finish javadoc
* Fixes from review
* Remove botched file.
* Fixes from review.