Commit Graph

119 Commits

Author SHA1 Message Date
Bogdan Drutu 69117e6dea
Fix warnings found by idea IDE in the SDK dir. (#1773)
* Fix warnings found by idea IDE.

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

* Run spotlessApply

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

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2020-10-12 17:42:09 +09:00
Anuraag Agrawal 78fd4d1c8f
Add package-info.java to all packages and ParamatersAreNonNullByDefault. (#1772) 2020-10-08 08:26:49 -07:00
Anuraag Agrawal 009dd7d20f
Remove assertion on interrupted which is not reliable. (#1760)
* Wait until thread interrupted.

* Remove check on interrupted
2020-10-06 09:16:34 +09:00
Ioannis Mavroukakis 42cdff446c
subsume methods from AttributesKeys to AttributeKey (#1743)
* subsume methods from AttributesKeys to AttributeKey

* remove missed instance of AttributesKeys

* make javadoc wording more representative of method intent
2020-10-04 10:41:37 -07:00
dengliming 71ba8e1b87
Use the concise license header without the year (#1623)
* Use the concise license header without the year

* Use the concise license header without the year
2020-10-02 22:42:53 +09:00
Bogdan Drutu 391043fa1f
Remove redundant type argument conversion (#1734)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-01 18:41:56 -07:00
Anuraag Agrawal 7fe2cd55be
Use awaitility / higher timeout to reduce flakiness. (#1729) 2020-09-30 08:21:24 -07:00
John Watson 4f613da552
Reverse the precedence on Labels and Attributes to prefer the last one added, rather than the first. (#1656)
* Reverse the precedence on Labels and Attributes to prefer the last one added, rather than the first.

Note: this necessitated changing the way Resources were merged, and the way recordException was implemented.
Added an addAll method to the builder to support efficiently addition of attributes from existing attributes.

* run the formatter

* revert 2 unneeded assertion changes

* Update from rebase
2020-09-21 15:58:03 -07:00
John Watson bf52c0af73
Implement the keyed-attributes proposal (#1631)
* Add a generic type for the key on the ImmutableKeyValuePairs.
This necessitated changing the `get` to `getValue` to avoid clashing with the java.util.Map interface.
Also introduced convenience sub-interfaces for consuming labels and attributes, so consumers don't have to worry about the types if they don't want to.

* Make AttributesMap not extend map, and restore the get method name for Attributes.

* key class and implementation

* key class and implementation

* The code compiles

* little tweaks

* some cleanup, tests are passing

* remove AttributeValue and clean up misc. references to it.

* clean up some unused bits

* add a TODO

* a bit of cleanup; fix a todo

* update for changes from the main branch

* Change method to get the underlying key.
Move the key creators to a AttributesKeys class.
Hide the implementation classes and replace with interface use.

* use autovalue for the key implementations

* fix javadoc issues

* update benchmark keys, and a few tweaks from PR review

* Add javadoc notes to encourage using the lower-overhead attribute options.

* Add javadoc clarifying subclass responsibilities around empty keys.

* make the compareTo on AttributeKeyImpl null-safe, for extra safety

* fix formatting
2020-09-21 08:52:40 -07:00
John Watson 27090b8336
Switch to java 8 (#1665)
* switch to java 8

* update the READMEs and use Object.equals in a couple of cases to test that we're really compiling for java 8/android 24.

* formatting

* use the newer release options for the build, and change the int test to not be java 7 any more.

* switch back to source/target compatibility

* sure wish I could run docker locally to test this out.
2020-09-19 11:28:13 +09:00
Jason Liu 51e93f7273
SDK: Remove Javadocs since tags (for pre 1.0 release) (#1650)
* Add since for SDK (corresponding to the version in API)

* Add since based on release branches

* Remove all since tags in SDK
2020-09-17 13:09:08 +09:00
Zoe ce9c966f27
Add config to allow disabling of resource providers (#1640)
* Add config to allow disabling of resource providers
2020-09-16 07:47:40 +09:00
Anuraag Agrawal 751177f6f1
Add FaaS attributes. (#1634)
* Add FaaS attributes.

* Move to javadoc
2020-09-11 10:55:07 -07:00
John Watson d42d4cd9e2
Add a generic type for the key on the ImmutableKeyValuePairs. (#1619)
* Add a generic type for the key on the ImmutableKeyValuePairs.
This necessitated changing the `get` to `getValue` to avoid clashing with the java.util.Map interface.
Also introduced convenience sub-interfaces for consuming labels and attributes, so consumers don't have to worry about the types if they don't want to.

* Add some javadoc to the new interfaces.

* Make AttributesMap not extend map, and restore the get method name for Attributes.

* make ImmutableKeyValuePairs also have a parameterized key type
2020-09-08 19:18:58 -07:00
Anuraag Agrawal c6c179c267
Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode. (#1571)
* Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode.

* Merge
2020-08-28 10:51:39 -07:00
jarebudev 20669f48b6
1556 change resourceconstants to resourceattributes (#1590)
* renamed ResourceConstants to ResourceAttributes, and change to use attributesetter pattern

* tidy up javadoc

* tidy up javadoc
2020-08-25 21:08:44 -07:00
Anuraag Agrawal 3671d2b84d
Add helpers to CompletableResultCode to wait for a result. (#1583)
* Add helpers to CompletableResultCode to wait for a result.

* Flaky?

* Cleanup
2020-08-25 21:06:06 -07:00
Anuraag Agrawal cb50978106
Implement OS and some process resource attributes. (#1555)
* Implement OS and some process resource attributes.

* Update link in javadoc

* pid, docs

* Don't support Android
2020-08-20 09:42:30 -07:00
Ken Finnigan 26597266df
Separate the SDK into separate publishable artifacts (#1525)
* Split single "sdk" module into separate pieces for common, correlationcontext, metrics, tracing, and the combination of them all

* Modify comment to not reference implementation class

* Moved JMH code to /sdk/all

* Move new files to adjusted location

* Move new files from rebase
2020-08-18 13:43:17 -07:00