Commit Graph

145 Commits

Author SHA1 Message Date
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
Anuraag Agrawal b4218426ee
Prevent setting global OpenTelemetry twice. (#2548)
* Prevent setting global OpenTelemetry twice.

* Unneessary volatile

* Separate testing class

* Cleanup

* Delete

* Update api/all/src/main/java/io/opentelemetry/api/GlobalOpenTelemetry.java

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

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-01-21 13:55:46 +09:00
Anuraag Agrawal 4f8de1521b
Make OpenTelemetrySdk propagators final (#2543) 2021-01-18 14:01:37 +09:00
Anuraag Agrawal 6bee59e912
Remove OpenTelemetry SPI (#2504) 2021-01-14 11:35:41 +09:00
Bogdan Drutu 957bd0ad1c
Move jmh benchmarks to the artifact that is testing (#2515)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 14:05:51 -08:00
Bogdan Drutu ca661b8c40
Avoid using inner classes in SpanData (#2495)
* Avoid using inner classes in SpanData

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

* Javadoc cleanups

* Remove non-existent type param

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-01-12 19:12:00 -08: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 620969556f
Cleanup OTLP exporter timeout settings. (#2446)
* Cleanup OTLP exporter timeout settings.

* error prone
2021-01-09 15:32:20 +09:00
Bogdan Drutu 757cd79889
With all the operations on the Aggregator, no need to define Accumulation (#2462)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-08 08:28:08 -08:00
Anuraag Agrawal 75e01110e4
Deprecate OpenTelemetry SPI. (#2453) 2021-01-08 13:37:44 +09:00
Anuraag Agrawal 4b8a0c8591
Add TraceConfig.builder() (#2445) 2021-01-07 10:02:53 -08:00
Anuraag Agrawal 6cf8f934b1
Update dependencies (#2427)
* Update dependencies

* Brave
2021-01-06 16:32:18 +09: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
Bogdan Drutu 838be8ef8e
Move accumulations to a different package (#2412)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-28 17:52:20 -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
Bogdan Drutu b1a22e03a6
Rename Aggregator -> AggregatorHandle; AggregatorFactory -> Aggregator (#2395)
* Rename Aggregator -> AggregatorHandle; AggregatorFactory -> Aggregator

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

* Update comments for Aggregator and AggregatorHandle

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-24 08:11:18 -08:00
Anuraag Agrawal 9f675da85a
Remove usage of updateTraceConfig in tests. (#2402)
* Remove usage of updateTraceConfig in tests.

* Clean
2020-12-23 08:15:50 -08:00
Anuraag Agrawal 24ef29efea
Add SimpleSpanProcessor.create and deprecate SimpleSpanProcessorBuilder (#2374)
* Deprecate SimpleSpanProcessorBuilder

* Null test
2020-12-23 12:31:02 +09:00
Anuraag Agrawal d48eab6aa9
Allow registering TraceConfigSupplier and use it from zpages. (#2390)
* Allow registering TraceConfigSupplier and use it from zpages.

* Finish

* Remove unnecessary method

* Same method name
2020-12-23 11:52:17 +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 296723b9f7
Change aggregator to use generics for Accumulation (#2382)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 11:40:20 -08:00
Bogdan Drutu 927fddc4e1
Add a notion of Accumulation as the value passed between Accumulator … (#2379)
* Add a notion of Accumulation as the value passed between Accumulator and Processor

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

* Fix PR review comments

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-21 13:12:46 -08: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 fb5b497986
Allow adding span processors when building a tracer provider. (#2223)
* Allow adding span processors when building a tracer provider.

* Drift

* Mutate provided providers too for now.

* Spot
2020-12-18 13:04:24 -08:00
Anuraag Agrawal 94422d9dc0
Remove dependency on metrics from sdk:all (#2356)
* Remove dependency on metrics from sdk:all

* Update sdk/all/build.gradle

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2020-12-18 08:16:04 -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
Bogdan Drutu a8b30ea503
Remove deprecated code in the API (#2341)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-17 13:18:05 -08:00
Bogdan Drutu cbc8891cae
Mark API's classes final, caveat a bit of duplicate code (#2324)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-17 11:16:35 -08: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
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 7c0b452097
Move SdkTracerProviderBuilder and OpenTelemetrySdkBuilder to top-level. (#2318) 2020-12-16 10:56:49 -08: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
Bogdan Drutu 2866424b90
Remove duplicate getters and builder options from SDK (#2231)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-16 13:12:04 +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
Anuraag Agrawal 91dc119181
Move Sdk to be prefix of implementation classes instead of suffix/midfix. (#2292) 2020-12-14 11:59:28 -08:00
Bogdan Drutu c8f1f27f07
Remove OpenTelemetryBuilder interface, every implementation will have it's own builder (#2275)
This PR also fixes the DefaultOpenTelemetry builder to be it's own class and not a sub-class.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-12 13:09:58 +09:00
Nikita Salnikov-Tarnovski 4a400fed2c
Some example of possible SDK configuration (#2263)
* Some example of possible SDK configuration

* Format
2020-12-11 18:12:13 +09:00
Prashant Srivastava f88e207f09
Adding instructions to run benchmarks (#2271)
* benchmark readme for opentelemetry-sdk

* benchmark instructions for all the modules

* Fixing typo
2020-12-11 14:40:16 +09: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
Prashant Srivastava 4c886ddc20
Span benchmark with OTLP exporter and collector (#2214)
* Refactored benchmark to use OTLP exporter and collector

* Refactoring to add  benchmarks with Simple and Batch span processors

* Removing otlp exporter from the collector config

* Using setTraceConfig to set the initial config rather than update it

* Spotlessapply
2020-12-09 13:03:20 -08:00
Anuraag Agrawal 9d9c88a78b
Remove Obfuscated marker interface. (#2221)
* Remove Obfuscated marker interface.

* Drift

* Update OpenTelemetrySdk.java
2020-12-08 20:59:04 -08:00
Bogdan Drutu 50c8f1f5c6
Move obfuscated to sdk, make it package protected (#2208)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 12:47:01 -08:00
Bogdan Drutu 7460f92bc8
Remove deprecated methods/classes before 1.0 release (#2205)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 11:33:17 -08:00
John Watson c03efbcc13
Add an option to the SDK builder to specify an initial TraceConfig (#2192)
* Add an option to set the initial TraceConfig when building an SDK, and a TracerSdkProvider.

* add the missing javadoc
2020-12-04 14:12:48 +09:00
Prashant Srivastava efe5fbf0aa
Refactoring span benchmarking as per the spec (#2186)
* Refactoring SpanBenchmark to span configuration by the spec

* Some style check changes
2020-12-03 12:12:38 -08:00
John Watson d7ab0addfa
Add an option to set an IdGenerator when building an SDK. (#2185)
rename a few lingering pluralized idGenerator symbols.
2020-12-03 09:18:05 +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
Anuraag Agrawal 14d23dcd46
Some more test coverage for OpenTelemetrySDK. (#2130)
* Some more test coverage for OpenTelemetrySDK.

* Fix assertion

* Update OpenTelemetrySdk.java
2020-11-25 18:12:56 -08:00
Anuraag Agrawal 8b1c4c50d1
Shutdown BSP in benchmarks (#2127) 2020-11-25 11:13:17 -08:00
Anuraag Agrawal 96c7f404b4
Don't repeat Java 8 support among all the subproject READMEs and at top level, clarify that published artifacts are Java 8, but building requires additional instructions. (#2124) 2020-11-24 09:04:40 -08:00
John Watson 4897f4c320
rename tracing to trace for the module (#2112) 2020-11-23 10:14:33 -08:00
Anuraag Agrawal 7c29e2b6ed
Fix post-merge conflict by using public APIs to test. (#2106)
* Fix post-merge conflict by using public APIs to test.

* IDE fail
2020-11-20 08:18:11 -08:00
Anuraag Agrawal d940947e53
Hide implementation of MultiSpanExporter/Processor behind interface. (#2091)
* Hide implementation of MultiSpanExporter behind interface.

* spanprocessor too

* composite

* composite

* Optimize composites based on number of items.

* Spotless

* IntelliJ + spotless race condition

* Fix test
2020-11-20 10:54:35 +09:00
John Watson c0b53e9901
Add the option to add SpanProcessors when building an OpenTelemetrySdk instance (#2102)
* add the ability to add span processors to the SDK when building.

* formatting
2020-11-19 17:54:11 -08:00
John Watson 96b480cd35
Deprecate the toBuilder methods on the OpenTelemetry classes, and add a method to set the propagators on an instance. (#2094) 2020-11-19 12:39:21 +09:00
John Watson 7a5d8df148
Make the OpenTelemetrySdk a subclass of DefaultOpenTelemetry (#2069)
* Make the OpenTelemetrySdk a subclass of DefaultOpenTelemetry

* Remove SPI from the explicit OpenTelemetrySdk builder usage.
Add a (super ugly) test to make sure that the clock and resource are getting set.

* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* address code review comments; add tests

* Require the MeterProvider to be a MeterSdkProvider

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-11-16 16:06:43 -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
John Watson d69752a6be
Move the SPI interfaces to .spi.* packages (#2005) 2020-11-06 11:08:35 +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 e6f6f19cc9
Remove BaggageManager for real. (#1929)
* Remove BaggageManager for real.

* Spot
2020-10-29 20:42:00 -07: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 ba1fabeb64
Hide Default* implementations behind interface factory methods. (#1904)
* Hide Default* implementations behind interface factory methods.

* Renames
2020-10-29 08:02:44 -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
Anuraag Agrawal 934c9ed8a3
Make OpenTelemetrySdk implement the OpenTelemetry interface and have SPI find it. (#1857) 2020-10-24 19:39:26 -07:00
Anuraag Agrawal 23444d6e5c
Update google java format to 1.9 (#1854)
* Update google java format to 1.9

* Spotless

* Update Contributing.md
2020-10-23 12:47:10 +09:00
Bogdan Drutu 52a6af86d4
Remove baggage sdk package, move tests to API (#1865)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-22 09:55:28 -07:00
Anuraag Agrawal ea1a0a0486
Rename OpenTelemetry interface methods to normal interface conventions. (#1842) 2020-10-21 19:21:57 -07:00
John Watson e13e631847
Make the baggage API fully functional in the API (#1822)
* Make the baggage API fully functional in the API
and get rid of the BaggageManager that was needed previously.

* javadoc cleanup

* more javadoc cleanup

* make the ImmutableBaggage package access
2020-10-20 21:57:17 -07:00
John Watson 57097873c8
rename StatusCanonicalCode to StatusCode (#1804) 2020-10-15 17:55:05 -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 d361dfa2f9
Remove SpanData implementation classes from public API. (#1761) 2020-10-06 10:17:11 -07:00
Bogdan Drutu 6c660d92e5
Add overload for setStatus without description, fix usages (#1754)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 09:05:46 -07:00
Bogdan Drutu eb4a18febc
Remove Status object from API, keep StatusCanonicalCode (#1741)
* Remove Status object from API, keep StatusCanonicalCode

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

* Respond to comments, change more old usages

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

* Fix build, run gojf

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 11:33:40 +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
John Watson 0746ddbf68
Expose a new TracerSdkManagement interface on the OpenTelemetrySdk class. (#1723)
* have the TracerSdkProvider return the public interface, rather than a package-access class.

* change the OpenTelemetrySdk to return a management interface, rather than the SDK implementation class directly.

* formatting fix

* rename methods/parameters for the new interface
get rid of almost all production-code references to the TracerSdkProvider

* update some docs that still refer to using the old method/class
2020-10-02 10:39:07 +09:00
Bogdan Drutu 790018f004
Remove addLink that accepts Link interface (#1732)
* Remove addLink that accepts Link interface

Currently the Link interface cannot easily be removed, used in the Sampler interface,
will do a separate PR for that.

Based on the specs we don't have to offer a "lazy" formatted Link API (was removed some time ago).

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

* Copy javadoc instead of reference

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

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2020-10-01 18:24:02 -07:00
Bogdan Drutu b78fbb31fa
Remove Event interface, and it's usage (#1733)
* Remove Event interface, and it's usage

Based on the specification we are not required to expose this interface or have APIs that accept this interface.

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

* Fix links to Event

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

* Fix more javadocs references to Event

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-02 10:05:28 +09:00
Bogdan Drutu 5fa1dbab87
Remove Descriptor from metrics data to be consistent with proto (#1716)
* Remove Descriptor from metrics data to be consistent with proto

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

* Remove references to descriptor

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-30 08:07:48 -07:00
Bogdan Drutu 840ae850ec
Rename CorrelationContext with Baggage (#1691)
* Rename CorrelationContext with Baggage

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

* Fix review comments

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

* Rename contextBuildet to baggageBuilder

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-26 08:42:01 -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
John Watson 485cc52c6f
SpanContext hides the TraceId/SpanId implementations (#1594)
*  This is a combination of 2 commits.
 This is the 1st commit message:

WIP on converting to String-based SpanContext

don't hand out the byte arrays publicly, but require making copies

make sure to hand out fresh invalid byte arrays.

Use strings for span and trace ids.

Switch over to CharSequence instead of String for the ids

Fix a couple of places that were casting to String

Add some simple wrappers for the generated longs to save converting until the last moment to the character-based representation.

introduce a reusable threadlocal char buffer for generating random ids.

update for changes from upstream

Change the SpanContext to store the ids as Strings internally
Change the id access methods on SpanContext to be clearly labeled as the base16 representations
Add a new create method that allows specifying offsets for traceId and spanId CharSequences

Provide an option for creating a SpanContext from longs or Strings, optionally.

fix a typo

update from upstream

 The commit message #2 will be skipped:

 don't hand out the byte arrays publicly, but require making copies

* WIP on converting to String-based SpanContext

* Update the SpanContext to only store Strings internally for Trace and Span ids.

* remove dead files

* cleanup some CharSequence usages to String

* Update api/src/main/java/io/opentelemetry/trace/BigendianEncoding.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update extensions/trace_propagators/src/main/java/io/opentelemetry/extensions/trace/propagation/B3PropagatorInjectorSingleHeader.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update api/src/main/java/io/opentelemetry/trace/SpanId.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update api/src/main/java/io/opentelemetry/trace/TraceId.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* updates from PR suggestion fubars

* some cleanup from PR feedback

* Switch back to String from CharSequence

* Get rid of the overload with the offsets

* Lots of bits of cleanup from PR feedback.

* more renaming of base16 to hex

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-03 10:03:41 -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
Nikita Salnikov-Tarnovski af39f35086
More aggresive version of BatchSpanProcessor (#1579)
* More aggresive version of BatchSpanProcessor

* Add benchmark

* Polish

* Polish

* Incorporated some changes from #1571

* Rollback one test change

* Polish

* Polish
2020-08-26 08:22:39 -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