Commit Graph

112 Commits

Author SHA1 Message Date
John Watson 20a1601089
[Breaking Change] Rename getEmpty() to empty() (#2831) 2021-02-17 08:15:23 -08:00
Anuraag Agrawal bace5dce1f
Rename disabled resources property to be consistent with agent. (#2792)
* Rename disabled resources property to be consistent with agent.

* property > env
2021-02-12 13:45:33 +09:00
Anuraag Agrawal 170cb4533a
Add VERSIONING document and make sure all internal packages have doc … (#2775)
* Add VERSIONING document and make sure all internal packages have doc about internalness.

* Make internal package caveat even stronger

* Users must not use internal package.
2021-02-10 09:22:44 -08:00
Bogdan Drutu bc326c6c0d
Clarify thread-safety requirements for SDK components, fix small issues (#2708)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-04 09:16:23 -08:00
John Watson d16e51f798
Remove the remaining deprecated code from the project. (#2612) 2021-01-29 19:26:42 -08:00
Anuraag Agrawal 1a56b8b0d8
Migrate api / sdk projects to build.gradle.kts (#2609) 2021-01-29 10:10:40 -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 760b012430
Migrate to guava JRE version (#2590) 2021-01-27 13:28:57 +09:00
John Watson 1f84ec099b
Create a MANDATORY Resource instance containing mandatory attributes. Merge that into the default resource. (#2366)
* Assign a fallback service name to resources when building the signal Provider instances.

* Add a MANDATORY resource that will contain all mandatory attributes.

* some cleanups of leftover stuff

* make the MANDATORY resource instance private

* updates from ResourceAttributes changes

* be sure to set the service name in the jaeger tests
2021-01-21 09:01:16 -08:00
John Watson 2afae7b024
Reverse the direction of the Resource.merge (#2542) 2021-01-20 08:10:07 -08: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
Anuraag Agrawal e0f6260bc9
Remove ConfigBuilder and deprecated exporter constants / timeouts (#2506)
* Remove deprecated usage from exporters

* Remove ConfigBuilder and deprecated exporter settings.
2021-01-14 09:31:03 +09:00
Anuraag Agrawal d93a4b2585
Fix logging statement for java version (#2464) 2021-01-08 14:05:40 +09:00
Anuraag Agrawal bdbab03332
Deprecate ConfigBuilder. (#2442) 2021-01-07 08:52:39 -08:00
Anuraag Agrawal 70f665992e
Migrate assertThrows -> assertThatThrownBy (#2375) 2020-12-21 08:57:33 -08:00
Anuraag Agrawal 4de9c43ac0
Use public readProperties instead of protected fromConfigMap to avoid annoying pattern of initializing a subclass for testing. (#2357) 2020-12-18 08:10:50 -08: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
Anuraag Agrawal 17fa4e9c97
Only apply java-library to projects and configure reactively. (#2319)
* Use java-library

* Only apply java-library to projects and configure reactively.

* Consistency

* Cleanup
2020-12-17 09:11:44 +09:00
Anuraag Agrawal 8a369e3695
Make public src/main classes final where possible. (#2309)
* Make public src/main classes final where possible.

* methods

* Spot
2020-12-16 13:13:04 +09:00
Anuraag Agrawal 3701a8bdf6
Move DaemonThreadFactory to internal package. (#2288) 2020-12-14 21:06:00 -08:00
Bogdan Drutu 396fa44601
Change ComponentRegistry to be a final class that accepts a factory method (#2256)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 20:26:06 -08:00
John Watson 49ef0fd67e
Make JavaVersionSpecific non-public. (#2253) 2020-12-10 09:07:46 +09:00
John Watson c5e951ecba
fix some out-of-date javadoc (#2252) 2020-12-09 14:56:39 -08:00
Anuraag Agrawal b9d62d2f08
Hide ResourcesConfig.Builder (#2222) 2020-12-09 11:23:28 +09:00
Anuraag Agrawal c37e6e1d6e
Use hyphen for thread name prefix. (#2194) 2020-12-04 07:37:51 -08:00
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -08:00
Armin Ruech 5585e73611
Remove "semver" prefix from instrumentation library version (#2180) 2020-12-02 10:29:11 -08:00
Anuraag Agrawal cf5b582c5b
Replace AttributeConsumer with BiConsumer (#2174)
* Replace AttributeConsumer with BiConsumer

* Forgot to delete
2020-12-02 16:52:06 +09:00
Anuraag Agrawal 18355e9683
Remove Guava dependencies from SDK (#2148)
* Remove Guava from SDK

* Clean
2020-12-01 11:10:38 -08:00
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