Commit Graph

620 Commits

Author SHA1 Message Date
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 3701a8bdf6
Move DaemonThreadFactory to internal package. (#2288) 2020-12-14 21:06:00 -08:00
Anuraag Agrawal 262dd7a866
Use key as AttributeKey.toString (#2175)
* Use key as AttributeKey.toString

* Fix / more tests

* Add toString test for SpanWrapper

* Quote string values

* Fix
2020-12-15 12:49:45 +09:00
Anuraag Agrawal 7ff20f6db6
Move Sampler builder to top level (#2291)
* Move Sampler builder to top level

* Hide implementation class

* Ordering
2020-12-15 10:16:08 +09: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
Anuraag Agrawal f626cb9705
Move export processor builders to top level. (#2286) 2020-12-14 11:38:03 -08:00
Bogdan Drutu 634a9d9f72
Call point constructor with the value got instead of getting the value again (#2278)
Not a problem in the Double version where this is implemented correctly.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-11 21:01:26 -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
Bogdan Drutu d4bddd1fdf
Change MetricData to be consistent with protos, move creation to the Aggregation (#2274)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-11 11:04:12 -08: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 59f54bdb9f
Introduce accumulator concept (#2269)
The code already existed as part of the instrument, but it was extracted in a separate concept,
and all Sync/Async instruments look very similar: Descriptor + Accumulator.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 18:04:41 -08:00
Bogdan Drutu 63aa8e91ab
Move the building/registration logic down the stack to avoid duplicate code (#2267)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 10:25:11 -08:00
Bogdan Drutu ca1f31dfb5
Use standard Java interfaces instead of defining custom ones (#2261)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 09:16:24 -08:00
Bogdan Drutu 252f8f385f
Change bound factory to accept Aggregator (#2258)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 08:21:16 -08:00
Bogdan Drutu 78d1ad5cce
Remove unnecessary generic argument from AsynchronousInstrument (#2260)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 08:20:36 -08:00
Bogdan Drutu 5d269502c7
Avoid passing the meter SDK instance if unnecessary (#2259)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 08:09:16 -08:00
Bogdan Drutu 8fc66bf36e
Change AbstractSynchronousInstrument to accept a bound factory instead of abstract method (#2257)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 20:35:03 -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
Bogdan Drutu feedef2366
Rename accumulator to processor to match Go (#2255)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 20:19:31 -08:00
Anuraag Agrawal 56235a1114
Move TraceConfig.Builder to the top level (#2241)
* Move TraceConfig.Builder to the top level

* Remove builder
2020-12-09 19:54:07 -08:00
Bogdan Drutu 583b2cc68b
Remove unused fields from AbstractInstrument (#2254)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 17:15:43 -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
Bogdan Drutu ae63b9fbe7
Update types to reflect the names in proto (#2243)
* Update types to reflect the names in proto

NON_MONOTONIC_SUM will be soon merged with SUM and offer the "isMonotonic" as a property.

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

* Update names to follow, type + aggregation pattern

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 13:13:32 -08:00
Bogdan Drutu 658ab98610
Remove all implementations of the InstrumentAccumulator, kepp only the AllLabels (#2248)
This PR fixes a small bug where the AllLabels implementation was expecting "unmapped" boolean, which was passed correctly by the Sync instruments, but incorrectly by the Async.
This causes an unnecessary allocation for all the async instruments recordings.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 13:12:15 -08:00
Anuraag Agrawal f199e133fa
Implement more Span default methods. (#2242)
* Implement more Span default methods.

* A bit more
2020-12-09 13:08:52 -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
Bogdan Drutu d9260d0656
Rename batcher to instrumentaccumulator, remove active batcher (not used) (#2245)
* Rename batcher to instrumentaccumulator, remove active batcher (not used)

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

* Fix tests, add back check for has records

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 11:27: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
Anuraag Agrawal b9d62d2f08
Hide ResourcesConfig.Builder (#2222) 2020-12-09 11:23:28 +09:00
John Watson a511af4b85
Add a section to the TracerSdkManagement.shutdown javadoc to make it clear it is a terminal operation. (#2229) 2020-12-08 12:54:05 -08:00
Anuraag Agrawal e4e3dfbdb0
Rename Link.getContext -> Link.getSpanContext (#2224) 2020-12-08 10:43:26 -08:00
Bogdan Drutu efd6b9f3e4
Remove deprecated setCallback, change SDK to avoid volatile (#2216)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 18:37:45 -08:00
Bogdan Drutu 5732395b83
Mark as package protected deprecated Multi classes in SDK (#2217)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 18:16:57 -08:00
Bogdan Drutu 69208f8f79
Remove version of checkArgument not used (#2213)
This PR fixes an inconsistency that MaxLengthOfAttributeValues was allowed to be set to 0, then thrown internal exception.
We should check for arguments only at public APIs.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 13:39:33 -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
Anuraag Agrawal 469900eb34
Add a system property that can enable strict context checking for staging environments. (#2195) 2020-12-07 12:38:27 +09:00
Anuraag Agrawal c37e6e1d6e
Use hyphen for thread name prefix. (#2194) 2020-12-04 07:37:51 -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
Anuraag Agrawal 8697de9afa
Detect GC leaks of scopes in StrictContextStorage. (#2164)
* Detect GC leaks of scopes in StrictContextStorage.

* More

* Finish

* Force GC more aggressively

* Cleanup

* Vendor code directly

* Copy test too

* Try waiting more

* ep

* oops

* Remove from build.gradle

* Drift

* Log on multiple

* Cleaner ourselves.

* EP

* Move into if

* Revert accidental
2020-12-04 13:04:27 +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
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -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
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
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
Anuraag Agrawal 18355e9683
Remove Guava dependencies from SDK (#2148)
* Remove Guava from SDK

* Clean
2020-12-01 11:10:38 -08:00