Commit Graph

630 Commits

Author SHA1 Message Date
jason plumb c82646e44b
stop gap measure to fix api and sdk pom breakage dependency on metrics. (#2346) 2020-12-17 14:00:31 -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
jason plumb 2aa1eb2f54
Metrics are alpha take 2 (#2329)
* omit metrics artifacts (alpha) from the bill of materials (bom)

* Hack the version number for maven publications that end in -metrics.

* Remove the failed attempt.
2020-12-16 20:10:06 -08: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
dengliming 718f512701
Make MetricExporter shutdown method returns CompletableResultCode. (#2321) 2020-12-16 09:11:50 -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
jason plumb 5a93b77524
inject alpha into the version for metrics api and sdk. (#2311) 2020-12-16 12:29:54 +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 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