Commit Graph

42 Commits

Author SHA1 Message Date
jack-berg e067223409
Convert tests to from :sdk:metrics-testing to :sdk:testing (#4444) 2022-05-09 09:34:09 -05:00
jack-berg 2c695a34f8
Simplify MetricReader (#4268)
* Simplify MetricReader

* Tighten up PR

* Restore some methods / classes and deprecate

* Revert "Restore some methods / classes and deprecate"

This reverts commit fee90e5da7.
2022-03-22 10:10:15 -05:00
jack-berg cbecf1f706
Move and deprecate InMemoryMetricExporter (#3987) 2021-12-14 11:51:56 +09:00
Anuraag Agrawal 737a5e2b26
Deprecate GlobalMeterProvider (#3948) 2021-12-03 08:43:49 +09:00
Anuraag Agrawal ebf5507cde
Add PeriodicMetricReaderBuilder (#3735)
* Add PeriodicMetricReaderBuilder

* More tests

* Cleanup

* Improve default
2021-10-14 18:28:59 -07:00
Josh Suereth 70086cf014
MetricReader and Multi-export features (#3578)
* Start of multi-exporter codebase.

* Restore InMemoryExporter + fix javadocs.

* Quick javadoc fix

* Fix some javadoc build failures and missing things.

* Fix bug with autoconfigure

* Modify InMemoryMetricReader + register methods to allow for immutable SdkMeterProvider

- InMemoryMetricReader is now a factory + reader
- Hide register on SdkMeterProvider
- Update all tests to make sure things pass.

* Make metric-readers 'immutable' post-construction of SdkMeterProvider.   Update all code around registration of readers and autoconfigure.   Create new 'sdk noop' meter provider for when we have no readers configured.

* Fix integration test.

* Fix jmh benchmarks for trace.

* Fix jmh build.

* Fix broken in-memory exporter things, and Noop API issue.

* Migrate MetricReader.Factory to MetricReaderFactory.

* Rename PeriodMetricReader.Factory to PeriodicMetricReaderFactory.

* Apply suggestions from code review

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

* Minor cleanup of ColectionHandle.

* Fixes from review.

* Extract delta accumulation and add tests.

* Fragment the abstraction in SynchronousMetricStorage for better separation of responsibilities.

* Add tests (and minor optimisation) for delta metric storage.

* Add test for temporal metric storage.

* Update temporal metric storage to fix issue w/ async instruments.

* Migrate Async storage to use temporal metric storage (with better tests).

* Another fix from review.

* Remove start epoch nano parameter from storage constructors.

* Fixes from review.

* Migrate flush -> forceFlush as per review.

* Add test coverage for flush.

* Fixes from review.

* Fix public API breakage.

* Fixes from review.

* Fix threadsafe annotations

Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-09-30 22:22:09 +09:00
Anuraag Agrawal b88bfe16cc
Use repo ghcr images for integration tests. (#3644) 2021-09-22 08:28:09 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
Josh Suereth b12a57ed21
Migrate Metrics SDK "data' package to Attributes (#3352)
* 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.
2021-07-01 09:15:44 -07:00
Anuraag Agrawal 7f544416e4
Define an extension for otel-specific configuration of Java. (#3317) 2021-06-17 15:54:25 +09:00
Anuraag Agrawal b9ca09b6c1
Extract java conventions plugin. (#3316) 2021-06-15 12:29:47 -07:00
Min Xia bcdb96492d
Remove the OTLP receiver legacy gRPC port(55680) references (#3245) 2021-05-22 11:37:31 +09:00
Anuraag Agrawal c4f612ee5e
Update dependencies (#3105) 2021-04-05 08:49:05 -07:00
John Watson fea5ecc0be
Don't auto-start the IntervalMetricReader in the constructor. (#3026)
* Don't auto-start the IntervalMetricReader in the constructor.

* a little more protection around the possibility of double-starting the IMR

* add a test that verifies we only start once

* tweak the values to see if CI likes it better

* make the test simpler for CI

* try a little bit longer time?

* change the test to make an assertion on a passed-in scheduler.
2021-03-19 08:23:23 +09:00
John Watson 5e2791703f
fix up the stress test code for changes in the collector & metrics sdk (#2976) 2021-03-03 16:44:09 -08:00
Bogdan Drutu 75ea07e597
Fix more api dependencies which should be implementation (#2919)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 12:20:06 -08:00
Bogdan Drutu a633d1ee87
[Breaking Change] Remove metrics exporter from stable testing package (#2857)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:29:05 -08:00
Anuraag Agrawal 900c35ed8c
Migrate remaining gradle scripts to kotlin (#2820)
* Migrate remaining gradle scripts to kotlin

* Finish more
2021-02-16 14:11:07 -08:00
Bogdan Drutu 301a29d7a3
Move labels outside of the stable package (#2647)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 10:24:06 -08:00
Anuraag Agrawal 32a63fb8e3
Migrate to using gradle platform to manage dependency versions instea… (#2586)
* Migrate to using gradle platform to manage dependency versions instead of global variables.

* Remove unused and fix test

* Revert test yolo

* Workaround test ordering issue by just merging them

* Spot
2021-01-27 13:54:58 +09:00
Anuraag Agrawal 58bcf7fe88
Deprecate tracermanagement and SDK global access (#2547)
* Deprecate SdkTracerManagement

* Deprecate global SDK

* Deprecate more

* Fix

* Cleanup

* Fix

* Handle test order random

* Collector removed queued_retry
2021-01-21 14:39:32 +09:00
John Watson 66ca483ede
Generate the ResourceAttributes class (#2540)
* Generate the ResourceAttributes class
* deprecate the old one
* convert usages to the new one

* re-use the template with some special logic for the addition

* deprecate the old resource attributes in the wrong class
2021-01-19 23:02:11 -08:00
Bogdan Drutu cbcec6b359
Rename Point to PointData to suggest that it represents data reprezentation (#2519)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-14 13:05:40 +09:00
Bogdan Drutu 61eafc62eb
Avoid using inner classes in MetricData (#2493)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 11:31:24 +09:00
Bogdan Drutu a6d2047b23
Implement MetricProducer directly by the SdkMeterProvider (#2489)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 14:51:05 -08:00
Anuraag Agrawal 4916931740
Use health port for jaeger container startup check. (#2426) 2021-01-05 09:49:48 -08:00
Bogdan Drutu 450db6c2b2
Change MetricData to expose the Point type that is expected for each data type (#2413)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-03 08:32:52 -08:00
Anuraag Agrawal f8f409bae5
Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and ad… (#2387)
* Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and add non-registering version.

* Some clean
2020-12-25 11:04:02 +09:00
Anuraag Agrawal 8fc4e627ca
Reduce usage of GlobalOpenTelemetry (#2386)
* Reduce usage of GlobalOpenTelemetry

* Cleanup
2020-12-23 10:17:46 +09:00
Bogdan Drutu 95163d71fb
Avoid using mutable addSpanProcessor when trivial to change (#2365)
* Run go mod tidy on the master

* Fixes

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2020-12-21 12:22:36 +09:00
Anuraag Agrawal 6954d1f624
Use normal filesystem-based Gradle paths. (#2332)
* Use normal filesystem-based Gradle paths.

* Update workflow by making agnostic to jacoco project name

* More merge
2020-12-18 12:07:33 +09:00
Bogdan Drutu b75801476b
Consistent naming for metrics SDK implementations with trace (#2325)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-17 08:15:44 -08:00
Anuraag Agrawal b0652dcae2
Split trace/metrics OTLP exporters. (#2315)
* Split trace/metrics OTLP exporters.

* git add

* alpha version

* Commmit

* Restore otlp parent artifact
2020-12-17 13:49:42 +09:00
Bogdan Drutu dbb1ae91f9
Deprecate metrics from opentelemetry-api, add a global version in metrics api (#2279)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 15:14:50 -08:00
Bogdan Drutu 25bf879df7
Split global functionality into a separate class (#2233)
This ensure clear separation of functionality. This PR does not change any functionality, it just restructures the code to separate global functionality from
the Default implementation. Also helps to ensure that Global initialization does not happen by mistake when working only with the default implementation.

Also it helps with methods like `OpenTelemetry.get()` and `OpenTelemetry.set()` to understand they are interacting with global instance

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 10:27:35 -08:00
John Watson 4d73431a96
cleanup work (#2172)
* remove 3 classes that got left behind in a repackaging

* actually disable the stress test
2020-12-01 17:03:32 -08:00
John Watson e599d0e87b
Change the default port that the OTLP exporters point to. (#2113)
* Change the default port that the OTLP exporters point to.

* extract constants for the export metrics labels
2020-11-23 10:43:37 -08:00
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
Bogdan Drutu 18d45beb4f
Remove inmemory exporter artifact, move to sdk-testing (#1991)
* Remove unused class InMemoryTracing, junit5 helper is enough

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Remove inmemory exporter artifact, move to sdk-tracing

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-04 08:18:01 -08:00
Bogdan Drutu 6dfbc14e19
Rename package name for exporters to singular exporter (#1992)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 16:27:57 -08:00
Anuraag Agrawal db93a841ed
Rename exporter artifacts to singular (#1984)
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 14:24:00 -08:00
Anuraag Agrawal 390d92e49a
Rename folder names from underscore to hyphen (#1968) 2020-11-03 14:46:40 +09:00