Commit Graph

380 Commits

Author SHA1 Message Date
jason plumb a50c13382f
Don't report 400 level as error for SERVER spans (#4403)
* don't report 400 level as error for server spans

* fix HttpServerTest base class

* fix JspInstrumentationForward test

* split HttpStatusConverter into client and server implementations, and create two HttpSpanStatusExtractor.create methods, one for server and one for client.

* rebase

* fix test

* spotless

* fix test

* remove unused

* use strongly typed attributes converters and rename to overloaded create()

* fix tests

* remove redundant assert

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-20 13:39:35 -07:00
Lauri Tulmin 17a85bbc22
Use byte-buddy-dep instead of byte-buddy (#4400)
* Use byte-buddy-dep instead of byte-buddy

* print stacktrace on examples failure

* try to fix gradle plugins

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try removing mavenLocal

* add mavenLocal plugin repository

* publish gradle-plugins to mavenLocal for examples ci build

* Fix bytebuddy exclusion
2021-10-19 13:46:48 -07:00
Martin ac91dc090a
Type annotation placement (#4406)
* switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable`

* code format
2021-10-17 17:38:43 -07:00
Mateusz Rzeszutek 5e7b5380cd
Remove mentions of http.url attribute in server instrumentations (#4394) 2021-10-15 11:00:50 -07:00
Lauri Tulmin 6952e87fc5
Also run strict context check retry for junit tests (#4380) 2021-10-14 08:57:30 -07:00
Trask Stalnaker 53a639bbba
Fix tomcat async spans (#4339)
* Add test

* Fix tomcat async spans

* Preserve existing test controller behavior

* Comments
2021-10-13 13:04:23 -07:00
Mateusz Rzeszutek 25bfb49b80
Migrate Netty 4.x server instrumentations to Instrumenter API (#4342)
* Migrate Netty 4.x server instrumentations to Instrumenter API

* fix vertx tests

* codenarc

* code review comments

* fix broken assertion

* Update instrumentation/netty/netty-4-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/server/NettyServerInstrumenterFactory.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2021-10-13 15:32:24 +02:00
Mateusz Rzeszutek ff8696586d
Remove VirtualField#computeIfNull() method (#4354) 2021-10-12 11:37:35 -07:00
Lauri Tulmin b06c1f9018
Collect more attributes from servlet instrumenter (#4356)
* Collect more attributes from servlet instrumenter

* spotless
2021-10-12 10:58:47 -07:00
Mateusz Rzeszutek 354699647a
Test captured HTTP headers - HTTP server tests, part 2 (#4328)
* Test captured HTTP headers - HTTP server tests, part 2

* Turn off captured HTTP headers testing for grizzly

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-08 13:05:35 -07:00
Lauri Tulmin 478f936d54
Retry strict context check failures (#4282) 2021-10-08 10:47:52 -07:00
Mateusz Rzeszutek fb77651658
Restrict usage of arrays as VirtualField types and fix field naming (#4323)
* Restrict usage of arrays as VirtualField types and fix field naming

* disallow primitive type usage too

* A few more test cases and validations
2021-10-08 10:52:26 +02:00
Mateusz Rzeszutek 581a5e3980
Test captured HTTP headers - HTTP server tests, part 1 (#4320)
* Test captured HTTP headers - HTTP server tests, part 1

* Upgrade undertow in resteasy tests (Undertow 1.0 had a bug where it thrown NPE on getHeaders())
2021-10-07 13:41:48 -07:00
Mateusz Rzeszutek fda4779127
Fix a bug in the field backed VirtualField implementation (#4310)
* Fix a bug in the field backed VirtualField implementation

* Multiple interface fields
2021-10-06 09:40:53 -07:00
Mateusz Rzeszutek 7791be24e0
Remove implementations of host() and userAgent() in HTTP extractors (#4299)
* Remove implementations of host() and userAgent() in HTTP extractors

* fix broken headers copying
2021-10-05 10:25:45 -07:00
Trask Stalnaker d2b7786027
Fix some tests on windows (#4288) 2021-10-04 21:40:24 -07:00
Mateusz Rzeszutek 9d6fb65b41
Remove ContextStore/InstrumentationContext mentions from internal age… (#4267)
* Remove ContextStore/InstrumentationContext mentions from internal agent classes

* Fix internal-reflection module
2021-10-04 09:24:25 -07:00
Trask Stalnaker 92394ad9ae
Remove url from HttpServerAttributesExtractor (#4209)
* Remove url from HttpServerAttributesExtractor

* Remove UriBuilder

* Tracers too

* apache-camel

* Finatra

* jsp

* Ratpack

* Ratpack library

* Ratpack

* Spark

* Feedback

* Fix Undertow

* Vertx

* vertx-web

* play-2.4

* webflux

* jaxrs

* Spotless

* Update semantic-conventions.md

* Update smoke tests

* More realistic target

* Remove outdated doc

* Wording
2021-10-03 09:17:23 -07:00
Mateusz Rzeszutek c421b66d56
Remove unnecessary VirtualField#setIfNull() method (#4262) 2021-10-02 13:17:48 -07:00
Mateusz Rzeszutek c11b96e4d0
Make it possible to use InstrumentationContext (now VirtualField) fro… (#4218)
* Make it possible to use InstrumentationContext (now VirtualField) from library instrumentation

* fix tests

* fix javadocs

* fix some more tests

* code review comments

* setIfNull, computeIfNull
2021-10-01 11:13:11 +02:00
Trask Stalnaker 9ea33edf08
Remove attrs from http client attributes extractor (#4210)
* Remove scheme/host/target from HttpClientAttributesExtractor

* And jaxrs-client

* Remove unused methods
2021-09-28 12:58:42 -07:00
Nikita Salnikov-Tarnovski 5dffeef4aa
Introduce muzzle-specific interface to InstrumentationModule (#4207)
* Introduce muzzle-specific interface to InstrumentationModule
* Moved more methods to the InstrumentationModuleMuzzle interface
2021-09-28 12:15:33 +03:00
Anuraag Agrawal 9d5cf4e0b3
Add logback.xml to testing-common (#3726)
* Add logback.xml to testing-common

* showStandardStreams

* Remove showStandardStreams due to verbosity

* Fix javaagent-tooling tests

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-24 10:09:42 +09:00
Lauri Tulmin 8c8eb3ddea
Use caffeine3 on jdk11 and caffeine2 on older jdks (#4154)
* Use caffeine3 on jdk11 and caffein2 on older jdks

* ignore caffeine3 classes on java 8

* Update dependencyManagement/build.gradle.kts

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-21 14:04:09 -07:00
Mateusz Rzeszutek dc4ddf7932
Remove ContextStore.Factory interface; use Supplier instead (#4157) 2021-09-17 13:00:23 -07: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
Mateusz Rzeszutek ab9c688e7a
Test nested CLIENT span suppression in library instrumentations (#3970) 2021-08-27 11:16:59 +02: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 1dae415ebc
Mark our generated classes and members as synthetic (#3928) 2021-08-24 09:53:22 -07:00
Lauri Tulmin fbbd76ef95
Remove http client test workarounds that are not needed with 1.5 sdk (#3875)
* Remove workarounds from http client test that are not needed with 1.5 sdk

* Remove more workarounds
2021-08-19 08:50:25 -07: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 430f1cb561
Add junit test timeotut (#3850) 2021-08-16 10:11:09 -07:00
Trask Stalnaker bb461e5274
Fix tests on windows (#3360) 2021-08-09 09:23:41 -07: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
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 f960456240
Add tests that verify that Span.current() works in spring batch listeners (#3758) 2021-08-03 09:17:03 -07: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
Anuraag Agrawal e4fcbb8f51
Explicitly check for key for attribute assertions using hasEntrySatis… (#3703)
* Explicitly check for key for attribute assertions using hasEntrySatisfying

* Check test user agent set first
2021-07-28 13:05:00 +03: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
Nikita Salnikov-Tarnovski 6a2ee3255a
Extract muzzle check plugin (#3657)
* Extract muzzle check plugin
2021-07-26 12:37:14 +03:00
Lauri Tulmin 26dc106399
Okhttp3: fix concurrency test with callback (#3669) 2021-07-26 13:12:29 +09:00
Nikita Salnikov-Tarnovski c6f9bef90e
Use published muzzle generation plugin (#3639)
* Use published muzzle generation plugin
2021-07-22 11:46:49 +03:00
Lauri Tulmin 85b7c0569e
Replace usage of basicSpan (#3650) 2021-07-22 12:25:49 +09:00
Lauri Tulmin 1197480f6e
Netty4: handle read timeout (#3613)
* Netty4: handle read timeout

* spotless
2021-07-21 21:20:21 +03:00
Nikita Salnikov-Tarnovski a55e048451
Convert ReferenceCollectorTest to JUnit (#3644)
* Convert ReferenceCollectorTest to JUnit

* User AssertJ

* Polish
2021-07-21 19:36:46 +03: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
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
Anna Nosek 0fd8d2cc47
Add noop sdk configuration option (#3539)
* introduce noop

* test configuration

* rename to noop api, move System.setProperty() calls

* remove unnecessary semicolon

* codenarc fix
2021-07-15 11:33:00 +03: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
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
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
Anuraag Agrawal 9be9e40556
Use async requests for high concurrency test. (#3534) 2021-07-10 13:20:53 +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
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
Trask Stalnaker 9e4da754c2
Use consistent logger field name (#3515) 2021-07-07 10:47:46 -07:00
Mateusz Rzeszutek f78d414975
Publish armeria-shaded-for-testing without -all classifier (#3475)
* Publish armeria-shaded-for-testing without -all classifier

* Update testing-common/build.gradle.kts

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

* compileOnly

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-06 12:15:06 +02:00
Anuraag Agrawal 44f2354d41
Allow disabling thread details and disable for most tests. (#3464) 2021-07-01 08:31:27 -07:00
Anuraag Agrawal 262c5d59d7
Migrate testing and shaded-for-instrumenting builds to kotlin (#3448)
* Migrate testing and shaded-for-instrumenting builds to kotlin

* Migrate
2021-06-30 19:21:20 +09:00
Anuraag Agrawal 785dc6adf2
Rename build files to build.gradle (#3409)
* Rename build files to build.gradle

* Rename smoke-tests

* Fix already broken
2021-06-25 16:10:31 +09:00
Anuraag Agrawal deb0e255cf
Use plugins block everywhere for applying plugins (#3386)
* Use plugins block everywhere for applying plugins

* Actually it's library instrumentation
2021-06-24 11:13:35 +09:00
Trask Stalnaker 7d5c7e0a4a
Fix spring jms listener instrumentation (#3359)
* Fix Spring JMS listener instrumentation

* Comment

* More allows
2021-06-21 11:46:34 +02:00
Anuraag Agrawal 9e763d69a7
Extract build plugin for instrumentation testing projects that aren't muzzled / published. (#3354) 2021-06-19 11:04:33 +09:00
Anuraag Agrawal 80f43b7a6a
Migrate javaagent-instrumentation to plugin (#3328)
* Migrate instrumentation.gradle to plugin

* Migrate usages

* Remove old

* Fix

* Revert example

* afterEvaluate

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-17 23:13:14 +09:00
Anuraag Agrawal a818f14957
Migrate publish.gradle to convention plugin (#3312)
* Migrate publish.gradle to convention plugin

* Migrate usages of publish.gradle

* Remove publish.gradle

* Newline
2021-06-15 22:12:48 +09:00
Anuraag Agrawal 7ad9e7a50b
Move shaded testing dependencies to internal package. (#3305) 2021-06-15 13:10:19 +03:00
Trask Stalnaker c79b5c5f1d
Fix some raw types warnings (#3300)
* Fix some raw types warnings

* oops
2021-06-15 08:42:07 +03:00
Anuraag Agrawal 224dc51e93
Migrate java.gradle to conventions plugin (#3289)
* Migrate java.gradle to convention plugin.

* Switch to java-conventions

* Remove old file

* Fix

* Fix merge

* Missing paragraph

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-15 08:10:39 +09:00
Trask Stalnaker 62f1f49bcd
Intellij cleanup (Java and Groovy) (#3285)
* Intellij cleanup

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/code/CodeAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/DbAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/SqlAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesExtractorTest.java

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

* Update instrumentation/spring/spring-web-3.1/library/src/test/java/io/opentelemetry/instrumentation/spring/httpclients/RestTemplateInterceptorTest.java

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

* Use glassfish version that supports lambdas

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-06-14 10:23:01 -07:00
Anuraag Agrawal 9a19c6fa67
Make guava compileonly (#3290)
* Make guava compileonly

* testImplementation
2021-06-14 23:05:53 +09:00
Trask Stalnaker b25ac0f1ad
Clean up old operation name terminology (#3282) 2021-06-13 22:10:36 -07:00
Trask Stalnaker ab174f4f9c
Remove javaagent-tooling test forking (#3272)
* Remove javaagent-tooling test forking

* Remove one more forking
2021-06-13 10:57:45 -07:00
Anuraag Agrawal c92fbcf624
Update to OTel SDK 1.3.0 (#3253) 2021-06-12 09:56:23 -07:00
Anuraag Agrawal 84cc044ddf
Migrate remaining test client calls to Armeria and remove testing-com… (#3250) 2021-06-11 11:51:23 -07:00
Anuraag Agrawal d44cf56636
Remove leftover google.com references. (#3243) 2021-06-11 11:04:41 +09:00
Anuraag Agrawal 60aaff8972
Migrate HttpServerTest to Armeria (#3240)
* Migrate HttpServerTest to Armeria

* Update testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-11 08:56:02 +09:00
Anuraag Agrawal d79fb8cc84
Use local server to test HTTPS instead of google.com (#3236) 2021-06-11 08:04:17 +09:00
Mateusz Rzeszutek 1cc893b009
Spring Integration library instrumentation (#3120)
* Spring Integration library instrumentation

* testLatestDeps

* attributesExtractor

* errorprone

* Code review comments

* rename package messaging -> integration

* move package in groovy files too

* thread local map

* Revert "thread local map"

This reverts commit 7c8d614f4c.

* Always extract parent SpanContext from the incoming message

* checkstyle

* codenarc
2021-06-10 14:51:32 +02:00
Anuraag Agrawal 8a6305c8c0
Remove test for dropped request to google.com (#3234) 2021-06-10 16:31:41 +09:00
Anuraag Agrawal f91e35616f
Migrate remaining usages of TestHttpServer to Armeria. (#3231)
* Migrate remaining usages of TestHttpServer to Armeria.

* Remove unused.

* Shade netty tcnative to allow TLS on Java 8
2021-06-10 09:28:44 +09:00
Anuraag Agrawal 7ae23fc694
Migrate HttpClientTest test server to Armeria (#3225)
* Use Armeria for test HTTP server.

* Continue

* Migrate test http server to Armeria.

* Finish

* Use junit extension

* Remove unused.

* Use localhost for net peer name.

* Block for full response in recator-netty tests.

* Handle split responses in netty41 and akka

* Typo
2021-06-09 15:05:58 +09:00
Anuraag Agrawal 1b63e3265f
Always include server span in HTTP client tests. (#3214)
* Always include server span in HTTP client tests.

* Scrub
2021-06-08 11:39:06 +09:00
Lauri Tulmin d4e64990fc
Add http client concurrency test with callback (#3192)
* Add http client concurreny test with callback

* Unwrap subscriber for needs executor tests
2021-06-07 12:29:08 -07:00
Anuraag Agrawal 2436499a09
Update to Errorprone 2.7 (#3181)
* Update to errorprone 2.7

* ToString

* Finish
2021-06-04 10:40:55 +09:00
Mateusz Rzeszutek e1762677da
Refactor HttpClientTest (#3159)
* Remove unused extraClientSpans() method
* Merge extraAttributes() and hasClientSpanHttpAttributes(uri) into
httpAttributes(uri): this will allow to choose extracted attributes
per URI (for example, OkHttp won't set flavor on connection exception
once it's rewritten to Instrumenter)
2021-06-03 10:54:01 +09:00
Trask Stalnaker be6816489a
Small cleanup (#3163)
* Small cleanup

* Ooops
2021-06-02 08:56:49 +03:00
Anuraag Agrawal c3dedbb64e
Enable all errorprone checks (#3155)
* Enable all errorprone checks

* Fixes

* Finish

* Finish

* Add flag to disable error prone
2021-06-01 17:41:08 +09:00
Trask Stalnaker fb0d047fce
Last type instrumentations to top-level classes (#3123) 2021-05-30 16:05:31 -07:00
Lauri Tulmin e16cf3001f
Add attributes to netty connection failure span (#3115) 2021-05-28 15:01:10 -07:00
Anuraag Agrawal ed88cca533
Migrate from spotbugs to errorprone (#3122)
* Migrate from spotbugs to errorprone

* Fix hashtable

* try-with-resources

* Fix from merge

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 14:23:40 -07:00
Anuraag Agrawal c358a35414
Use dependency management pattern for dependency versions (#3113)
* Use dependency management pattern for dependency versions.

* Add groovy bom too

* Update dependencyManagement/dependencyManagement.gradle.kts

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 11:32:08 +09:00
Ago Allikmaa df078f95a9
Extract HttpServerTest INDEXED_CHILD span attribute collection logic (#3095)
* Extrawct HttpServerTest INDEXED_CHILD span attribute collection logic

* Adjust whitespace

* Fix context issue with JAX-RS

* Rerun tests
2021-05-27 11:18:11 +03:00
Ago Allikmaa 0a34b2b056
Enable Spring WebFlux concurrency tests (#3077)
* Enable Spring WebFlux concurrency tests

* Fix Spring WebFlux test application scan scope

* codenarc fix

* Renamed package server.http to server.base

* Addressed PR comments
2021-05-26 08:29:46 -07:00
Mateusz Rzeszutek 6fb3ec0501
Do not use arrays in InstrumentationModule (#3057)
* Do not use arrays in InstrumentationModule

* add missing cast
2021-05-24 13:51:07 +02:00
Mateusz Rzeszutek 272419a6f3
Refactor muzzle Reference class (#3040)
* split out inner classes into separate files
* and since they're public API I made them a little bit better: added javadocs, renamed classes/methods

Getting the `...extension.muzzle` package stable is the first step to extracting the muzzle compile time plugin - the plugin may have a bit different release lifecycle than the main project and getting those classes stable will help a lot with eliminating breaking changes.
2021-05-20 14:33:43 -07:00
Trask Stalnaker 9f7cfd27b3
Avoid loading advice classes in agent class loader, part 2 (#3031) 2021-05-19 09:53:27 -07:00
Mateusz Rzeszutek bb8f515083
Refactor TypeInstrumentation#transformers() method (#3019)
* Refactor TypeInstrumentation#transformers() method part 1

Add TypeInstrumentation and its implementations

* Refactor TypeInstrumentation#transformers() method part 2

Use the new method in all existing TypeInstrumentation implementations

* Drift

* Spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-18 09:50:26 +02:00
Trask Stalnaker 1535834d46
Update Apache HttpClient 2.0 to Instrumenter API (#3012) 2021-05-17 17:15:10 -07:00
Trask Stalnaker 908970b0d0
Rename local variables in test assertions to improve some groovy assert messages (#3013) 2021-05-17 12:28:18 -07:00
Lauri Tulmin b4b102dbec
Enable http client connection failure tests (#2998) 2021-05-17 12:15:48 -07:00
Trask Stalnaker e54a007dc1
Remove unnecessary method in test harness (#3016) 2021-05-17 12:12:56 -07:00
Mateusz Rzeszutek 9c1083b541
Muzzle code generation cleanup (#2985)
* Muzzle code generation cleanup

- remove hardcoded class names from MuzzleCodeGenerator (easier renaming in the future)
- store field/method descriptors in references instead of types/lists of types
- remove unnecessary primitive type comparison in ReferenceMatcher (comparing descriptors is enough)
- improve printMuzzleReferences output
2021-05-15 14:48:18 -07:00
Anuraag Agrawal fe41885ee6
Switch to colon notation for dependencies. (#2994)
* Switch to colon notation for dependencies.

* Even more cleanup

* Revert mistake
2021-05-15 15:31:06 +09:00
Trask Stalnaker 28d814c813
Add HTTP client error test (#2932) 2021-05-13 13:34:45 -07:00
Mateusz Rzeszutek 01a7f54197
Fix non-unique test case names (#2975) 2021-05-12 10:01:56 -07:00
Trask Stalnaker d67f161e6d
Muzzle optimization (#2903) 2021-05-11 21:01:35 -07:00
Trask Stalnaker 3528d63b92
Remove HelperInjectorAccess (#2936) 2021-05-10 13:58:26 -07:00
Trask Stalnaker 10db083e77
Update to OTel API/SDK 1.2.0 (#2945)
* Update to OTel API/SDK 1.2.0

* TCP.IP -> tcp_ip

* Fix smoke tests
2021-05-10 10:14:07 -07:00
Trask Stalnaker cd3dd581f9
Fix some remote connection tests (#2933) 2021-05-10 12:19:39 +09:00
Trask Stalnaker 6a84c2b2ec
Remove unnecessary generic type args (#2937)
* Remove unnecessary generic type args

* Revert one
2021-05-10 12:18:30 +09:00
Trask Stalnaker 65995388e6
Clean up Java 7 references (#2931)
* Clean up Java 7 references

* Use Java 8 stuff!

* Spotless
2021-05-09 14:16:42 +03:00
Mateusz Rzeszutek 9c7fae3b04
Extract javaagent-extension-api from tooling & spi (#2879) 2021-05-06 23:30:25 -07:00
Trask Stalnaker 690e3bdd16
Remove outdated muzzle condition (#2906)
* Remove outdated muzzle condition

* Remove outdated test
2021-05-05 10:33:28 +03:00
Ago Allikmaa 70c164216d
Enable JAX-RS server concurrency tests (#2907) 2021-05-05 10:32:19 +03:00
Mateusz Rzeszutek e4133f1845
Muzzle should check whether used fields are declared somewhere (#2870) 2021-04-28 10:01:21 -07:00
Trask Stalnaker 2ab92f556e
Fix duplicate http client tracing headers (#2842)
* Fix duplicate spring webclient tracing headers

* Fix Akka Http

* Fix Armeria

* Fix Java 11 Http Client

* Fix OkHttp 2.2

* Fix PlayWS
2021-04-23 13:05:10 -07:00
Trask Stalnaker 1824e36b96
Better server span name for Grails and Wicket (#2814) 2021-04-22 14:16:54 -07:00
Trask Stalnaker 46c1212236
Remove forward and include spans (#2816) 2021-04-22 11:36:53 -07:00
Lauri Tulmin a3c0b44b31
JAX-RS ApplicationPath annotation (#2824) 2021-04-21 09:07:54 -07:00
Trask Stalnaker fa359a4a5d
Remove some testNotFound exclusions (#2813) 2021-04-19 15:44:58 -07:00
Lauri Tulmin 9464134ffd
Test failing async http request (#2812) 2021-04-19 14:11:27 -07:00
Trask Stalnaker bd829a6494
Remove duplicate status verification (#2710) 2021-04-19 11:41:37 -07:00
Trask Stalnaker c17b803b71
Use isHelperClass over additionalHelperClassNames (#2796) 2021-04-14 09:38:16 -07:00
Trask Stalnaker 9bd028f767
Remove unnecessary genericness (#2797) 2021-04-14 00:01:28 -07:00
Mateusz Rzeszutek 078603caf5
Generate InstrumentationModule#contextStore() with muzzle (#2775) 2021-04-13 20:05:01 -07:00
Trask Stalnaker 3bc058b10b
Don't create duplicate headers (#2727)
* Test infra

* Update examples

* Update instrumentation

* Update tests

* jaxrs-client fixes

* Remove doRequest/doReusedRequest

* Fix muzzle

* some fixes

* fix test

* doc

* not private

* Apply to doRequestWithCallback also

* Update doc

* groovy

* better

* Don't hardcode traceparent

* Reuse request in SpringRestTemplateTest
2021-04-12 12:21:16 +03:00
Anuraag Agrawal a4ea1c9db2
Update to OTel 1.1.0 (#2744)
* Update to OTel 1.1.0

* Use transform safe logger

* Finish

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-04-08 16:01:16 +09:00
Nikita Salnikov-Tarnovski 38e98ebdad
Implement concurrent test for Vert.x http server (#2749)
* Implement concurrent test for Vert.x http server

* Format
2021-04-08 09:27:11 +03:00
Trask Stalnaker 410957f206
More consistent custom trace sorting in tests (#2728) 2021-04-07 10:29:41 -07:00
Anuraag Agrawal d8f6018ba6
Split HttpClientTest execution methods for sync and callback (#2675) 2021-04-06 15:26:01 -07:00
Trask Stalnaker 25dd2cf194
Verify span kind in all tests (#2715) 2021-04-05 12:57:48 -07:00
Ago Allikmaa 7027006f66
Request handlers and test images for Tomcat 10 and Jetty 11 (Servlet API 5) (#2703)
* Tomcat 10 and Jetty 11 handlers with Servlet API 5

* Jetty 11 and Tomcat 10 Windows images
2021-04-05 09:45:02 -07:00
Nikita Salnikov-Tarnovski 86ec1d7211
Concurrent server test (#2680)
* Concurrent server test

* Update testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-04-05 14:12:07 +03:00
Anuraag Agrawal cc47da585b
New Instrumenter API (#2596)
* Instrumenter

* Spotless

* More instrumenter

* More

* Instrumenter API

* New Instrumenter API - InstrumenterBuilder (#20)

* New Instrumenter API - InstrumenterBuilder

* New Instrumenter API - InstrumenterBuilder - code review comments

* Start doccing

* Docs

* Most tests

* Last test

* Stick with current hostName lookup for now

* Update testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpClientTest.groovy

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

* New Instrumenter API - code review comments (#21)

* Doc

* Checkstyle

* Cleanups

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-04-05 15:45:07 +09:00
Trask Stalnaker 0d11dbe565
Fix webflux client filter subscribe (#2646)
* Fix webflux client filter subscribe

* Add test

* Fix test

* Fix test, take 2

* Fix another test

* Suppress test for another module

* Suppress another library instrumentation

* Another

* Add nested client suppression in Armeria

* Add comments

* Revert extra line
2021-03-31 07:54:41 +03:00
Anuraag Agrawal dcd316da7a
Enable strict context check and fix some context issues. (#2637)
* Enable strict context check and fix some context issues.

* Drift

* Drift and cache

* Exclude grizzly include akka

* Grizzly, scala

* ForkJoin worker

* webflux comment, grizzly typo

* Give up on akka for now

* threadpool

* Fallback on grizzly, wait for completion in executor cancellation tests

* Hystrix

* ratpack

* Cleanups
2021-03-29 08:08:11 +03:00
Anuraag Agrawal 62a929f511
Close Response in HttpServerTest (#2642)
* Close Response in HttpServerTest

* Fix grails test

* Fix tomcat test
2021-03-27 16:56:39 +09:00
Nikita Salnikov-Tarnovski 5a9b0b999f
Test of single connection reuse for Netty (#2630)
* Test of single connection reuse for Netty

* Format
2021-03-26 16:21:46 +02:00
Mateusz Rzeszutek 1e50b72937
Make muzzle reference creation package(s) configurable (#2615)
* Make muzzle reference creation package(s) configurable

* Code review comments
2021-03-26 14:12:43 +02:00
Lauri Tulmin 4ad9ed5c32
Reimplement finding open ports (#2629) 2021-03-25 10:41:20 -07:00
Nikita Salnikov-Tarnovski 81f350f456
Concurrent http client tests with connection reuse (#2550)
* Concurrent http client tests with connection reuse

* Scope exception handler callback
2021-03-16 16:27:54 +02:00
Lauri Tulmin 7013376030
Add support for Grails (#2512)
* Add support for Grails

* exclude bad version from muzzle

* Review fixes

* review fixes

* rebase

* Trigger Build
2021-03-09 08:56:33 +02:00
Mateusz Rzeszutek 3dff44874f
Fix RestTemplateInterceptor so that it calls endExceptionally() on exception (#2516) 2021-03-08 09:36:47 -08:00
Anuraag Agrawal 2c03f2c526
Add support for muzzle to process AWS SDK v1 handler resource file. (#2526)
* Add support for muzzle to process AWS SDK v1 handler resource file.

* git add
2021-03-08 15:03:08 +02:00
Mateusz Rzeszutek ce39c55c0f
Remove tracer name configuration from spring-boot-autoconfigure (#2478)
* Remove tracer name configuration from spring-boot-autoconfigure

* Use OpenTelemetry wherever it makes sense
* Refactor @WithSpan advice since it made no sense before
* Rename @EnableOpenTelemetryTracing to @EnableOpenTelemetry (it won't be just tracing in the future)
* And add a getOpenTelemetry() method to InstrumentationExtension & InstrumentationSpecification

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

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

* Code review comments

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-05 10:50:14 +01:00