Commit Graph

840 Commits

Author SHA1 Message Date
John Watson 0ce1a38824
First cut at a Zipkin Span Exporter (#1106)
* basic zipkin span exporter with some unit tests

* add tests for the configuration class, hook up a create method and clean up other unit tests

* add a README

* Update exporters/zipkin/README.md

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* Update exporters/zipkin/src/main/java/io/opentelemetry/exporters/zipkin/ZipkinSpanExporter.java

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* Update exporters/zipkin/README.md

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* apply PR review comments

* Update build.gradle

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* a little bit of cleanup from PR review

* implement shutdown and provide javadoc about the closing of the Sender

* don't set attributes if they're already set.

* formatting

* grpc tweaks, and an exception thrown

* Update the comment to be a little more accurate.

* formatting

* Update exporters/zipkin/src/main/java/io/opentelemetry/exporters/zipkin/ZipkinExporterConfiguration.java

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* Update exporters/zipkin/src/main/java/io/opentelemetry/exporters/zipkin/ZipkinExporterConfiguration.java

Co-Authored-By: Adrian Cole <adriancole@users.noreply.github.com>

* doc/naming cleanup

* simplify the builder, provide two simple factory methods

* strip out the endpoint logic and instead get it from the Resource

* formatting

* restore the serviceName option, but keep the Resource-based override.

* update for changes from master.

* remove factory methods on the configuration, and update the README

* update the docs to match the requirements

* fix a typo

* tiny re-arrange of javadoc

* Add zipkin to the top-level docs

Co-authored-by: Adrian Cole <adriancole@users.noreply.github.com>
2020-05-01 08:42:40 -07:00
Giovanni Liva 5211c97707
Config class for SimpleSpanProcessor (#1160) 2020-05-01 16:40:31 +02:00
John Watson 85afba6e63
Update the example code for the latest changes. (#1158) 2020-04-30 15:12:01 +02:00
Nikita Salnikov-Tarnovski 68b5081e6a
"value" attribute of WithSpan annotation should be optional (#1154) 2020-04-29 17:55:50 +02:00
Uladzislau Kiva 5aa00c57c3
Iterations benchmark (#1151)
* test: use iterations in benchmarks

* test: use iterations in benchmarks

* docs: added javadoc
2020-04-28 11:33:45 -07:00
David Barda 6449ead422
Update README.md (#1131)
Changed "agent" to "collector" (As usually agent is set on the localhost and not the collector)
2020-04-28 07:49:25 -07:00
Trask Stalnaker 489ef7038d
Make TracerSdk non-public (#1153) 2020-04-28 07:33:29 -07:00
Nikita Salnikov-Tarnovski fff15ffe2f
First version of WithSpan annotation. (#1148)
* First version of WithSpan annotation.

This should be followed by the corresponding PR in auto-instrumentation to actually create spans around annotated methods.

* Add license

* Code style fix

* Rename module, add documentation.

* License added.

* Update contrib/auto_annotations/src/main/java/io/opentelemetry/contrib/auto/annotations/WithSpan.java

Co-Authored-By: John Watson <jkwatson@gmail.com>

* Apply suggestions from code review

Co-Authored-By: John Watson <jkwatson@gmail.com>

* Code style fix

Co-authored-by: John Watson <jkwatson@gmail.com>
2020-04-27 11:14:34 -07:00
Nikita Salnikov-Tarnovski a98aa54204
Add .editorconfig file with google-java-format compatible options (#1136)
* Add .editorconfig file with google-java-format compatible options

* Add an example of pre-commit hook
2020-04-27 08:42:59 -07:00
Simon Leigh 8dd6282893
Add error tag to spans for Jaeger exporter (#1141)
* Add error tag to spans for Jaeger exporter

The auto-instrumentation libraries add errors to the spans when they occur. The error tag is not added to the spans by the Jaeger exporter if the span status is not OK.
When sending these spans to the OpenTelemetry Collector it will add the error tag when it translates them and sends them to the Jaeger collector. This process does not
take place when sending spans directly to a Jaeger collector (not using the OTel collector) and so the Jaeger UI does not display visual indicators for spans with errors.
Adding the error tag in the adapter if the span.status.code is not OK, and this tag hasn't already been set, means that it will be present when using either the OTel collector
or the Jaeger collector directly. The Otel collector will remove this tag automatically when it receives the span and sets the status code so this will not be sent as a duplicate.

* Remove additional attribute check in span status condition

Co-Authored-By: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-04-26 09:23:22 -07:00
Matt Brown 2b90ccc2a8
quickstart: update link to "Obtaining a Tracer" (#1134)
the current link is a 404
2020-04-24 10:12:48 -07:00
Giovanni Liva ae06facb61
Fix build (#1132) 2020-04-24 07:00:31 -07:00
Pavol Loffay 610c92fa1c
Add Jaeger remote sampler (#1089)
* Add Jaeger remote sampler

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

* Add tests

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

* Add remote sampler to all BOM

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

* Make docker test optional

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

* Use scheduled thread pool

* Use daemon thread factory

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

* Cosmetic changes

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

* Add readme

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-04-23 12:25:26 -04:00
John Watson 4d62068b52
Add probability to decision when appropriate (#1116)
* add the sampling probability to the decision, when appropriate.

* formatting

* normalize a method name and move attribute to semantic convention attributes

* move the sampling attribute to its own class in the SDK

* Move the sampling priority attribute to a non-public spot
2020-04-22 16:32:43 -07:00
Bogdan Drutu 6e7f34dd04
Use java Objects.requireNotNull (#1129)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-22 08:51:46 -07:00
jarebudev 8a0ec1d42d
Improve propagator performance (#1124)
* made a couple of quick win performance improvementts to propagators

* tidy up var order

* corrected typo in comment
2020-04-22 07:54:09 -07:00
Giovanni Liva 1396200627
Examples share a common gradle build script (#1123)
* Examples in a single separate project. Bump version to 0.4.0-SNAPSHOT

* Formatting

* Gradle 6.3. Remove local wrappers
2020-04-22 07:53:19 -07:00
Giovanni Liva cfba55f713
Configuration class for BatchSpanProcessor (#1080)
* Add config class for BatchSpanProcessor

* Implement Configuration for BatchSpanProcessor

* goJF after rebase
2020-04-22 07:23:37 -07:00
Giovanni Liva 4bcfdb703f
Array values for span attributes (#807)
* [API] - Add Arrays for span attributes

* [SDK] - Add Arrays for span attributes

* [Exporters/Shim] - Add Arrays for span attributes

* add tests

* Adjust jaeger exporter to specification. Add tests.

* Fix checkstyle naming issue

* Add further tests.

* Align null value behavior of attributes with spec

* fix javadoc @since

* API must not crash on misusage of AttributeValue

* API - Remove Attribute ArrayValues from Span surface

* Immutable String array values for AttributeValue

* Immutable values for AttributeValue arrays

* ./gradlew goJF

* Implement ArrayAttribute

* Rebase and add tests

* Adapt RecordEventsReadableSpan
2020-04-21 11:08:24 -07:00
jarebudev d87ee34238
Consolidate propagator benchmarks and add b3 benchmark (#1122)
* consolidated benchmarks for contributed propagators, included b3 propagator in benchmarks

* added comments, also added extra benchmark to test injecting into b3 multiple headers
2020-04-20 10:26:32 -07:00
Bogdan Drutu 6a4fd2d46a
Remove labels keys from instruments (#1121)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-20 09:24:45 -07:00
John Bley 04c34bf5da
Mark all threads/pools as daemon. (#1120)
* Mark all threads/pools as daemon.

* Move setDaemon calls inside try blocks as they can throw a security exception.

* Add javadoc comment about possibility of SecurityException.

* Create common/DaemonThreadFactory and adjust all thread creation to use it.

* Apply a name prefix in the DaemonThreadPool; rework and simplify several calling sites accordingly.
2020-04-20 07:12:39 -07:00
Giovanni Liva c723e67593
Add flush method to [Span|Metric] Exporters (#1113)
* Add flush to exporters

* Add javadoc

* format

* Wording and tests

* Flush all handler

* formatting
2020-04-17 15:28:27 -07:00
John Watson c32c776a70
Provides a way to enable/disable the docker integration tests via a gradle property (#1115)
* Provides a way to disable the docker integration tests via a gradle property.

* switch the property to be the opposite

* add a new make target and let CI use it.

* Update gradle.properties

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

* Update exporters/jaeger/src/test/java/io/opentelemetry/exporters/jaeger/JaegerIntegrationTest.java

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

* Update exporters/jaeger/src/test/java/io/opentelemetry/exporters/jaeger/JaegerIntegrationTest.java

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

* simplify the test flow

Co-authored-by: Armin Ruech <armin.ruech@gmail.com>
2020-04-16 15:12:30 -07:00
Carlos Alberto Cortez 36661f1a06
Update the Jaeger benchmarks code. (#1118) 2020-04-15 18:40:43 -07:00
jarebudev a19b0075fb
Add jaeger propagator benchmarks (#1108) 2020-04-16 00:55:27 +02:00
John Watson adf82e7431
Remove the RETRYABLE failure mode from the exporter interfaces. (#1112) 2020-04-15 01:11:05 +02:00
John Watson 848461d26b
A simple stress-test for the TracerSdk. (#1101)
* A simple stress-test for the TracerSdk.

* Add a stress-test that includes the batch span processor.
2020-04-13 07:56:31 -07:00
Bogdan Drutu e11344c235
Fix HttpTraceContext propagator (#1102)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-11 16:31:01 -07:00
Bogdan Drutu 63b9b5f505
Update to use gradle 6.3 in all projects (#1103)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-11 16:27:37 -07:00
Simon Leigh 62aff519d3
Convert span kind values to lowercase for Jaeger exporter (#1099)
The OpenTelemetry Span.Kind enumerated type values are in uppercase, e.g. SERVER, CLIENT. These are incompatible with Jaeger which is based on the OpenTracing semantics where these are in lowercase.
The spans are collected as expected, but Jaeger is unable to display deep dependancy graphs as these are based on span kind values in lowercase, e.g. "server".
2020-04-10 11:26:20 -07:00
Carlos Alberto Cortez 68bac8f431
Move B3/Jaeger propagators to their own contrib artifact (#1098) 2020-04-10 18:03:09 +02:00
John Watson 73858ccf7b
Let the carrier be null on the inject methods, to support possible lambda usages (#1088) 2020-04-09 22:23:26 +02:00
Carlos Alberto Cortez c85de6ebf6
Update Readme with release information (#1095) 2020-04-09 20:22:42 +02:00
John Watson 8b0fcfbc99
simple benchmarks for the default tracer APIs (#1090)
* simple benchmarks for the default tracer APIs
* do some painful gyrations to make the animalsniffer happy
2020-04-08 14:05:10 -07:00
Christian Neumüller 82eea7a73d
Dont' uselessly rerun opentracing_shim tests. (#1086)
Gradle should rerun automatically if any input/dependencies changed.

No other build.gradle uses cleanTest.
2020-04-07 07:03:36 -07:00
John Watson de7de59ff5
Remove the finalizer on the RecordEventsReadableSpan. (#1083) 2020-04-06 11:02:28 -07:00
Christian Neumüller 892af3608a
Add forceFlush on TracerSdkProvider. (#1068)
Since there is no method to get the SpanProcessor(s),
there is no way to actually use the forceFlush API otherwise.
2020-04-05 20:54:04 -07:00
John Watson 7d4576e7f7
Use a reentrant lock as the mutex for initializing/reading the global instance (#1071) 2020-04-03 21:59:49 +02:00
John Watson 5ceff22cc6
fix a typo in the SemanticAttributes (#1078) 2020-04-03 20:34:49 +02:00
John Watson 010f6d5e01
update README with the latest info 2020-04-03 10:34:22 -07:00
John Watson 0d8e73cbdd
Add a note that you need to be running a docker daemon for the tests. (#1073) 2020-04-03 16:36:47 +02:00
jarebudev b14a2dd87d
added jaeger propagator and tests (#1046)
* added jaeger propogator and test

* address PR comments about logging and static var names

* added jaeger client for testing jaeger propagator

* added comment to explain why UTF-8 decoding is needed
2020-04-02 08:27:36 -07:00
Bogdan Drutu 3b65e7fd8e
Promote @jkwatson to maintainer (#1065)
* Promote John to maintainer

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

* Update README.md

Co-Authored-By: John Watson <jkwatson@gmail.com>

Co-authored-by: John Watson <jkwatson@gmail.com>
2020-04-02 08:07:00 -07:00
Bogdan Drutu 34770da38e
Small cleanup in CONTRIBUTING.md (#1066)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-01 20:20:46 -07:00
Armin Ruech 423f1beef8
Fix errors in QUICKSTART.md (#1064) 2020-04-01 13:52:20 -07:00
Giovanni Liva 87758cdba7
Fix errors in QUICKSTART.md (#1063) 2020-04-01 20:17:57 +02:00
Giovanni Liva 498e101bdf
Add grpc example (#696)
* Add build files for gRPC example
2020-04-01 17:14:46 +02:00
Bogdan Drutu 83eb97ee3c
Remove unused NoopScope from context (#1062)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-01 04:44:37 +02:00
Bogdan Drutu 8e61e8d217
Add Prometheus exporter (#1052)
* Add Prometheus exporter

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

* Split toSample

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-03-31 19:43:54 -07:00