Commit Graph

489 Commits

Author SHA1 Message Date
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
Trask Stalnaker 0abc492bc3
Rename more properties (#2486)
* Rename more props to experimental

* Rename more properties

* Rename .internal to .testing

* Revert changes to examples distro

* Move chunk.new-trace to experimental

* Fix unrelated build issue
2021-03-04 11:20:47 -08:00
Anuraag Agrawal dc769e3702
Expose only minimal entrypoint for Armeria library instrumentation. (#2463) 2021-03-02 10:39:23 -08:00
Trask Stalnaker 5c1a432c54
Update old name (#2440) 2021-03-01 15:43:49 -08:00
Trask Stalnaker 475830789c
Update to otel-java 1.0.0 (#2431)
* Update to otel-java 1.0.0

* Fix test

* Fix another test

* Fix another test

* Fix hibernate tests

* Fix spring-data tests

* Spotless
2021-02-28 11:15:27 -08:00
Lauri Tulmin 0c7aff28e5
Enable disabled tests for HttpUrlConnection (#2382)
* Enable disabled tests for HttpUrlConnection

* review fix
2021-02-23 23:34:50 +02:00
Lauri Tulmin c8ca7e8d07
Make http.flavor spec compliant (#2370) 2021-02-22 13:12:05 -08:00
Lauri Tulmin 1ca7276593
Remove HttpServerTest.testExceptionBody and redirectHasBody (#2346) 2021-02-19 15:57:11 +02:00
Anuraag Agrawal 000df967ce
Update to SDK 0.17.0 (#2338)
* Update to SDK 0.17.0

* Finish

* ottrace
2021-02-19 15:51:55 +09:00
Anuraag Agrawal cc033a14ae
Inject OpenTelemetrySdk into lambda library instrumentation instead o… (#2328)
* Inject OpenTelemetrySdk into lambda library instrumentation instead of using global.

* Update javadoc

* Drift
2021-02-19 12:27:51 +09:00
Mateusz Rzeszutek aa5fef2bfe
Improve library tests' stability (#2300)
* Improve library tests' stability

* Code review follow-up
2021-02-17 13:22:14 +01:00
Piotr Glazar 64c8a51f7d
Rxjava2 library instrumentation (#2191)
* RxJava 2 library instrumentation

* Spotless fix

* Ignoring problematic test - for now

* Spock test fix

* Gradle testing module

* After upstream main merge

* Spotless fix

* onSubscribe plugin

* Major refactoring

* After main branch merge

* Spotless fix

* Code review fixes

* More code review fixes

* Removing obsolete Connectable* classes

* Apply suggestions from code review

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Code review fixes

* Adding a Javadoc comment that describes test methodology

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-02-17 13:12:50 +01:00
Mateusz Rzeszutek ee090aee1e
Support library instrumentations with HttpServerTest & HttpClientTest (#2299) 2021-02-16 09:05:23 -08:00
Lauri Tulmin e76d3b19d1
Fix ServletContextPath.prepend for app server spans (#2089)
* ServletContextPath.prepend doesn't work when server span is created from app server integration

* move ServletContextPath context creation to servlet-common, make servlet2&3 depend on servlet-common so that it would be used in tests that depend on servlet3

* fix failing test

* add servlet-common dependency to modules that depend on servlet3

* add servlet-common dependency to mojarra and myfaces

* run context path instrumentation after servlet instrumentation

* add servlet-common dependency to wicket

* move servlet context path handling

* enable jetty instrumentation for all handlers

* run springmvc tests with tomcat integration, fix peer port and peer ip reporting on tomcat

* jetty integration is now enabled for all handlers

* update expected span name

* Revert "jetty integration is now enabled for all handlers"

This reverts commit 82cbb663f5.

* Revert "update expected span name"

This reverts commit c034496fc5.

* Revert "enable jetty instrumentation for all handlers"

This reverts commit 8a3d077600.

* Trigger Build
2021-02-15 23:34:15 -08:00
Mateusz Rzeszutek 0adeb85f43
Refactor InMemoryExporter and move some of its methods … (#2264)
* Refactor InMemoryExporter and move some of its methods to spock base class & junit extension

* codenarc

* spotless

* Apply suggestions from code review

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

* fix armeria library tests

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-02-15 17:36:14 +01:00
Mateusz Rzeszutek a74f60b3f8
Add JUnit 5 extensions for instrumentation testing (#2241)
* Add JUnit 5 extensions for instrumentation testing

* Fix kafka tests

* RepeatedTest
2021-02-12 12:57:08 +01:00
Mateusz Rzeszutek 49206212cf
Refactor AgentTestRunner: extract a common interface, convert to Java class (#2223) 2021-02-09 09:21:05 -08:00
Anuraag Agrawal fc410706d0
Update to Sdk 0.16.0 (#2221)
* Update to 0.16.0-SNAPSHOT

* Finish

* Finish

* Update to 0.16.0

* Finish
2021-02-09 18:00:54 +09:00
Mateusz Rzeszutek e51692b3fd
Move setting test properties to instrumentation.gradle (from AgentTestRunner) (#2205)
I think that they might have been not noticed by the javaagent when set in the AgentTestRunner
2021-02-06 13:17:00 +09:00
Mateusz Rzeszutek facaf8e46f
Remove all remaining direct AgentTestRunner usages (#2196)
* Remove all remaining direct AgentTestRunner usages

* Fix jaxws compilation failure
2021-02-05 16:14:26 +01:00
Nikita Salnikov-Tarnovski e9a4b952dd
Add causality test with multiple concurrent requests (#2156)
* Add causality test with multiple concurrent requests

* Include support for Reactor Netty 1.0 into README.md

* Fix muzzle conf

* Fix muzzle and version constraints

* More strict causality check

* Better muzzle config

* Fixing muzzle

* Fixing deps

* Better library

* Better naming
2021-02-05 12:39:42 +02:00
Mateusz Rzeszutek 93b3a3b289
testing-common refactoring: replace direct AgentTestRunner usage with… (#2134)
* testing-common refactoring: replace direct AgentTestRunner usage with spock spec

* Updated instrumentation docs

* Fix reactor-core library tests

ReactorCoreTest was getting a tracer from GlobalOpenTelemetry before LibraryTestTrait had a change to initialize the SDK
2021-02-01 11:32:25 +01:00
Anuraag Agrawal 1ebb58a596
Update to SDK 0.15.0 (#2137)
* Update to SDK 0.15.0

* Fix lightstep test
2021-01-29 21:30:22 +09:00
Mateusz Rzeszutek 328c6832a2
Publish agent-for-testing and testing-common (#2133) 2021-01-29 08:39:30 +01:00
Lauri Tulmin 9825ab0afa
Instrument jsf action calls (#2018) 2021-01-19 21:34:41 -08:00
Mateusz Rzeszutek 660f0e5225
Remove testing-common dependency on guava (#2062)
* Remove testing-common dependency on guava

* Use nano time

* Add guava dep to opentelemetry-api-metrics
2021-01-19 12:07:27 +09:00
Anuraag Agrawal afdde0355b
Update to OTel 0.14.1 (#2059)
* Update SDK dependency to 0.14.1

* WIP

* Finish

* Cleanup
2021-01-18 13:02:04 +09:00
Lauri Tulmin 640a7d624b
Correct some spelling mistakes (#2025) 2021-01-12 11:10:45 -08:00
Lauri Tulmin 5f816c5d43
Enable servlet forward and include tests (#1968) 2021-01-06 11:01:47 -08:00
Trask Stalnaker f70a46483f
Fix testLatestDeps on new module (#1981) 2021-01-05 12:27:59 -08:00
Anuraag Agrawal 8d74baa2e4
Run tests with javaagent. (#1643)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-01-04 13:13:24 -08:00
Nikita Salnikov-Tarnovski 0888711574
Add support for Undertow server runtime (#1917)
* Add support for Undertow server runtime

* Polish

* Damn be classloaders

* Fix correct span name

* Polish
2020-12-22 14:13:50 +02:00
Pavol Loffay f69217e2a4
Add ComponentInstaller SPI and use it for OpenTelemetry SDK (#1848)
* Add component installer SPI

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Move more code to agent installer

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-12-18 08:55:24 +02:00
Mateusz Rzeszutek 8bd1298329
Fix muzzle log level in tests (#1930) 2020-12-17 23:00:46 +02:00
Anuraag Agrawal f0a6c6d772
Update SDK dependency to 0.13.0-SNAPSHOT. (#1924)
* Update SDK dependency to 0.13.0-SNAPSHOT.

* Update smoke tests

* Fix formatting

* Spot
2020-12-17 18:20:59 +09:00
Mateusz Rzeszutek cd58ac816e
Muzzle should add SPI classes defined in helperResourceNames as references (#1918) 2020-12-16 21:54:04 -08:00
Anuraag Agrawal 3b8827b8ab
Update to SDK 0.12.0 (#1830)
* Update to SDK 0.12.0

* Update error message to the current world.

* Bump referenced smoke test versions

* fixes

* dependency hell

* Suppress unused call

* Bump missed smoke tests

* Bump image, bump smoke tests gRPC version
2020-12-07 17:16:47 +09:00
Trask Stalnaker a2770c311e
Don't use ConfigUtils outside of AgentTestRunner tests (#1796)
* NetPeerUtilsTest

* RedisCommandNormalizerTest

* InstrumentationModuleTest

* HttpClientTracerTest

* Normalize test config properties

* Create ConfigBuilder in instrumentation-api

* Keep config properties compatible with SDK
2020-12-01 16:52:08 -08:00
Trask Stalnaker ca76c80820
Hardcode expected values in tests (#1803)
* DEFAULT_SPAN_NAME

* TEMP_DESTINATION_NAME

* LoggingContextConstants

* Remove unnecessary dependencies

* Hardcode expected normalized queries in tests

* Spotless
2020-11-30 09:16:59 +02:00
Trask Stalnaker 0c8d7fe73f
Miscellaneous cleanup (#1805)
* Remove outdated doc

* Remove unnecessary dependencies

* Formatting

* Rename TRACER to tracer

* Move WrappedFuture to top-level class

* Add missing shadow config

* Use simpler type

* Use simpler base class
2020-11-29 21:05:53 -08:00
Trask Stalnaker a3d11c0262
Rename auto annotations to ext annotations (#1799) 2020-11-29 21:04:55 -08:00
Trask Stalnaker 26f254b10d
Create javaagent dirs for all instrumentations, part 2 (#1794) 2020-11-28 22:26:49 -08:00
Trask Stalnaker 41bd489a77
Format groovy files (#1793) 2020-11-28 21:22:14 -08:00
Trask Stalnaker b683c2ff05
Convert the last two decorators to tracers and delete BaseDecorator (#1785) 2020-11-28 10:50:41 -08:00
Mateusz Rzeszutek 9a64a628ea
Make instrumentations non final (#1752)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-26 11:22:25 -08:00
Mateusz Rzeszutek 90ecff512a
Muzzle mismatch logs should be warnings in tests (#1754) 2020-11-26 11:21:17 -08:00
Trask Stalnaker 325238f128
Rename otel.trace.classes.excludes to otel.javaagent.exclude-classes (#1747)
* Rename otel.trace.classes.excludes

* Spotless
2020-11-25 16:53:49 +02:00
Mateusz Rzeszutek 50c8ab499d
Remove no longer needed helperClassNames() methods (#1755) 2020-11-24 20:50:32 -08:00
Mateusz Rzeszutek 13c405c174
Make muzzle generate helperClassNames() method (#1714) 2020-11-24 10:07:22 -08:00
Trask Stalnaker 3b480f5e50
Rename otel trace properties (#1740)
* Rename otel.trace.enabled

* Rename otel.trace.debug

* Rename otel.trace.config

* Rename otel.trace.runtime.context.field.injection

* Rename otel.instrumentations.enabled

* Document otel.javaagent.enabled
2020-11-23 14:53:18 -08:00
Trask Stalnaker d2f064dcd4
Add static keyword to make groovy inner classes nested (#1734)
* Add static keyword to make groovy inner classes nested

* Too much

* A bit less

* Spotless
2020-11-23 15:43:42 +02:00
Trask Stalnaker 79f76c78ad
Move java files to java source folder and groovy files to groovy source folder (#1735)
* Move java files to java source folder

* Move groovy files to groovy source folder

* Too much

* Move another one back

* Codenarc

* Move test resource to where test is

* Spotless
2020-11-23 15:42:04 +02:00
Anuraag Agrawal 7bfb6b6dbd
Update to SDK 0.11.0 (#1690) 2020-11-19 19:37:49 -08:00
Trask Stalnaker 0eede40d06
Improve consistency of struts with existing tests (#1665)
* Improve consistency of struts with existing tests

* spotless
2020-11-19 19:19:39 +02:00
Vladimir Šor 3dbab606c7
Autoinstrumentation for Struts2 actions (#1628)
* Struts PoC

* Instrument ActionInvocation to get correct timings. Refactor to use latest o11y SDK and API.

* Fix license header.

* Revert accidental Gradle configuration change.

* First passing test for struts instrumentation.

* Cleanup

* Convert Struts test to HttpServerTest.

* Fix Spotless formatting issues.

* Manage scope properly in Struts advice. Use existing handlerSpan method to assert struts handler span detection. Make Struts controller behave similarly with other HttpServerTest implementations.

* Rename method.

* Update server span name when path params are used.

* Struts PoC

* Instrument ActionInvocation to get correct timings. Refactor to use latest o11y SDK and API.

* Fix license header.

* Revert accidental Gradle configuration change.

* First passing test for struts instrumentation.

* Cleanup

* Convert Struts test to HttpServerTest.

* Fix Spotless formatting issues.

* Manage scope properly in Struts advice. Use existing handlerSpan method to assert struts handler span detection. Make Struts controller behave similarly with other HttpServerTest implementations.

* Rename method.

* Update server span name when path params are used.

* Account for GStrings in asserted values.

* Use Groovy friendly Assert.

* Giving up on getting to work user-friendly assertion messages. Moving controller to a package, as ognl inside struts can't handle classes with no packagaes.

* Make codeNarc happy.

* Make spotless happy.

* Rename struts-2 to struts-2.3. Move autoinstrumentation to javaagent sub-folder to accommodate for library.

* Use tracer() instead of TRACER and other minor tweaks.

* Nicer way for asserting values returned from a method call.

* Fix formatting.
2020-11-17 20:45:49 +02:00
Trask Stalnaker b35c0b28cc
Java 7 and CircleCI cleanup (#1654)
* Java 7 and CircleCI cleanup

* Bring back and increment version instead
2020-11-17 10:36:23 +02:00
Trask Stalnaker 6d5ec329d6
Enable checkstyle for google style guide (#1641) 2020-11-16 18:46:59 -08:00
Mateusz Rzeszutek 402a0a1639
Remove Instrumenter.Default (#1610) 2020-11-10 12:42:29 -08:00
Trask Stalnaker 71f91877ab
Fix muzzle and add missing helper classes (#1585)
* Fix muzzle

* Fix jdbc instrumentation

* Fix jms instrumentation

* Fix couchbase instrumentation

* Fix servlet instrumentation
2020-11-08 13:54:00 -08:00
Anuraag Agrawal 3d21c26632
Update to SDK 0.10.0 (#1564) 2020-11-05 13:17:47 -08:00
Anuraag Agrawal e1c7baab42
Upgrade to latest SDK snapshot (#1549) 2020-11-05 17:45:59 +09:00
Anuraag Agrawal d3b60a5e33
Rename TRACER to tracer() (#1540) 2020-11-02 20:49:51 -08:00
Anuraag Agrawal c6eee70660
Update to latest snapshot. (#1524) 2020-10-29 18:54:09 -07:00
Trask Stalnaker f046e598c6
Add context root to the front of the route in the span name (#1418)
* Add application root to span name

* Reduce duplicate context lookups

* Use servlet path as route

* Test against jetty instrumentation

* Add JAX-RS context path test

* Fix JAX-RS 1.0 span names
2020-10-27 14:21:10 -07:00
Anuraag Agrawal a2dccf2316
Update to latest SDK snapshot. (#1479) 2020-10-26 19:29:46 -07:00
Trask Stalnaker 7244dbf188
Remove unnecessary overrides (#1477) 2020-10-25 21:46:14 -07:00
Trask Stalnaker 3565775b00
Format groovy (#1475)
* Apply Intellij format to groovy

* spotless
2020-10-26 11:47:12 +09:00
Anuraag Agrawal f6ad05b8e3
Update to latest SDK snapshot (#1384)
* Update to latest SDK snapshot

* Use published snapshot

* Fixes

* Cleans

* spotless

* Most

* Clean

* Merge

* Temporarily remove context interop

* WIP

* Prepare for intercepting propagated span

* Bump SDK

* IDE updates

* Lots

* compileJava

* Done?

* bar

* Spot

* drugs

* Groovy--

* green for me

* Spot

* Remove grpc import

* Scrub
2020-10-25 15:14:32 +09:00
Nikita Salnikov-Tarnovski 17576bba35
Increase connection timeout for http client tests (#1467) 2020-10-23 21:16:29 +03:00
Trask Stalnaker 57301e3fe7
Rename "integration" to "instrumentation" (#1412)
* Rename integration to instrumentation

* Revert doc changes, need to wait for release

* spotless
2020-10-19 14:36:30 +09:00
Nikita Salnikov-Tarnovski 15e0b2ff32
Run build without warnings (#1387) 2020-10-15 16:10:22 -07:00
Mateusz Rzeszutek ee0e0a9697
Muzzle improvements: docs, javadocs, renamings and minor refactoring (#1379) 2020-10-14 16:49:51 -07:00
Trask Stalnaker 7ecc9bb37b
Rename "auto" to "javaagent" in modules (#1370) 2020-10-13 12:32:13 -07:00
Trask Stalnaker 1b51d4a6b1
Rename packages (#1367) 2020-10-11 13:54:35 -07:00
Mateusz Rzeszutek 409530629f
Refactor all tests that use Config so that they don't fail locally (#1310)
* Refactor all tests that use Config so that they don't fail locally

* Use ConfigUtils in tests for all config-related things

* Fix spotless and codenarc

* Fix spotless

* PR comments: remove unnecessary config
2020-10-08 20:01:31 +03:00
Ioannis Mavroukakis 9523f9ffe6
fix and/or ignore spotbugs errors (#1325) 2020-10-06 19:39:17 -07:00
Anuraag Agrawal 5bba5d8482
Update to latest snapshot (#1331)
* Update to latest snapshot

* Update to latest snapshot

* instrumentation-api

* spotless
2020-10-06 17:47:41 +09:00
Ioannis Mavroukakis f2de47a150
SpanAssert method names should reflect underlying Span method names (#1307) 2020-10-05 16:04:08 +09:00
Anuraag Agrawal dadaac9a8c
Use 2-line license header to match SDK repo (#1321)
* Use 2-line license header to match SDK repo

* Apply change
2020-10-05 14:29:56 +09:00
Anuraag Agrawal f2194a928c
Update to latest snapshot. (#1304) 2020-10-04 19:41:10 -07:00
Mateusz Rzeszutek c7fc26188d
Remove instrumentation (and tooling) specific properties from Config (#1286) 2020-09-30 11:27:06 -07:00
Anuraag Agrawal 210c669643
Remove AgentSpecification (#1291) 2020-09-30 17:34:29 +09:00
Nikita Salnikov-Tarnovski 7b1b399a29
Convert more decorators to tracers (#1275)
* More decorators to tracers

* Convert more decorators to tracers

* Fixes
2020-09-29 09:41:09 +03:00
Mateusz Rzeszutek 9e591bb01a
Refactoring Config into @AutoValue POJO (#1254) 2020-09-28 22:08:45 -07:00
Trask Stalnaker 8954f222c0
Update to the latest opentelemetry-java 0.9.0-SNAPSHOT (#1266) 2020-09-26 20:44:28 -07:00
Anuraag Agrawal fc47fd56e5
Add instrumentation of SQS. (#1210)
* Add instrumentation of SQS.

* More play

* Finish

* process instead of weird

* Cleanups

* Update instrumentation/aws-lambda-1.0/auto/src/main/java/io/opentelemetry/instrumentation/auto/awslambda/v1_0/AbstractAwsLambdaInstrumentation.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-24 11:53:46 +09:00
Mateusz Rzeszutek 3d030288d2
Muzzle should fail on unimplemented abstract methods (#1193)
* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Update javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/Reference.java

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

* Muzzle should fail on unimplemented abstract methods

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-23 07:38:58 +03:00
Nikita Salnikov-Tarnovski beb1901f5f
Review semantic convention for Http Client spans (#1214)
* Review semantic convention for Http Client spans

* Polish

* Update instrumentation/google-http-client-1.19/src/test/groovy/AbstractGoogleHttpClientTest.groovy

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-18 17:52:08 +03:00
Jakub Wach e8b54885c4
Enhance AWS DynamoDB instrumentation (#1191) 2020-09-18 10:48:56 +03:00
Anuraag Agrawal 9635a5e84f
Force flush after finishing lambda function. (#1204)
* Force span flush after lambda invocation.

* Force flush after finishing lambda function.

* bleh

* Better revert

* Accessor

* OpenTelemetrySdkAccess
2020-09-17 14:26:24 +09:00
Nikita Salnikov-Tarnovski 7e41b516ee
Review semantic convention for Http Server spans (#1207)
* Review semantic convention for Http Server spans

* Polish
2020-09-16 09:52:11 +03:00
Anuraag Agrawal 912a159c19
Update to latest SDK snapshot. (#1202) 2020-09-15 17:49:10 +09:00
Trask Stalnaker 221deb1f98
Fix test logging (#1194) 2020-09-13 21:13:11 -07:00
Jakub Wach 7080bdb9a4
spring mvc3 - proper span name in case of sec fail (#718) (#1122) 2020-09-09 10:08:28 +03:00
Mateusz Rzeszutek 70a06ef086
Fix a bug when FieldBackedProvider uses a map and value is set to null (#1177) 2020-09-09 14:10:17 +09:00
Anuraag Agrawal 5c86bcc20d
Update SDK dependency to released 0.8.0 (#1162)
* Update SDK dependency to released 0.8.0

* Update exporter

* Fix fake-backend proto reference
2020-09-03 17:09:51 +09:00
Tyler Benson e2aca0f378 Add muzzle reference detection for invokedynamic calls. (DataDog/dd-trace-java#1712) 2020-09-01 10:31:24 -07:00
Tyler Benson d7d46b2ef9 Add instrumentation for Guava ListenableFutures context propagation (DataDog/dd-trace-java#1665) 2020-09-01 10:31:23 -07:00
Mateusz Rzeszutek 2203a37771
Log current thread id and name as span attribute (#1093) 2020-08-27 10:12:51 -07:00
Nikita Salnikov-Tarnovski bc98955176
Update to latest otel-java snapshot (#1057)
* Update to latest otel-java snapshot

* Upgrade to working otel-java snapshot

* Update to latest otel-java snapshot

* Update to latest otel-java snapshot
2020-08-26 22:03:28 +03:00
Mateusz Rzeszutek 5fbc316cfc
Add missing RESTEasy (and Jersey) unit tests (#1058)
* Add missing RESTEasy (and Jersey) unit tests

* Standard HTTP server test (extending HttpServerTest)
* AsyncResponse tests
* Error handling in JAX-RS HTTP client
* HTTP client JDK proxies (this one is RESTEasy only)
2020-08-21 10:17:49 -07:00
Trask Stalnaker 7159d04b8d
Change groovy import order (#1013)
* Update docs

* Format all groovy code

* Organize imports
2020-08-15 23:19:27 -07:00
Trask Stalnaker 414213f2d1
Remove final from parameters (#1003) 2020-08-15 22:35:51 -07:00
Trask Stalnaker f893ca540b
Scripted package renaming (#988) 2020-08-15 21:55:01 -07:00
Helen Y bb235a0aa3
Update package name for tracers (#991) 2020-08-14 21:07:18 -07:00
Helen Y 888ebe17a2
Delete HttpClientDecorator (#967) 2020-08-14 13:10:56 -07:00
Trask Stalnaker f46ba88c29
Rename library-api artifact to instrumentation-api (#969) 2020-08-13 22:43:39 -07:00
Trask Stalnaker 72cfac20dc
Expand retry of HttpServerTest.setupSpec (#966) 2020-08-14 07:14:46 +03:00
Trask Stalnaker f940b2d2de
Use OpenTelemetry.getTracer() shortcut (#965) 2020-08-14 07:11:06 +03:00
Trask Stalnaker bf9c160570
Rename javaagent modules (#952) 2020-08-12 22:50:14 -07:00
Trask Stalnaker 1816eb9cbe
Rename annotations module to external-annotations (#951) 2020-08-12 22:49:50 -07:00
Anuraag Agrawal 0eafc28608
Run tests using JUnit5 platform and remove SpockRunner (#770)
* Run tests with JUnit platform

* Matcher

* Restore

* Don't mix JUnit4 with JUunit5 in spring tests

* Separate out tests that need custom class loader.

* Separate out test for a couple classes that need it, try to remove SpockRunner, but Grizzly?

* Remove SpockRunner

* Fix grizzly

* Remove assumeTrue workaround.

* Comments
2020-08-12 11:05:26 +09:00
Trask Stalnaker b5fbf90977
Extract instrumentation api module (#884) 2020-08-09 22:52:33 -07:00
Trask Stalnaker 2c786ab1a1
Fix WithSpan annotation instrumentation (#929) 2020-08-09 21:46:50 -07:00
Trask Stalnaker d85cce0f62
Remove annotation instrumentation vertx dependency (#917)
* Remove annotation instrumentation vertx dependency

* Remove annotation testing dependency
2020-08-08 20:36:27 -07:00
Nikita Salnikov-Tarnovski 46dfa263af
Remove HttpServerTestAdvice (#897)
* Remove HttpServerTestAdvice

* Trying to fix
2020-08-06 13:05:55 +03:00
Trask Stalnaker 4fd062c656
Add thread propagation debugger (#860) 2020-08-02 12:03:21 -07:00
Anuraag Agrawal ad3963303d
Merge integration tests back into test. (#871) 2020-08-02 15:41:47 +09:00
Anuraag Agrawal 87bf97da70
Generate bootstrap jar with gradle instead of when running tests. (#840)
* Generate bootstrap jar with gradle instead of when running tests.

* kill all semicolons

* docs

* docs

* ByteCodeTest

* Use latestDepTest classpath for its bootstrap jar

* Rename package

* Reformat comment

* Bootstrap jar absolute path

* Save bootstrap jar to reports dir.

* Debug

* Debug

* Use project.getBuildDir

* Restore

* Revert

* testFieldInjection is instrumentation test too.

* Split out bytecode tests for testing-common

* Apply jacoco configuration to all tests.

* Add note that jacoco may be causing frustration.

* YOLO alert - Hope my guess at the reason is correct

* Apply suggestions from code review

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-08-02 10:17:52 +09:00
Trask Stalnaker 5dc2ca350a
Update config property prefix from ota to otel (#841)
* Update config property prefix from ota to otel

* more

* format

* more
2020-07-31 08:29:29 +03:00
Frank Spitulski adab0efcd6
feat(tags): http (#827)
flavour, user agent, client ip
2020-07-29 23:57:12 -07:00
Giovanni Liva dcbfecd2c6
Add Database Typed Spans (#781) 2020-07-28 12:08:57 -07:00
Anuraag Agrawal f6594e1a67
Use Span.recordException for logging throwable (#813)
* Use Span.recordException

* Fix tests

* Cleanup

* Update instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy

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

* Spotless (IntelliJ acts weird with groovy files for me :()

* Update for merge

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-07-28 14:44:42 +09:00
Anuraag Agrawal c3299fac30
Add instrumentation for Armeria (server) (#756)
* Add instrumentation for Armeria (server)

* Spotless

* Use end timestamp too and fix auto test by not using ClassRule

* Reduce number of less useful lambdas and add reference to useful lambda.

* Cleanup

* README

* Move package to v1_0

* No storage
2020-07-27 15:54:07 +09:00
Anuraag Agrawal 688733ad43
Update OTel snapshot to 723 for recordException (#786)
* Update OTel snapshot to 723 for recordException

* Fix various servlet issues

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-07-27 14:32:05 +09:00
Nikita Salnikov-Tarnovski 91fde9a915
Update server span (#774)
* Change name on SERVER spans

* Change name on SERVER spans

* Fixes

* Fixes

* Update instrumentation/spring-webmvc-3.1/src/main/java/io/opentelemetry/auto/instrumentation/springwebmvc/DispatcherServletInstrumentation.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-07-24 07:46:50 +03:00
Lev Priima ad1941528c MDC ThreadLocal initValue should be modifiable for SLF4j's copy-on-write thread context map (DataDog/dd-trace-java#1645) 2020-07-23 13:34:12 -07:00
Nikita Salnikov-Tarnovski fcf4319aac
Faster tests (#725)
🎉
2020-07-22 10:10:34 -07:00
Frank Spitulski d6e39f89e6
feat(servlet): content length (#726) 2020-07-21 20:24:32 -07:00
Helen Y 86c438b154
Remove final from local variables (#732)
* Remove final from local variables
2020-07-20 13:53:34 +09:00
Anuraag Agrawal d8355c672d
Docs for writing new instrumentation... (#652)
* Docs for writing new instrumentation
2020-07-19 14:21:19 +09:00