Commit Graph

1477 Commits

Author SHA1 Message Date
Anuraag Agrawal 44859040ed
Exclude AutoValue generated classes from code coverage. (#2335) 2020-12-17 07:54:59 -08:00
Vladimir Šor ccd8b1b697
Span.Kind is a part of API and should be declared as such. (#2336) 2020-12-17 18:06:36 +09:00
Anuraag Agrawal 9bce6f17fe
Manually structure output of log exporter instead of delegating to unstable toString (#2293) 2020-12-17 14:14:05 +09: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
Chris Burns 86c763827a
Update Zipkin exporter error handling (#2314)
The Zipkin exporter specification for error handling has slightly changed regarding the removal
of the otel.status_description tag in favour for the error tag
2020-12-16 17:43:36 +09:00
Bogdan Drutu 6946732e06
Add custom proto marshaler to avoid unnecessary allocation (#2304)
* Add custom proto marshaler to avoid unnecessary allocation

Some of the differences with the generated code:
1. Avoid builders to construct the marshalers;
2. Use less objects for Attributes because of the way `oneof` generated code is implemented; Also proto files supports arrays of any combination which is not the case for us.
3. Take advantage on the fact that data we know are immutable, no need to wrap to unmodifiable list/maps etc;

Unfortunately we cannot get the whole performance back because we need to write a custom Marshaler for grpc (which is possible but try to limit the PR size).

As the numbers show we have ~25% improvement in CPU and ~15% in memory with this PR. With a custom marshaler we can get anoter 7% CPU and 7% memory.

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

* Always send the message information even if empty values

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

* Test for error status

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

* Test for valid ParentSpanId

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

* Fix order in status fields

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

* Address feedback from code review

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

* Avoid one extra object BytesString, use byte array always

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

* Fix things after PR that moved proto conversions

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 22:32:54 -08:00
Anuraag Agrawal 3abf8262d0
Remove protobuf_util where not used. (#2317)
* Remove protobuf_util where not used.

* Revert unintended
2020-12-16 15:27:56 +09:00
Anuraag Agrawal 05a2049095
Test AWS HttpClient TLS connection (#2308) 2020-12-16 14:38:29 +09:00
Anuraag Agrawal 099b5620da
Move OTLP adapters to otproto module for use outside of gRPC exporters. (#2306) 2020-12-16 13:14:01 +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
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
John Watson f2ee66281e
changelog updates for Dec 15 2020 (#2313)
* changelog updates for Dec 15 2020

* add an entry I missed
2020-12-15 19:12:09 -08:00
John Watson 76e10c5102
CONTRIBUTING.md update with some more best practices. (#2301)
* add a section on class member ordering, since it's not covered in the google style guide

* add an item about toString methods

* add a note about final fields coming before non-final
2020-12-16 11:21:16 +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
John Watson eccbfebf38
Another option for release versioning proposal (#2250)
* Add rationale and description of the release and versioning strategy.

* typo fix

* alternate version of the versioning strategy that tags the version rather than the artifact.

* add context for clarity

* Update docs/rationale.md

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>

* add some additional flavor about internals and mention the bom in an example

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-12-15 14:12:59 -08:00
Bogdan Drutu 37afb33659
Split global functionality into a separate class (#2233) (#2239)
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 13:05:46 -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 44186bc110
Suppress checkstyle javadoc check from non-main source sets. (#2307)
* Suppress checkstyle javadoc check from non-main source sets.

* Update checkstyle-suppressions.xml
2020-12-15 09:39:33 -08:00
Anuraag Agrawal 36062bf4b1
Exclude SemanticAttributes from coverage. (#2303) 2020-12-15 08:43:43 -08:00
Frank Spitulski c108f62158
fix(semantic-attributes): update to dec 14 2020 master (#2302) 2020-12-15 08:42:33 -08:00
Anuraag Agrawal e802b8ab35
Detect invalid use of makeCurrent in Kotlin coroutine. (#2227)
* Detect invalid use of makeCurrent in Kotlin coroutine.

* Fix and check suspending function too.

* Newline

* Doc

* Some comments

* teency
2020-12-15 15:09:34 +09: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 13e6485a63
Add Context.toString (#2289) 2020-12-15 11:57:36 +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
dengliming acd063c302
Fix comment and remove import (#2300) 2020-12-14 11:55:35 -08:00
Anuraag Agrawal f626cb9705
Move export processor builders to top level. (#2286) 2020-12-14 11:38:03 -08:00
Anuraag Agrawal cd226f14c4
Move exporter builders to top level. (#2294) 2020-12-14 11:32:57 -08:00
Anuraag Agrawal 4403923bed
Migrate AWS mock server tests to junit5. (#2287) 2020-12-14 10:20:19 -08:00
Anuraag Agrawal 6f97da1261
Make AttributeKey compare normally with both type/key. (#2284)
* Make AttributeKey compare normally with both type/key.

* Say hi to murphy
2020-12-14 09:56:56 -08:00
Bogdan Drutu 8a8799ec9e
Small nit in internal members order (#2232)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-12 16:18:38 -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
jason plumb 5e891ccad9
make imports consistent with other files in this package. (#2280) 2020-12-11 15:38:42 -08: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