Commit Graph

1649 Commits

Author SHA1 Message Date
Mateusz Rzeszutek 1c3ea2ec56
Convert elasticsearch-rest to Instrumenter API (#4153)
* Convert elasticsearch-rest to Instrumenter API

* Add net.transport attribute
2021-09-17 11:19:53 -07:00
Mateusz Rzeszutek 88ce6af1d6
Convert Rediscala to Instrumenter API (#4152) 2021-09-17 10:22:58 -07:00
Mateusz Rzeszutek f14eeb0f15
Convert kafka-streams to Instrumenter API (#4140) 2021-09-17 09:41:13 +02:00
Lauri Tulmin 59439cb464
Make servlet context path key private (#4125)
* Make servlet context path key private

* remove accidentally added files

* fix servlet2.2

* use non capturing lambda

* Update instrumentation/servlet/servlet-common/library/src/main/java/io/opentelemetry/instrumentation/servlet/ServletHttpServerTracer.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* use method reference

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-16 10:23:29 -07:00
Lauri Tulmin de6c9087fc
Remove reference to bintray in spring doc (#4139) 2021-09-16 10:18:20 -07:00
Lauri Tulmin 53482419c3
Use our version of hasSuperType matcher (#4141) 2021-09-16 10:16:34 -07:00
Mateusz Rzeszutek 836491ef5f
Make CONSUMER receive span a parent of CONSUMER process spans in Kafka… (#4122)
* Make CONSUMER receive span a parent of CONSUMER process spans in Kafka instrumentations

* Fix kafka-streams tests

* fixed imports order
2021-09-15 10:39:56 -07:00
Trask Stalnaker d28f0d3d3f
Remove unneeded catch blocks (#4130)
* Remove unneeded catch blocks

* Update test!
2021-09-15 09:42:18 -07:00
Trask Stalnaker b8391b1354
Remove the only two author tags (#4129)
* Remove the only two author tags

* Spotless
2021-09-15 09:42:04 -07:00
Anna Nosek 8f48dfa875
Fix latestDepTests in Restlet instrumentation (#4121)
* add latestDepTestLibrary

* spotless
2021-09-14 09:52:29 -07:00
Anuraag Agrawal 971ca8b19c
Update to OTel 1.6 (#4120)
* Update to OTel 1.6

* Example build

* More example

* More example
2021-09-14 20:12:18 +09:00
Anna Nosek 473f16fa68
Restlet instrumentation (#3946)
* server instrumentation with first tests

* migrate to instrumenter API, move TracingFilter to library, rename module, other review refinements

* change name to 1.0 and rebase

* review, add ServerSpanNaming, create RestletTracing

* codenarc fix

* review

* fix TracingFilter behaviour on exception, inline HeadersAdapter's methods

* move instrumentation to doHandle, add StatusFilter in library test
2021-09-13 22:39:25 -07:00
Trask Stalnaker 9de4041d4c
More grpc events (#4098)
* More grpc events

* Fix test

* Update new tests
2021-09-13 10:49:04 -07:00
Lauri Tulmin 15277cf8f5
Convert servlet instrumentation to instrumenter api (#4078)
* Convert servlet to instrumenter api

* make classes final

* Remove some tracer files

* remove xxx

* fix liberty and wildfly exception smoke test

* fix async smoke test on liberty

* Apply suggestions from code review

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* generic TextMapGetter for servlets

* not going to use http.route for servlets

* simplify

* add servlet timeout in attribute extractor

* move classes from library to javaagent

* remove unneeded dependency

* make method private

* move helper class initialization to singleton, remove helpers that don't have any methods, add shouldStart checks

* Update instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletRequestContext.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* add import

* rename methods that start and end spans

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-13 10:12:34 -07:00
Lauri Tulmin 436184002c
Bridge trace builder (#4090)
* Bridge tracer builder

* put api 1.4 bridging into separate moulde

* remove duplicate test

* remove testing dependencies

* use static import

* Update instrumentation/opentelemetry-api/opentelemetry-api-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/trace/ApplicationTracerProvider.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* rename make -> create

* replace reflection with methodhandle

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-13 09:30:02 -07:00
Trask Stalnaker 098aee06c6
Fix grpc instrumentation of callbacks (#4097)
* Fix grpc instrumentation of callbacks

* Add ListenableFuture test

* Futures.transform
2021-09-13 08:55:46 -07:00
Trask Stalnaker b48ced5da0
Fix test on windows (#4094) 2021-09-12 15:53:38 +02:00
Matthew Ho 6967484a97
Update groovy import order to match default IntelliJ (#1708) (#4047)
* Update groovy import order to match default IntelliJ (#1708)

* organized imports for .groovy files to follow default IntelliJ import settings

* updated intellij-setup.md

* Spotless

* drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-11 11:53:08 -07:00
Trask Stalnaker 34ddc6911d
Suppress strict scope check for reactor-netty (#4091) 2021-09-11 11:46:03 -07:00
Mateusz Rzeszutek 05d1a4a54f
Separate suppression strategies for CONSUMER receive/process spans (#4076)
* Separate suppression strategies for CONSUMER receive/process spans

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/SpanKeyExtractor.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-10 10:55:50 -07:00
Lauri Tulmin 4c64f70f94
JaxRS-client: remove our context when request is done (#4075)
* JaxRS-client: remove our context when request is done

* add comment
2021-09-09 14:24:18 -07:00
Mateusz Rzeszutek 99fe1c6642
Migrate Dubbo to Instrumenter API (#4059)
* Migrate Dubbo to Instrumenter API

* Break library dependency on javaagent-api

* Add a standard library instrumentation *Tracing & *TracingBuilder classes

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-09 11:31:57 -07:00
Lauri Tulmin 0c2aa5eae1
Remove outdated section from servlet instrumentation readme (#4074) 2021-09-09 08:07:33 -07:00
Mateusz Rzeszutek d6c8e3a1f2
Update supported libs list (#4077) 2021-09-09 08:07:04 -07:00
Trask Stalnaker c13eb7932e
Update collector port (#4071) 2021-09-08 18:18:05 -07:00
Lauri Tulmin a279b7d5be
Fix build (#4070) 2021-09-08 16:40:31 -07:00
Mateusz Rzeszutek e30b082259
Start a CONSUMER span for Kafka poll(); and refactor spring-kafka... (#4041)
* Start a separate CONSUMER receive span for each non-empty KafkaConsumer#poll() call

* One batch receive + one batch process span in spring-kafka

* Add CONSUMER receive spans to kafka-streams too

* codenarc

* code review comments
2021-09-08 13:12:58 -07:00
jack-berg 28e5cb5dd6
Transition twilio-6.6 module to instrumenter API (#4045)
* Convert twilio-6.6 module to instrumenter API

* Rename TwilioTracer to TwilioSingletons
2021-09-08 13:10:03 -07:00
Mateusz Rzeszutek 4820ec4855
Add error parameter to EndTimeExtractor and AttributesExtractor#onEnd() (#3988) 2021-09-08 07:58:13 -07:00
Trask Stalnaker 2c044253e8
HttpURLConnection response code edge case (#4062) 2021-09-08 07:55:21 -07:00
Trask Stalnaker 400d99467a
Follow http.client_ip spec clarification (#4063) 2021-09-08 07:54:59 -07:00
jack-berg 1a994b9845
Transition kubernetes client 7.0 module to instrumenter API (#4036)
* Convert kubernetes-client-7.0 to Instrumenter API

* Respond to PR feedback
2021-09-07 15:17:42 -07:00
jack-berg 4e221d6e4c
Transition spring batch 3.0 module to Instrumenter API (#4029)
* Convert spring-batch-3.0 step execution instrumentation to Instrumenter API

* Convert spring-batch-3.0 job execution instrumentation to Instrumenter API

* Convert spring-batch-3.0 chunk execution instrumentation to Instrumenter API

* Convert spring-batch-3.0 item instrumentation to Instrumenter API

* Fix rebase issue.

* Respond to PR feedback.

* Respond to PR comments.
2021-09-07 15:13:55 -07:00
Mateusz Rzeszutek dca77b6ae3
Remove unused method (#4058) 2021-09-07 14:56:12 -07:00
jack-berg f89933b67c
Transition http-url-connection module to instrumenter API (#4044)
* Convert http-url-connection to instrumenter API

* Replace HttpUrlResponse with response status code Integer
2021-09-07 14:54:16 -07:00
Mateusz Rzeszutek 23fc4ce443
Fix memleak in the Netty ChannelPipeline instrumentation (#4053) 2021-09-07 14:16:08 -07:00
Anuraag Agrawal 10bce56cd6
Add instrumentation for Quartz 2.0 (#4017)
* Add instrumentation for Quartz 2.0

* Fix drift in comment

* Fix fix

* Comment

* Cleanup
2021-08-31 18:05:36 +09:00
Trask Stalnaker 65335962de
Remove capturing lambda (optimization) (#4014)
* Remove capturing lambda

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/servlet/ServerSpanNameSupplier.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/servlet/ServerSpanNameTwoArgSupplier.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jsf/jsf-common/library/src/main/java/io/opentelemetry/instrumentation/jsf/JsfServerSpanNaming.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* checkstyle

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-08-30 20:26:00 -07:00
Mateusz Rzeszutek 01ea967d67
Use kafka transactions to make spring-kafka tests more stable (#4024)
* Use kafka transactions to make spring-kafka tests more stable

* manual acks

* another approach: batch error handler that immediately recovers

* another try

* yet another try

* do nothing error handler

* spotless
2021-08-30 15:04:16 -07:00
Trask Stalnaker 0f9308b4fb
Optimize tomcat uri construction (#4008)
* Optimize tomcat uri construction

* Add TODO
2021-08-30 13:34:23 -07:00
Lauri Tulmin 9f56888727
Limit lates dep version for rxjava-3.0 (#4028) 2021-08-30 11:02:11 -07:00
Lauri Tulmin 7b4d0db19a
Enable concurrency test for resteasy proxy client (#4018) 2021-08-30 09:08:43 -07:00
Lauri Tulmin a438e0d6ae
Enable concurrency test for apache http client 4.0 (#4020) 2021-08-30 09:05:51 -07:00
Lauri Tulmin 7fdbd0c55f
Enable concurrency test for apache http client 2.0 (#4021) 2021-08-30 09:05:44 -07:00
Lauri Tulmin c918cdeb76
Enable concurrency test for apache http client 4.3 (#4019) 2021-08-30 09:04:09 -07:00
Trask Stalnaker 436aeaf99a
Another ClassValue optimization (#4013)
* Another ClassValue optimization

* Spotless
2021-08-30 09:02:59 -07:00
Trask Stalnaker c91eda59b5
Small reduction in context lookups (#4006) 2021-08-30 09:02:52 -07:00
Trask Stalnaker 58d640a373
Fix netty strict context checks (#4002)
* Fix netty strict context leaks

* And netty-4.0

* ClassValue and more
2021-08-30 09:02:16 -07:00
jack-berg 789c92d79e
Transition spring-scheduling-3.1 to instrumenter API (#3993) 2021-08-30 09:01:43 -07:00
jack-berg 0c5a67167a
Transition spring-data-1.8 module to instrumenter API (#3991) 2021-08-30 09:01:37 -07:00
Mateusz Rzeszutek 2b52a8bfe4
Use nano time in JMS consumer Instrumenter (#3986)
* Use nano time in JMS consumer Instrumenter

* fix DoNotMockAutoValue
2021-08-30 09:00:49 -07:00
Mateusz Rzeszutek 1363e0c093
Limit RxJava3 muzzle check version range (#4022) 2021-08-30 14:01:48 +03:00
Trask Stalnaker dbf66c5648
Fix ratpack test on windows (#4010)
* Fix test on windows

* Fix linux now
2021-08-29 21:16:44 -07:00
Lauri Tulmin b61113fef6
JDBC: use ContextStore when running as agent (#3987)
* JDBC: use ContextStore when running as agent

* address review comments

* use singular
2021-08-27 14:14:40 -07:00
Trask Stalnaker 473edf5149
Fix couchbase instrumentation publishing (#3978)
* Fix couchbase instrumentation publishing

* Use new gradle-plugins version
2021-08-27 09:48:35 -07:00
Trask Stalnaker d90d7c80f3
Use new HelperResourceBuilder (#3976)
* Use new HelperResourceBuilder

* Use latest to avoid merge conflict
2021-08-27 09:48:16 -07:00
Lauri Tulmin be95048e60
Help intellij find classes from armeria-shaded-for-testing (#3985) 2021-08-27 08:34:02 -07:00
Mateusz Rzeszutek 4567bc0c2f
Instrument spring-kafka batch message listeners (#3922)
* Instrument spring-kafka batch message listeners

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* fix compilation failure

* Suppress nested CONSUMER spans

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-27 08:02:37 -07:00
Mateusz Rzeszutek 585cc55921
Add request param to EndTimeExtractor (#3947) 2021-08-27 14:34:47 +02:00
Mateusz Rzeszutek ab9c688e7a
Test nested CLIENT span suppression in library instrumentations (#3970) 2021-08-27 11:16:59 +02:00
Trask Stalnaker 38d5c39579
Remove invalid message header (#3958) 2021-08-26 08:53:21 -07:00
Lauri Tulmin 93a1e419e4
Fix flaky reactor netty test (#3966) 2021-08-26 08:52:39 -07:00
Lauri Tulmin 3fb936be15
AHC: fill user agent (#3930)
* AHC: fill user agent

* suppress unsused warning

* fix muzzle

* Update instrumentation/async-http-client/async-http-client-2.0/javaagent/build.gradle.kts

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* verify response content length

* remove blank line

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-26 08:51:30 -07:00
Trask Stalnaker dc2442ce75
Remove unnecessary parameter (#3955) 2021-08-25 21:51:12 -07:00
Lauri Tulmin b5aec6a2e0
Bridge span keys defined in instrumentation api (#3911) 2021-08-25 20:25:37 -07:00
Lauri Tulmin c0aad71650
Convert google-http-client-1.19 to instrumenter api (#3932)
* Convert google-http-client-1.19 to instrumenter api

* remove some nullable annotations

* remove nullable
2021-08-25 13:57:36 -07:00
Trask Stalnaker 6f22d90aa6
Option to suppress controller and view spans (#3865)
* Add option to suppress controller and view spans

* Apply to all existing Instrumenters

* Introduce ExperimentalConfig

* Singleton?

* No need for lazy
2021-08-25 13:43:38 -07:00
Mateusz Rzeszutek 21f178b7bd
Refactor kafka-clients to use Instrumenter API (#3883) 2021-08-25 10:47:39 -07:00
Mateusz Rzeszutek f808090a4a
Enable kubernetes-client strict context check (#3945) 2021-08-25 09:32:56 -07:00
Lauri Tulmin 629801d9ab
Convert play-ws to instrumenter api (#3944) 2021-08-25 09:31:50 -07:00
Lauri Tulmin 564f51c706
Hide our generated fields and methods from reflection (#3948) 2021-08-25 09:24:27 -07:00
Lauri Tulmin d1f987bcb5
Convert jaxrs-client-2.0 to instrumenter api (#3938) 2021-08-25 09:00:28 -07:00
Lauri Tulmin 3ab8111fe8
Convert jaxrs-client-1.1 to instrumenter api (#3934)
* Convert jaxrs-client-1.1 to instrumenter api

* spotless
2021-08-25 08:52:14 -07:00
Trask Stalnaker 20c72f3e98
Format kotlin gradle files (#3942)
* Add ktlint for kotlinGradle

* ktlint fails on wildcard imports

* Auto-format kotlin gradle files
2021-08-25 13:43:57 +09:00
Lauri Tulmin ec585c7717
Enable strict context check on grizzly (#3921)
* Enable strict context check on grizzly

* add comment

* move wait to base class
2021-08-24 11:46:30 -07:00
Lauri Tulmin a2928663f4
Strict context check for tomcat and jetty (#3923) 2021-08-24 11:45:53 -07:00
Lauri Tulmin a923efc077
Strict context check on okhttp3 (#3925) 2021-08-24 09:43:34 -07:00
Trask Stalnaker c9619c0626
Disable strict context check for elasticsearch 6 tests (#3917)
* Disable strict context check for elasticsearch 6 tests

* Mongo too
2021-08-23 22:46:04 -07:00
John Watson fa168268c5
Revert okhttp library instrumentation back to using standard reflection to support Android usage (#3910)
* Revert back to using standard reflection to support Android usage

* Add a comment about not using MethodHandles
2021-08-23 18:58:43 -07:00
Trask Stalnaker 3525733ea8
Enable strict context check in tests by default (#3822) 2021-08-23 17:40:02 -07:00
Trask Stalnaker beae022c31
Limit rocketmq version for lib instrumentation too (#3915) 2021-08-23 17:01:08 -07:00
Lauri Tulmin 662e2e8ab5
Jedis 3.0: extract net attributes from InetSocketAddress (#3912) 2021-08-23 16:49:23 -07:00
Lauri Tulmin bc0ef7e0bd
Remove unused method argument (#3906) 2021-08-23 16:45:28 -07:00
Mateusz Rzeszutek 5c71d28ed7
Remove deprecated Config methods (#3908) 2021-08-23 16:44:54 -07:00
Lauri Tulmin 82e264d909
Limit rocketmq latest dep test version (#3909) 2021-08-23 16:11:12 -07:00
Lauri Tulmin c96af0d51a
Make empty agent bridged context equal root context (#3869)
* Make empty agent bridged context equal root context

* use ContextStorageWrappers

* Use method handle to call ContextStorage.root()

* add comment back

* Add missing imort for javadoc generation
2021-08-20 13:51:29 -07:00
Lauri Tulmin 38c8f8940c
Move helper class to spring package so that loadClass can find it (#3718)
* Move helper class to spring package so that loadClass can find it

* spotless

* Add tests

* Add comments

* remove unneeded dependency

* comments
2021-08-20 12:31:25 -07:00
Lauri Tulmin 8d90462a28
AsyncHttpClient: extract net attributes from InetSocketAddress (#3882) 2021-08-20 09:34:15 -07:00
Trask Stalnaker 31f22eb4f7
Use valid Java identifiers for message keys (#3863) 2021-08-19 16:55:29 -07:00
Lauri Tulmin 59c1e6d101
Fix elasticsearch latest dep test (#3876) 2021-08-19 15:34:54 +03:00
Lauri Tulmin 514553eac2
Context propagation to elasticsearch-transport callbacks (#3861) 2021-08-19 12:59:47 +03:00
Lauri Tulmin f05c3788e1
Context propagation to elasticsearch-rest callbacks (#3858)
* Context propagation to elasticsearch-rest callbacks

* remove unused import
2021-08-19 12:59:36 +03:00
Lauri Tulmin f89579a3ab
Convert okhttp-2.2 to instrumenter api (#3852)
* Convert okhttp-2.2 to instrumenter api

* Rephrase comment
2021-08-19 12:59:20 +03:00
Lauri Tulmin 7a705d861e
Move SpringRestTemplateTest (#3870) 2021-08-19 12:58:24 +03:00
Anuraag Agrawal 3f6727d6b7
Don't clobber user decorators in Armeria client instrumentation (#3873)
* Don't clobber user decorators in Armeria client instrumentation

* Spot
2021-08-19 18:55:58 +09:00
YuDong Tang 60424e0d38
record exception in dubbo inst (#3851)
* record exception in dubbo inst

* record exception in dubbo inst

* remove unused imports

* remove unused imports
2021-08-18 16:31:00 +02:00
John Watson 6dbb64ec7a
Implement a Call.Factory for okhttp 3.x+ library instrumentation (#3812)
* Add a README for the okhttp library instrumentation.

* Create new instrumentation for okhttp3 4.x+

This exposes a `Call.Factory` which will properly handle internal context propagation when used with async callbacks.

* update the "4.x" instrumentation to support 3.x

* Get rid of the 4.x instrumentation, and just update the 3.x instrumentation to work

* updates from PR review

* replace old reflection with method handle usage

* Apply suggestions from code review

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-18 12:16:24 +09:00
Anuraag Agrawal d8eae4997d
Update to SDK 1.5.0 (#3847) 2021-08-17 08:43:11 -07:00
Lauri Tulmin 706bfa2376
Instrument ForkJoinTask.fork (#3849)
* Instrument ForkJoinTask.fork

* spotless
2021-08-17 10:02:57 +03:00
Lauri Tulmin 8c175d4fce
Propagate context to lettuce callbacks (#3839) 2021-08-17 10:02:23 +03:00
Lauri Tulmin c54d192a1a
Vertx: avoid doulbe wrapping exception handler (#3848) 2021-08-17 10:00:45 +03:00
Lauri Tulmin 722fbc1d57
Convert jax-ws to instrumenter api (#3842) 2021-08-16 10:06:36 -07:00
Lauri Tulmin 912ce91b60
Convert jsf to instrumenter api (#3838)
* Convert jsf to instrumenter api

* Review comments

* Use span name not null
2021-08-16 10:06:04 -07:00
Lauri Tulmin 1a9896543a
Convert tapestry-5.4 to instrumenter api (#3837)
* Convert tapestry-5.4 to instrumenter api

* Review comments
2021-08-16 10:05:54 -07:00
Lauri Tulmin 299a051ea8
Convert struts-2.3 to instrumenter api (#3835)
* Convert struts-2.3 to instrumenter api

* Apply suggestions from code review

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-16 10:05:43 -07:00
Lauri Tulmin c74853274d
Remove Nullable from methods that return non-null value (#3843) 2021-08-14 09:29:23 -07:00
Mateusz Rzeszutek 88be2940eb
Extract common consumer-related kafka-clients parts to a new module (#3817) 2021-08-13 20:28:25 -07:00
Steve Dodge 6c8d2e1fc3
chore: apply the same wrapper fix as in open-telemetry#3831, but this time for request listners (#3833) 2021-08-13 16:45:18 -07:00
Lauri Tulmin 6ad277c659
Check scope for null before closing it (#3836) 2021-08-13 16:39:28 -07:00
Lauri Tulmin 8dc02c6c2b
Remove jaxws todo (#3840) 2021-08-13 16:38:45 -07:00
Trask Stalnaker 84e9d188af
Update webflux to Instrumenter API (and improvements/simplifications) (#3798)
* Update Webflux to Instrumenter API

* Change webflux handler to match other handlers

* Further simplification

* Fix Mono failure tests

* Use extractors!

* Renames

* Fix comment

* Update instrumentation/spring/spring-webflux-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/webflux/server/AdviceUtils.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-08-13 09:03:50 -07:00
Lauri Tulmin 392fc5a6c1
Improve wrapping jetty response listener (#3831) 2021-08-13 11:31:23 +09:00
Lauri Tulmin 8c89420753
Skip bad spring-rabbit version (#3829) 2021-08-12 08:57:28 -07:00
Trask Stalnaker da55d98a87
Simplify webflux mono handling (#3816) 2021-08-12 08:54:26 -07:00
Mateusz Rzeszutek 3ea22bb3ed
Cache couchbase operation attribute values per method (#3819)
* Cache couchbase operation attribute values per method

* avoid using reflection

* spotless
2021-08-11 07:54:11 -07:00
Lauri Tulmin d9080a745b
Test latest version of kafka client and streams (#3803) 2021-08-11 17:12:44 +03:00
Lauri Tulmin f4e6baf22d
Make spring webflux tests pass with strict context check (#3811)
* Make spring webflux tests pass with strict context check

* Add comment
2021-08-11 06:51:31 -07:00
Mateusz Rzeszutek 4619d86c68
Remove reflection usage (getting Method) from geode (#3821) 2021-08-11 06:47:52 -07:00
Mateusz Rzeszutek 92a69c3309
Simplify shouldStart() check for SERVER & CONSUMER spans (#3771) 2021-08-10 21:00:34 -07:00
Trask Stalnaker 1889c1adfb
Limit netty exception capture to netty spans (#3809)
* Limit Netty exception capture to Netty span

* Rename constant

* Fix var name

* Apply to netty-4.0 also
2021-08-10 20:58:37 -07:00
Mateusz Rzeszutek b2609d0f40
Refactor couchbase and hystrix to Instrumenter API (#3802) 2021-08-10 12:16:41 -07:00
Lauri Tulmin accf603920
Remove unused field (#3810) 2021-08-10 12:10:57 -07:00
Trask Stalnaker 7e007e8f32
Update jaxrs-common to Instrumenter API (#3796) 2021-08-09 21:59:48 -07:00
Trask Stalnaker 19711ca76b
Update jaxrs-1.0 to Instrumenter API (#3797) 2021-08-09 21:59:39 -07:00
jack-berg f5be16bc7c
Convert java-http-client to use Instrumenter API (#3790) 2021-08-09 21:58:57 -07:00
Lauri Tulmin 6dcf1bbb87
Remove metro latest dep version restriction (#3776) 2021-08-09 16:13:52 -07:00
Lauri Tulmin 3257e18e02
Convert spring-ws-2.0 to instrumenter api (#3801) 2021-08-09 12:23:14 -07:00
Lauri Tulmin a251ed3836
Fix axis2 latest dep tests (#3805) 2021-08-09 09:29:49 -07:00
Trask Stalnaker ec344b3184
Small simplification of servlet/tomcat tests (#3710)
* Small simplification of servlet/tomcat tests

* Spotless
2021-08-09 09:24:21 -07:00
Trask Stalnaker bb461e5274
Fix tests on windows (#3360) 2021-08-09 09:23:41 -07:00
Trask Stalnaker 76a94e0604
Update Grails to Instrumenter API (#3795) 2021-08-09 09:23:25 -07:00
Trask Stalnaker c9150a7ea6
Update async-http-client-1.9 to Instrumenter API (#3794) 2021-08-09 09:23:11 -07:00
Trask Stalnaker 842ab42136
Call shouldStart for Spring handler span (#3793)
* Call shouldStart for Spring handler span

* Update server span name even if shouldStart returns false
2021-08-09 09:22:43 -07:00
Trask Stalnaker 3c3e0f2beb
Add parent span verification (#3800) 2021-08-09 09:22:10 -07:00
Mateusz Rzeszutek b63eb826f1
Convert dropwizard-views instrumentation to Instrumenter API (#3784) 2021-08-09 10:11:38 +02:00
Lauri Tulmin 9df06868fb
Instrument tomcat executor (#3789) 2021-08-07 10:07:42 -07:00
Lauri Tulmin f80d0ae189
Resteasy: compile instrumentation against earliest supported version (#3777) 2021-08-06 22:27:21 -07:00
Lauri Tulmin 96b9e224dd
Pin latest tested vaadin version to 19 (#3788) 2021-08-06 20:14:35 -07:00
HaloFour a5513a3c60
Port opentelemetry-annotations-1.0 to Instrumenter API (#3738)
* Port WithSpanInstrumentation to Instrumenter API

* Unit tests, clean up attribute binding APIs

* Remove AsyncSpanEndStrategies and fix weak reference purging

* Move tryToGetResponse to AsyncOperationEndSupport

* Address PR comments

* ParameterAttributeNamesExtractor can no longer return a null array
2021-08-06 10:42:18 -07:00
Lauri Tulmin ad5f1ef531
Remove latest dep version restriction from reactor instrumentation (#3778) 2021-08-06 09:33:44 +03:00
Anuraag Agrawal 5f59674a66
Create ratpack test HTTP clients on ratpack thread. (#3775) 2021-08-05 19:18:07 +09:00
Anuraag Agrawal 0068a11054
Fix post-merge conflict (#3772) 2021-08-05 17:20:15 +09:00
Anuraag Agrawal 8cbec715ff
Fill HTTP_CLIENT_IP in ServerInstrumenter (#3756) 2021-08-05 13:11:30 +09:00
Anuraag Agrawal 49c20ef724
Migrate Ratpack HTTP Client tests to Java. (#3768)
* Migrate Ratpack HTTP Client tests to Java.

* Close harness
2021-08-05 11:49:34 +09:00
Mateusz Rzeszutek 21b6492c17
Resolve TODOs in executor instrumentations (#3760) 2021-08-04 12:49:53 +02:00
Anuraag Agrawal e92ecc02bc
Add library instrumentation for Ratpack server (#3749)
* Add Ratpack server library instrumentation

* Finish

* Back to 1.4

* Drift

* Cocaine

* Update instrumentation/ratpack-1.4/library/src/main/java/io/opentelemetry/instrumentation/ratpack/RatpackTracingBuilder.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Cleanup

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-08-04 16:21:36 +09:00
Mateusz Rzeszutek ba4db4801f
Clean up concurrent advice utilities in javaagent-instrumentation-api (#3757)
* Clean up concurrent advice utilities in javaagent-instrumentation-api

* fix classloading tests
2021-08-03 09:17:19 -07:00
Mateusz Rzeszutek f960456240
Add tests that verify that Span.current() works in spring batch listeners (#3758) 2021-08-03 09:17:03 -07:00
Nikita Salnikov-Tarnovski 4b47bc596b
Fix dependency for latest dep test (#3755) 2021-08-03 11:58:58 +03:00
Anuraag Agrawal 7634394664
Flush metrics in Lambda wrapper too (#3748) 2021-08-02 20:20:33 -07:00
Lauri Tulmin 77dc1ecf27
Fix warning in build scripts (#3739) 2021-08-02 19:37:35 +03:00
Lauri Tulmin 96d8be8522
Fix gwt latest dep test (#3737) 2021-08-02 13:42:34 +09:00
Trask Stalnaker 03632d9bae
Fix JDK http client propagation of non-sampled traces (#3736)
* Fix JDK http client propagation of non-sampled traces

* Lower wait time
2021-08-02 13:12:37 +09:00
Anuraag Agrawal 40aad4539d
Add HttpClientTestOptions (#3714)
* Add HttpClientTestOptions

* Drift
2021-08-02 12:56:50 +09:00
Lauri Tulmin be645f08ab
Test latest version of vert.x reactive (#3715)
* Test latest version of vert.x reactive

* review comment
2021-07-30 11:42:07 -07:00
HaloFour b52fd39d8d
Port Spring Boot WithSpanAspect to Instrumenter API (#3607)
* Start porting WithSpanAspect to use Instrumenter API

* Some cleanup and refactoring

* Switch caching dependency to compile only

* Minor refactors, javadocs

* Fix instrumentation name

* Rename builder methods

* spotless

* Add request type to extract Method and WithSpan annotation, use method references

* Add comment about IntelliJ dependency workaround

* Make cache non-configurable, use AsyncOperationEndSupport directly

* Address PR comments

* Move to static factory method, method-keyed cache
2021-07-30 11:39:09 -07:00
Lauri Tulmin 080b8cd25b
Use Firefox instead of Chrome for selenium tests (#3732)
* Debug gwt failure

* show debug log

* show debug log

* replace chrome with firefox

* remove debugging

* remove unneccessary change
2021-07-30 10:07:02 -07:00
Mateusz Rzeszutek cbd8bb29fd
Spring web instrumenter 2 (#3731)
* Refactor spring-web library instrumentation to Instrumenter API

* errorprone

* fix typo
2021-07-30 09:28:27 -07:00
Lauri Tulmin 78a41261d9
Propagate context into jdk http client callback (#3719)
* Propage context into jdk http client callback

* address review comment

* remove null check
2021-07-30 09:02:38 -07:00
Lauri Tulmin a04a7a6b72
Add option to create span on new netty connection (#3707)
* Create span on new netty connection

* add test for connection failure

* add comment

* remove commented out line

* rebase

* test fix

* review comments

* keep connection failure span as client span
2021-07-30 11:32:53 +03:00
Anuraag Agrawal ef16e32f95
Disable vaadin test unless requested. (#3728) 2021-07-30 11:04:53 +03:00
Anuraag Agrawal 6b272fe088
Disable GwtTest unless rqeuested. (#3725) 2021-07-30 14:36:28 +09:00
Nikita Salnikov-Tarnovski cd1af44ce6
Limit recently added apache camel cassandra tests to the supported 2.x branch (#3723) 2021-07-29 15:03:42 -07:00
Lauri Tulmin 9c7df20c09
Remove redundant dependency (#3722) 2021-07-29 19:39:18 +03:00
Anna Nosek 117891afa1
Sanitize cql in Apache Camel instrumentation (#3717)
* sanitize cassandra

* use SemanticAttributes
2021-07-29 08:44:10 -07:00
Mateusz Rzeszutek e5ddbfec0d
Refactor javaagent buildscript (#3682) 2021-07-29 08:35:37 -07:00
Trask Stalnaker 8ecf709037
Fix Apache HttpClient host + absolute uri (#3694) 2021-07-29 08:35:14 -07:00
Anna Nosek 15a40a0059
Sanitize SQL in Apache Camel instrumentation (#3683)
* sanitize and test sql and jdbc, remove mongo branch

* checkstyle fix

* move and simplify unit tests

* add @Unroll to parametrized tests
2021-07-28 18:30:52 -07:00
Lauri Tulmin d73e030000
Fix NullPointerException on tomcat (#3705)
* Fix NullPointerException on tomcat

* remove commented out line

* instrument CoyoteAdapter
2021-07-28 12:10:14 -07:00
Trask Stalnaker d305f3140b
Fix NPE in Apache HttpAsyncClient instrumentation (#3692)
* Fix NPE in Apache HttpAsyncClient instrumentation

* Fix Apache HttpClient host + absolute uri

* Add similar test for Apache HttpClient 5

* Better tests

* Sync with 4.0 and 4.3

* Fix

* sync

* Elasticsearch twist

* Remove so-called optimization path
2021-07-28 10:21:43 -07:00
Lauri Tulmin 0689f86ed3
Fix running tests from intellij (#3702) 2021-07-28 10:21:19 -07:00
Lauri Tulmin 441609a0d4
Vertx http client 4 instrumentation (#3665)
* Vertx http client 4 instrumentation

* remove debugging

* rebase
2021-07-28 15:10:28 +03:00
Trask Stalnaker f2f4e5e900
Fix build error (#3698) 2021-07-27 22:00:48 -07:00
Anuraag Agrawal 695cf0ad5f
Add library instrumentation for Apache HTTPClient 4.3 (#3623)
* Add apache httpclient 4.3 library instrumentation.

* Fixup

* Mostly done

* Finish

* Finish

* Update instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientRequest.java

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>

* Cleanup

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2021-07-28 12:18:45 +09:00
Trask Stalnaker 91b302a7d2
Reduce overhead of unsampled requests (#3681)
* Optimize sampled out requests

* Comment
2021-07-27 17:00:00 -07:00
Lauri Tulmin ff5472a822
Limit number of concurrently running docker tests (#3664)
* Limit number of concurrently running docker tests

* rename heavy to testcontainers

* use shorter expression
2021-07-27 15:41:39 -07:00
Mateusz Rzeszutek ed9e1a0cb3
Move instrumentation specific classes out of javaagent-instrumentation-api (#3604) 2021-07-27 12:56:59 -07:00
Anuraag Agrawal 47be4a16b4
Convert HttpClientTest to JUnit (#3652)
* Migrate HttpClientTest to junit to allow both Java or spock tests.

* More

* Update

* Finish

* Cleanup

* Better stack

* Java 15

* Merge

* Fix name

* Cleanup

* ? extends

* Moar
2021-07-27 21:55:40 +09:00
Lauri Tulmin b483d7d249
Fix concurrency with callback test on okhttp3 latest (#3676) 2021-07-26 18:49:21 +03:00
Lauri Tulmin 3555c251c9
Hibernate: set span name only on method entry (#3603) 2021-07-26 10:29:40 +03:00
Lauri Tulmin 26dc106399
Okhttp3: fix concurrency test with callback (#3669) 2021-07-26 13:12:29 +09:00
Lauri Tulmin 437e568fee
Enable disable apache async http client tests (#3667) 2021-07-26 13:11:25 +09:00
Lauri Tulmin 266dc46b39
Causality test is enabled by default (#3670)
* Causality test is enabled by default

* Causality test is enabled by default
2021-07-26 12:06:36 +09:00
Lauri Tulmin c3d26f99fa
Include rxjava2 instrumentation for vertx reactive tests (#3668) 2021-07-26 11:42:00 +09:00
Lauri Tulmin 4db7bd5ff3
Move common code from netty 4.0 and 4.1 http client to common superclass (#3660) 2021-07-26 11:15:13 +09:00
Lauri Tulmin 3d36fecd81
Don't wait in busy loop (#3663)
* Don't wait in busy loop

* use awaitility
2021-07-25 10:40:27 -07:00
Lauri Tulmin 1b5df6d78a
Netty connection failure handling (#3569)
* Netty connection failure handling

* Update instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/client/AbstractNettyHttpClientTracer.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Remove unused import

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-07-23 11:21:15 +03:00
Lauri Tulmin 4f088c7e05
Test latest version of vert.x http server (#3621)
* Test latest version of vert.x http server

* add missing files

* spotless
2021-07-23 11:00:48 +03:00
Lauri Tulmin d7dcc70119
Rename jws-1.1 to jaxws-jws-api-1.1 (#3653) 2021-07-22 10:25:43 -07:00
Lauri Tulmin 1197480f6e
Netty4: handle read timeout (#3613)
* Netty4: handle read timeout

* spotless
2021-07-21 21:20:21 +03:00
Lauri Tulmin 6269eb57b4
Fix aws-sdk latest dep tests (#3646) 2021-07-21 18:51:39 +03:00
Lauri Tulmin fc9609d814
couchbase 3.2.0 (#3645) 2021-07-21 16:46:31 +03:00
Nikita Salnikov-Tarnovski e937d85188
Use the correct version (#3634) 2021-07-20 09:38:07 +03:00
Nikita Salnikov-Tarnovski d3ba86fd3d
Exclude broken version from tests (#3632) 2021-07-20 15:23:51 +09:00
Trask Stalnaker e2d23cd8c1
Fix bounds check (#3612)
* Fix bounds check

* Update instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/aspects/WithSpanAspectAttributeBinder.java

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

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2021-07-20 09:29:45 +09:00
Trask Stalnaker 734a1e2e6e
Update opentelemetry-api-metrics instrumentation name (#3611) 2021-07-19 10:10:09 -07:00
Anuraag Agrawal e0cb216610
Remove remaining usages of basic span asserts (#3616) 2021-07-19 10:09:44 -07:00
Anuraag Agrawal f5ce4c03f8
Inline basic usages of basicSpan (#3583)
* Inline basic usages of basicSpan

* spock
2021-07-18 21:15:51 +03:00
Lauri Tulmin 050e675abc
Split vertx instrumentation into client and server instrumentation (#3567) 2021-07-18 21:15:02 +03:00
Anuraag Agrawal 04c070ccc1
Add HTTPClientMetrics (#3598)
* Add HTTPClientMetrics

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpClientMetrics.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-16 18:22:35 +09:00
HaloFour 256e8f2a64
Move async strategies to annotation support (#3574)
* Move async strategies to annotation support

* Fix dependencies and refactor copypasta

* Move AsyncSpanEndStrategy to annotation support project

* spotless
2021-07-16 10:55:23 +02:00
Trask Stalnaker 344e205720
Help out Intellij (#3595) 2021-07-16 15:55:30 +09:00
Anuraag Agrawal d87f876467
Fix test metrics conversion from OTLP (#3580) 2021-07-16 12:06:38 +09:00
Anuraag Agrawal d3b62de8a5
Replace most uses of TraceUtils with testRunner runWithSpan. (#3582) 2021-07-15 10:30:34 -07:00
Niki 016a963640
fixed potential NullPointerException if AMQP.Properties::getHeaders returns null (#3588) 2021-07-15 10:27:23 -07:00
Mateusz Rzeszutek 9a3734f8ed
Clean up bootstrap dependencies and build scripts (#3570)
* Clean up bootstrap dependencies and build scripts

* add evaluationDependsOn()

* Resolve configuration later

* remove the javaagentLibs config

* Fix muzzle bootstrap classpath

* Fix after rebase

* Try javaagentLibs once again
2021-07-15 18:56:36 +02:00
Mateusz Rzeszutek e1584b5c11
Skip jedis-3.6.2 version (#3590) 2021-07-15 17:03:37 +03:00
Trask Stalnaker dffb12fd44
Add missing test verification (#3578) 2021-07-15 09:15:12 +03:00
HaloFour 814239c8c0
Adds binding of attributes in methods annotated with @WithSpan (#3188)
* Add binding of span attributes for traced methods

* Spring Aspect support, memoization

* Test with attribute name from ParameterNameDiscoverer

* Refactorings, javadocs and tests

* Refactor out creating AttributeBinding to separate class

* Wrapped attribute bindings for array parameters

* Attribute binding for List and EnumSet

* Attribute binding for subclass of List with reflection helper class

* Fix test failures in JDK 8

* Attribute binding to Set<? extends Enum>

* Move attribute binding to instrumentation-annotation-support project

* Fix copypastaed missing imports in tests

* Simplify ParameterizedClass based on PR feedback and add javadocs

* Remove blank javadoc

* Switch to cache with weak keys for memoizing attribute bindings by method

* Remove binding support for EnumSet<?>

* Clean up javadoc

* Use SpanAttribute annotation from opentelemetry 1.4.0-SNAPSHOT

* Address some PR concerns

* Clean up

* Fix instrumentation dependency in Springboot

* Update documentation

* Switch javaagent dep to compileOnly per PR comment

* spotless

* Kick CI

* Rename annotation support module and packages

* Resolve SpanAttribute annotation at runtime with fallback for older OTel versions

* Remove unnecessary dependency

* Move reflection helper to annotation support module

* Remove unnecessary enum and fields from unit test
2021-07-14 13:32:07 -07:00
Mateusz Rzeszutek 229d8adc49
Publish shaded OpenTelemetry API and annotations for muzzle (#3555)
* Publish shaded OpenTelemetry API and annotations for muzzle

* code review
2021-07-14 15:33:07 +02:00
Lauri Tulmin 8318d5acc9
Hibernate: handle jpa EntityManager (#3540)
* Hibernate: handle jpa EntityManager

* review comments

* Update instrumentation/hibernate/hibernate-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/SessionMethodUtils.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-14 13:25:35 +03:00
Lauri Tulmin 1d01475948
Use http 1.1 for okhttp3 tests (#3565) 2021-07-14 13:21:49 +03:00
Mateusz Rzeszutek 71e7d666ed
Convert OkHttp 3 to Instrumenter API (#3538)
* Convert OkHttp 3 to Instrumenter API

* code review

* Update instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpAttributesExtractor.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-13 18:41:19 -07:00
Anuraag Agrawal 2e5505b872
Extract logic for bridging recognized context keys (#3547)
* Extract logic for bridging recognized context keys

* Moar

* Not private

* Not private

* Style
2021-07-14 08:24:36 +09:00
Anuraag Agrawal 9219fb6067
Only instrument builders once (#3544) 2021-07-14 08:24:15 +09:00
Anuraag Agrawal df89691ca5
Move runWith logic to testrunner for use from Groovy and replace one … (#3546)
* Move runWith logic to testrunner for use from Groovy and replace one usage.

* Comment

* Fix static init order

* Fix

* Style
2021-07-13 17:14:00 +09:00
Mateusz Rzeszutek 3d1e782fc5
Instrumentation-specific bootstrap classes (#3495)
* Instrumentation-specific bootstrap classes

* try to move bootstrap modules dependency to javaagent
2021-07-13 09:34:02 +02:00
Mateusz Rzeszutek e5bbc392c6
Use 'Tasklet' for spans that are produced by custom Spring Batch asklets (#3528) 2021-07-13 08:41:31 +02:00
Trask Stalnaker d0cb08a37b
Rename javaagent-api artifact to javaagent-instrumentation-api (#3513)
* part 1

* part 2

* Undo change in examples

* Spotless
2021-07-12 21:53:49 -07:00
Anna Nosek e46ae82e94
Springboot propagators (#3506)
* set propagators in sdk builder

* add test for propagators

* introduce CompositeTextMapPropagator

* simplify composite TextMapPropagator creation, use SDK names for PropagationType

* Update instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/propagators/PropagationAutoConfiguration.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/propagators/PropagationAutoConfigurationTest.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* replace enum with string, remove unnecessary noop propagator addition

* add warning and test for unsupported value

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-07-12 21:40:09 -07:00
Anuraag Agrawal ac85c3cbd8
Make AgentContextWrapper class private (#3548) 2021-07-12 15:35:04 -07:00
Anuraag Agrawal a1b1c7452e
Inline one usage of basicSpan (#3535) 2021-07-12 10:02:40 -07:00
Mateusz Rzeszutek ce047325b2
Put RocketMQ's consumer span in current context (#3537)
* Put RocketMQ's consumer span in current context

* codenarc

* code review comments
2021-07-12 11:07:30 +09:00
HaloFour 3e8d3e88bf
Update OpenTelemetry to version 1.4.0 (#3541)
* Update to OpenTelemetry 1.4.0

* Fix breaking changes with opentelemetry-api-metrics
2021-07-10 15:53:02 +09:00
Anuraag Agrawal f601863d12
Merge Java TraceUtils into extension and switch to Instrumenter API. (#3532)
* Merge Java TraceUtils into extension and switch to Instrumenter API.

* Woah
2021-07-10 13:21:12 +09:00
Mateusz Rzeszutek 7969bdf18e
Add a small test utility that mimics Spock's 'cleanup:' block (#3533)
* Add a small test utility that mimics Spock's 'cleanup:' block

* Update testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/AutoCleanupExtension.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Move to internal

* fix broken import

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-07-09 18:35:43 +03:00
Mateusz Rzeszutek 9b56fc9051
Clean up AgentElementMatchers (#3527)
* Clean up AgentElementMatchers

* remove a TODO

* moved method
2021-07-09 10:02:21 +03:00
Anuraag Agrawal d8fbecb26f
Migrate RMI test to Java. (#3525)
* RMI Java

* Migrate RMI test to Java.

* Small clean
2021-07-09 15:02:51 +09:00
Anuraag Agrawal c05dcf38b1
Allow RMI test to run on Java 16 (#3524)
* Allow RMI test to run on Java 16

* testJavaVersion
2021-07-09 11:26:00 +09:00
Lauri Tulmin b9bea71627
Remove repo.gradle.org dependency (#3522) 2021-07-07 16:42:50 -07:00
Trask Stalnaker 9e4da754c2
Use consistent logger field name (#3515) 2021-07-07 10:47:46 -07:00
Trask Stalnaker b304cc2912
Deprecate CallDepth.reset() and get() (#3511)
* Deprecate CallDepth.reset() and get()

* Don't pass CallDepth around
2021-07-07 09:24:50 -07:00
Trask Stalnaker 238427ba6a
Use new CallDepth pattern for hibernate spans (#3510) 2021-07-07 14:55:59 +09:00
Trask Stalnaker dddb39b1e2
Make coreJdk property internal (#3512) 2021-07-07 08:23:15 +03:00
Mateusz Rzeszutek c5ba5c3a71
Use local variable for passing CallDepth between advice enter/exit me… (#3504)
* Use local variable for passing CallDepth between advice enter/exit methods

* fix broken call depth tracking

* checkstyle

* fix javadocs
2021-07-06 12:05:14 -07:00
Alexey Zhokhov 9979bef877
JDBC instrumentation: switch to use api instead of implementation for instrumentation-api. (#3494)
* Switch to use api instead of implementation for instrumentation-api.

* Removed duplicated dependency.
2021-07-06 09:20:41 -07:00
Mateusz Rzeszutek b9fcb6b498
Reduce CallDepth classes' API surface (#3497) 2021-07-06 09:24:19 +02:00
Trask Stalnaker f5d6b39b72
Update Apache HttpAsyncClient to Instrumenter API (#3490) 2021-07-05 14:08:38 -07:00
Trask Stalnaker b030b1ca10
Simpler Apache HttpClient request wrapper (#3489) 2021-07-05 12:53:32 -07:00
Mateusz Rzeszutek 56ba64adf8
Convert Pair class to AutoValue (#3496) 2021-07-05 10:23:26 -07:00
HaloFour 4500dd984b
Port AsyncSpanEndStrategy implementations to AsyncOperationEndStrategy (#3454)
* Port RxJava 2 async strategy to new interface

* Port RxJava 3 async strategy to new interface

* Port Guava async strategy to new interface

* Port Reactor async strategy to new interface

* Kick CI
2021-07-05 10:45:49 +02:00
Anuraag Agrawal 8eb24f9886
Split up build logic to plugins that can eventually be published and … (#3474)
* Split up build logic to plugins that can eventually be published and this-repo-specific stuff.

* Muzzle

* compileOnly

* Typo
2021-07-05 16:18:45 +09:00
Mateusz Rzeszutek 02ef588f68
Remove dependency on javaagent-bootstrap from javaagent-extension-api (#3477) 2021-07-03 11:18:53 -07:00
Trask Stalnaker 642f213c12
Remove hardcoded version (#3470)
* Remove hardcoded version

* Codenarc
2021-07-01 23:00:15 -07:00
Alexey Zhokhov ed02aff7b5
OpenTelemetry JDBC instrumentation library (#3367)
* Added jdbc library with ported version of OpenTracing JDBC Instrumentation.

* Gradle 7.1.

* Revert "Gradle 7.1."

This reverts commit e3df35b0

* Code style fixes.

* Code style fixes.

* Moved some JDBC utilities classes to the library module.

* javax.annotation.Nullable -> org.checkerframework.checker.nullness.qual.Nullable

* Build fix.

* Spotless fixes.

* Cache prepared statements.

* Cache connection info.

* Tracing for JDBC statement and prepared statement.

* Added some API dependencies.

* Fixed ending the span.

* Removed proxy usage.

* Cleanup.

* Implemented datasource with tracing support.

* Renamed Tracing prefix with OpenTelemetry.

* Renamed Tracing prefix with OpenTelemetry.

* Moved utilities classes to io.opentelemetry.instrumentation.jdbc.internal subpackage.

* Build fix.

* Build fix.

* Cleanup.

* Moved some shared classes to instrumentation-api module.

* Code review fixes.

* Make OpenTelemetryDriver final.

* Spotless fixes.

* Moved test classes from javaagent-unit-tests module to library module.

* Removed javaagent-unit-tests module.

* Covered OpenTelemetryDriver with tests.

* Cleanup.

* Covered OpenTelemetryDataSource with tests.

* Covered OpenTelemetryConnection with tests.

* Revert TestPreparedStatement.

* Added README.

* Build fix.

* Checkstyle fixes.

* Spotless fixes.

* Rename to build.gradle

* Fix build.gradle format.

* INSTANCE package scope.

* Documented OpenTelemetryDataSource usage.

* Renamed CheckedCallable to ThrowingSupplier.

* Update instrumentation/jdbc/library/README.md

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/README.md

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/README.md

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jdbc/library/README.md

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Removed javaagent-api module usage.

* Removed useless checking.

* Moved javaagent test classes to testing module.

* Move common JDBC test classes to testing module.

* Spotless fixes.

* Code format.

* Moved PeerServiceAttributesExtractor back to javaagent-api module.

* Rename JavaAgentJdbcSingletons to JdbcSingletons.

* Fixed JdbcSingletons import.

* Cleanup.

* Codenarc fixes.

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Parse InstrumentationVersion.VERSION.

* Store major and minor version in private static fields.

* Make the datasource way a preferred way.

* Removed interceptor mode.

* Rename build.gradle -> build.gradle.kts.

* Switch to Gradle Kotlin DSL.

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-07-01 10:35:07 -07:00
Mateusz Rzeszutek f5f2de9511
Refactor/rename BootstrapPackagesProvider and PropertySource (#3435)
* Refactor/rename BootstrapPackagesConfigurer and PropertySource

* Update comment
2021-07-01 08:26:51 -07:00
Anuraag Agrawal 3cfa086ffd
Migrate nullaway config to plugin (#3462) 2021-07-01 18:13:16 +09:00
Lauri Tulmin 5d6be8764e
Remove jetty-server exclude (#3453) 2021-07-01 09:12:26 +09:00
zmapleshine bbd33115d1
Fix dubbo trace/span cross-process propagation (#3442)
* fix(instrument): fix dubbo client trace inject adapter.

* fix(instrument): fix dubbo client trace inject adapter.
2021-06-30 18:47:46 +03:00
GuillaumeWaignier 00b1b07684
Fix kafka Stream instrumentation (#3438) 2021-06-30 18:47:14 +03:00