Commit Graph

133 Commits

Author SHA1 Message Date
Anuraag Agrawal 09d371ba09
Enable tooling for mrjar and use it to get epoch time in best way for Java 8 or 9+. (#2154) 2020-12-01 09:30:05 +09:00
Mateusz Rzeszutek 2130644667
Support process.runtime.* resource attributes (#2143)
* Support process.runtime.* resource attributes

* Code review comments

* Add process.runtime.* attributes to README.md
2020-11-30 10:12:15 -08:00
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
Anuraag Agrawal bd652270dd
Remove usages of beta Guava APIs. (#2095) 2020-11-19 12:18:34 -08:00
Anuraag Agrawal b5efbcf187
Move builders to top level. (#1958)
* Move builders (and TraceStateEntry) to top level.

* Revert Entry

* Fix and more revert

* Drift
2020-11-10 14:50:37 +09:00
Anuraag Agrawal 9c4c52dfee
Switch animal sniffer signature to gummy bears. (#2015) 2020-11-06 08:56:26 +09:00
Bogdan Drutu 2046ec050e
Move testing-internal artifact to sdk-testing (#1987)
* Move testing-internal artifact to sdk-testing

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

* Fix missed usage of TestSpanData

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 13:54:43 -08:00
Anuraag Agrawal 23392d9052
Make Attribute/LabelConsumer consistent with Java 8 BiConsumer (#1983)
* Make Attribute/LabelConsumer consistent with Java 8 BiConsumer

* more

* Spot
2020-11-03 10:03:52 -08:00
Anuraag Agrawal 3d69aa19a8
Restore source/targetCompatibility declarations for intellij to set version correctly and remo… (#1920)
* Restore source/targetCompatibility declarations for intellij and remove animalsniffer for java 8.

* Newer syntax
2020-10-29 08:11:15 -07:00
Anuraag Agrawal 7ebbe7979d
Move API packages to .api. package (#1892)
* Move API packages to .api. package

* Cleanup
2020-10-28 08:39:41 +09:00
dengliming 143acddec8
Move Telemetry SDK AttributeKey to ResourceAttributes (#1895) 2020-10-27 12:57:24 -07:00
Anuraag Agrawal f5082d10f6
Context.with/get, AttributesBuilder/LabelsBuilder.set (#1838)
* Context.with, AttributesBuilder/LabelsBuilder.set

* put
2020-10-21 19:51:14 -07:00
Anuraag Agrawal 0ceff17dfa
Remove since tags until 1.0.0 (#1796)
* Remove since tags until 1.0.0

* Spotless
2020-10-14 09:29:27 -07:00
Anuraag Agrawal e2b5245d73
Rename newBuilder to builder for consistency. (#1790) 2020-10-13 13:17:06 -07:00
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