Commit Graph

840 Commits

Author SHA1 Message Date
Bogdan Drutu 70a7ce19d4
Decouple the getter methods for the Span in a different class. (#420)
* Decouple the getter methods for the Span in a different class.

* Use the getSpanContext method on the ReadableSpan.
2019-06-20 14:02:46 -07:00
Yang Song dd9f53be10 Replace static variable TraceConfig.DEFAULT with getter. (#418) 2019-06-20 11:59:53 -07:00
Yang Song 7acb9dd791 Fail the build on warnings with '-Werror'. (#417)
* Fail the build on warnings.

* Only enable for Java 8-. Fix warnings.
2019-06-19 20:00:41 -07:00
Yang Song 7d42e11df2 Add RecordEventsSpanImpl to SDK. (#362)
* Add RecordEventsSpanImpl to SDK.

* Add toSpanProto.

* StartEndHandler -> SpanProcessor. Remove sampleToLocalSpanStore. Fix events.

* Remove ConcurrentIntrusiveList.

* Replace TraceEvents<E> with EvictQueue + total count.

* Move proto utils to another class.

* Remove TraceProtoUtils from this PR.

* Remove duplication in tests.

* Remove hasRemoteParent to match proto changes.

* Fix merge error.

* Remove toSpanData. Reduce visibility.

* Use Link interface as types.
2019-06-19 18:16:09 -07:00
Yang Song c097cdada2 Add utilities to convert to Trace Protos in SDK. (#413) 2019-06-19 18:15:44 -07:00
Yang Song 1511e1b482 Fix all errorprone warnings, ignore genproto files. (#414)
Fixes #375.
Fixes #182.
2019-06-19 18:09:43 -07:00
Armin Ruech 8520de5581 Tracer API: Fix doc regarding default propagation formats (#405) 2019-06-17 19:05:22 +02:00
Pavol Loffay 0338a3f7c8 Add span builder to SDK (#385)
* Add span builder to SDK

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-06-17 18:43:11 +02:00
Yang Song 69e2c48628 Fix an incorrect javadoc. (#407) 2019-06-14 18:15:08 -04:00
Carlos Alberto Cortez 7222d37ee1
Make SpanData take *base* Link objects. (#403)
We were taking SpanData.Link objects instead.
2019-06-12 22:38:44 +02:00
Carlos Alberto Cortez 7cd91aff2a OT Shim: Return null for activeSpan() if it's DefaultSpan. (#399)
* OT Shim: Return null for activeSpan() if it's DefaultSpan.

* Clarify that the null case for ScopeManager.active()

* Use DefaultSpan.getInvalid() to do the actual comparison.
2019-06-11 08:33:28 -07:00
Carlos Alberto Cortez 50a2db42b2 Rename tags to dctx (#381)
* Rename tags to dctx (and related members).

* Implement the renamed dctx layer for the Sdk.

* Fix inline doc.

* Rename dctx to distributedcontext.

* Rename distributedcontext Attribute* to Entry*.

* Rename dctx to distributedcontext in the Sdk.

* Update the recently added SDK classes.
2019-06-10 11:24:54 -07:00
Tyler Benson bfcd5ce9be Initial implementation for TagMapSdk and Builder. (#367)
* Initial implementation for TagMapSdk and Builder.

Impl and tests mostly taken from OpenCensus

* Refactor for updated API

Now have to handle parent relationships.

* Review fixes

* Remove visibility for TagMapSdk

Builder already exposed via TaggerSdk, so this doesn’t need added visibility.

* Added test cases and removed unused constructor.

* Add test case and todo
2019-06-10 09:00:49 -07:00
Yang Song 7684efbcb8 Use random IDs instead of invalid in default span. (#382)
* Use random IDs instead of invalid in default span.

* Add getInvalid API.
2019-06-10 08:58:24 -07:00
Bogdan Drutu b0a49827aa
Remove fully qualified Samplers class in comments. (#398) 2019-06-07 14:51:05 -07:00
Pavol Loffay cb0e85d433 Move samplers to util package (#396)
* Move samplers to util package

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Move tests

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-06-07 14:28:35 -07:00
Yang Song bfe56101d1 More cleanup on static variables. (#397) 2019-06-07 13:22:29 -07:00
Carlos Alberto Cortez c2c7ed4975 Make Link an interface. (#395)
* Make Link an interface.

* Rename LinkTest to SpanDataLinkTest.
2019-06-07 09:45:10 -07:00
Yang Song fb0f5339cd Make invalid SpanContext package-private. (#394) 2019-06-06 14:26:04 -07:00
Yang Song 27af3a17c3 Rename Blank SpanContext to Invalid. (#383) 2019-06-06 12:48:41 -07:00
Bogdan Drutu f2f353d0f1
Fix examples in Meter. (#384) 2019-06-06 11:49:04 -07:00
Pavol Loffay c62fe501b8 Remove resource setter and getter from Tracer (#387)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-06-06 11:33:22 -07:00
Carlos Alberto Cortez c75cc68123 Clean up the Link handling in Span. (#388)
* Clean up the Link handling in Span.

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

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

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

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
2019-06-06 11:30:07 -07:00
Pavol Loffay 4bbb74dee2 Fix comment in startSpan (#386)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-06-06 09:10:19 -07:00
Carlos Alberto Cortez bdfdeef7e7 API: Have TraceId/SpanId constructors taking long values. (#365)
* Have TraceId/SpanId constructors taking long values.

* Add a clarification on the TraceId/SpanId ctors taking longs.

* Add one more small note about equivalency.
2019-06-05 17:01:02 -07:00
Yang Song f62dbff017 Use static methods instead of variables. (#379)
* Each DefaultSpan has a unique span id. Remove INSTANCE.

* Use static methods instead of variables. Fixes #309.

* Fix the order of static fields.

* Revert random SpanId from this PR.
2019-06-05 16:34:53 -07:00
Yang Song 4172855fcd Rename BlankSpan to DefaultSpan. (#376) 2019-06-05 13:14:39 -07:00
Yang Song c298234a9b Fix a stale Javadoc. (#377) 2019-06-05 08:58:28 -07:00
Carlos Alberto Cortez 60013e3de6
OT Shim: Small cleanup of the public TraceShim class. (#374)
* Make the public methods static.
* Update the documentation.
2019-06-04 23:17:51 +02:00
Carlos Alberto Cortez b9c7c6bacc
OT Shim: Handle the specific TextFormat Inject/Extract formats too. (#372) 2019-06-04 19:53:08 +02:00
Carlos Alberto Cortez 745a707720
OT Shim: Only set Span.Kind at build time if it is not null. (#373) 2019-06-04 19:46:57 +02:00
Carlos Alberto Cortez 005db45a0f Fix comment for addEvent() as there is no setAttributes() anymore. (#370) 2019-06-03 14:27:28 -07:00
Carlos Alberto Cortez db59b5e10b Fix comment for Span.end() as there's no overload taking options anymore. (#371) 2019-06-03 14:27:05 -07:00
Carlos Alberto Cortez 16477dc96f Add a small clarification on Span.Builder.setNoParent(). (#364)
* Add a small clarification on Span.Builder.setNoParent().

* Add a comment for setParent() too.
2019-05-31 12:55:42 -07:00
Yang Song 0a0a27eeeb Rename package resource to resources. (#366)
* Rename package resource to resources.

Fixes #259.

* One more replace.
2019-05-31 12:55:02 -07:00
Sergey Kanzhelev cadf603cc1
Updating according to the list in community repo (#363)
https://github.com/open-telemetry/community/blob/master/community-members.md
2019-05-31 09:03:09 -07:00
Bogdan Drutu 921c79fa77
Add a SpanExporter interface and a simple span-processor implementation. (#305)
* Add a SpanExporter interface and a simple spanprocessor implementation.

* Remove unused method.
2019-05-31 08:00:10 -07:00
Yang Song 9691526507 Add ProbabilitySampler in SDK. (#337)
* Add ProbabilitySampler in SDK.

* Add more tests.

* Fix merging error.
2019-05-31 07:59:49 -07:00
Yang Song 32fad432ca Add a note in SpanData documentation. (#361) 2019-05-30 17:15:25 -07:00
Tyler Benson d0e397cc9a Move [Span|TagMap]InScope and share between api/sdk (#348)
* Move [Span|TagMap]InScope and share between api/sdk

Removes duplication between the two projects

Fixes #333

* Add javadocs to new classes.

* Add @since attributes to javadocs

* Remove CurrentTagMapUtils

* Route scope creation through ContextUtils

and make scope classes access restricted.
2019-05-30 10:53:28 -07:00
Yang Song e76f543b00 Implement TimedEvent in SDK. (#354)
* Implement Event in SDK.

* Make EventSdk package-private.

* EventSdk -> TimedEvent.
2019-05-30 10:44:35 -07:00
Carlos Alberto Cortez 2afd4d3be5 Apply same logic for parent to TagMap as we do for Span. (#356) 2019-05-30 08:52:33 -07:00
Bogdan Drutu 4a3a335491
Move simple samplers to the Samplers class. (#360) 2019-05-30 08:03:44 -07:00
Bogdan Drutu 4ca9c116f0
Replace deprecated isSameAs with isSameInstanceAs. (#359)
* Replace deprecated isSameAs with isSameInstanceAs.

* ./gradlew goJF
2019-05-29 21:02:28 +03:00
Pavol Loffay 2c08990bd6 Use tracecontext format in tracer SDK (#351)
* Use tracecontext format in tracer SDK

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Add test

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-05-29 20:56:28 +03:00
Pavol Loffay ade08cdcd2 Return sampler decision with tags from Sampler (#339)
* Make sampler return sampling decision

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Fix review comments

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Use package visibility

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Define as final

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Rename do decision and fix javadoc

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Make it package private

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Rename to simpledecision

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-05-27 15:34:43 +03:00
Yang Song c026320bd2 Add TraceConfig and TraceParams in SDK. (#336)
* Add TraceConfig and TraceParams in SDK.

* Consolidate TraceConfig to TracerSdk.

* Add more configs. Add fromProto. Add tests.
2019-05-24 16:52:18 +02:00
Pavol Loffay b7e4bc86ec Move SDK stats to metrics (#346)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-05-24 16:50:38 +02:00
Pavol Loffay d83f7930cd Implement meter provider in SDK (#345)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-05-24 14:32:23 +02:00
Pavol Loffay 7bdb0adfcd Implement tagger provider in SDK (#343)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-05-24 10:55:06 +02:00