Commit Graph

43 Commits

Author SHA1 Message Date
Mateusz Rzeszutek 7c760acea6
Move some classes out of `javaagent-instrumentation-api` (#5841)
* Move concurrent instrumentation utils out from javaagent-instrumentation-api

* Move AgentLogEmitterProvider, InstrumentedTaskClasses and OpenTelemetrySdkAccess out of javaagent-instrumentation-api
2022-04-15 12:09:28 -07:00
Lauri Tulmin b3496381f1
Write http server tests in java (#5501)
* Write http server tests in java

* typo

* Apply suggestions from code review

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

* add comments

* address review comments

* use Predicate

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-03-08 14:21:59 -08:00
Trask Stalnaker 53a8b85f4c
Updates to http.server_name (#5369)
* Updates to http.server_name

* Tests

* fix

* armeria

* fix

* fix

* codenarc
2022-02-18 09:38:21 -08:00
Trask Stalnaker 022914139e
test latest deps cleanup (#5269)
* test latest deps cleanup

* Revert currently irrelevant change

* Update instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts

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

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2022-02-01 09:49:07 -08:00
Mateusz Rzeszutek 9381d5a264
Expected server span name for null route should be HTTP GET (#5197) 2022-01-21 19:35:48 -08:00
Mateusz Rzeszutek 540e4cfafb
Remove HttpServerTest#extraAttributes() method (#5176)
* Remove HttpServerTest#extraAttributes() method

* fix ktor tests

* fix ratpack and restlet tests

* fix servlet2 tests

* Fix webflux and vertx tests
2022-01-20 10:41:41 -08:00
Anuraag Agrawal ec375116be
Fix more lint warnings (#5174)
* Fix more lint warnings

* Redisable lint

* Drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-20 12:48:46 +09:00
Mateusz Rzeszutek 872c6c7d80
Add `http.route` to the server span when `ServerSpanNaming` is updated (#5086)
* Add `http.route` to the server span when `ServerSpanNaming` is updated

* fix camel tests

* fix test compilation failure

* assert route in camel instrumentation
2022-01-14 13:52:06 -08:00
Mateusz Rzeszutek a65e9633ba
Refactor `ServerSpanNaming` (in preparation for `http.route`) (#4852)
* Refactor ServerSpanNaming (in preparation for http.route)

* fix tests

* Add ServerSpanNaming to all HTTP server instrumentations

* fix tests
2021-12-14 10:11:20 +01:00
Mateusz Rzeszutek 075434c5bc
Move `AppServerBridge` and `MappingResolver` to `servlet-common:bootstrap` (#4817)
* Move AppServerBridge and MappingResolver to servlet-common:bootstrap

* Introduce additional gradle configuration for bootstrap libs
2021-12-07 10:20:33 +01:00
Lauri Tulmin 61b0dd3698
Capture servlet request parameters (#4703)
* Capture servlet request parameters

* use concurrenthashmap for cache
2021-12-05 21:25:31 -08:00
Lauri Tulmin 73a28dadb4
Fail tests on muzzle failre (#4545) 2021-11-02 16:06:34 +02:00
Lauri Tulmin 9b8ab5eeec
Migrate to spock 2 (#4458)
* Migrate to spock 2

* Fix smoke test suites

* address review comments

* review comment

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-22 08:40:58 -07:00
Lauri Tulmin ef131acd6d
Enable http server concurrency test everywhere (#4465)
* Enable http server concurrency test everywhere

* remove testConcurrency method as test is now always enabled

* rebase
2021-10-22 08:39:30 -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
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
Lauri Tulmin 8e54d540bb
Convert liberty instrumentation to instrumenter api (#4205)
* Convert liberty instrumentation to instrumenter api

* review comment
2021-09-28 09:22:55 -07:00
Lauri Tulmin 559cdcbbee
Transform lambda classes (#4182)
* Transform lambda classes

* improve comment
2021-09-24 09:52:15 -07:00
Trask Stalnaker 8066f2787c
Add context customizer hook to Instrumenter API (#4167)
* Add context customizer hook to Instrumenter API

* Use in tomcat instrumentation

* Some of servlet

* Use in rest of servlet

* Feedback
2021-09-22 14:54: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
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 21b6492c17
Resolve TODOs in executor instrumentations (#3760) 2021-08-04 12:49:53 +02: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
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 d3b62de8a5
Replace most uses of TraceUtils with testRunner runWithSpan. (#3582) 2021-07-15 10:30:34 -07:00
Lauri Tulmin 5d6be8764e
Remove jetty-server exclude (#3453) 2021-07-01 09:12:26 +09:00
Mateusz Rzeszutek 15ed01d4fc
Change all instrumentation names to io.opentelemetry.{libName}-{libVersion} (#3411)
* Change all instrumentation names to io.opentelemetry.{libName}-{libVersion}

* minumum supported version
2021-06-30 15:34:36 +02:00
Anuraag Agrawal 761b9c280b
Migrate instrumentation gradle files to kotlin (#3414)
* Migrate instrumentation gradle files to kotlin

* Convert

* Muzzle
2021-06-28 17:27:12 +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
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
Trask Stalnaker 4c80c62ce7
Add unused to remaining advice classes (#3280)
* Add unused to remaining advice classes

* Add newlines for visual separation
2021-06-14 11:12:02 +09: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 c1c052318b
Move more type instrumentations to top-level classes (#3118) 2021-05-28 17:24:19 -07:00
Ago Allikmaa fd132d463d
Change Async Servlet span end logic to fix race condition on Undertow (#2992)
* Attach servlet async listener with asyncStart instrumentation

* Exclude Spring packages containing servlet request classes from global ignores

* Exclude Tapestry HSR proxy with global ignore

* Improve comments.

* Fix for Liberty - request response when adding async listener

* Removed unused methods

* Explicit response to async listeners on all servlet engines

* Attach response to request on Jetty

* Fix broken build due to rebase, improved a comment

* Address PR comments

* Added a comment.

* Addressed PR comments
2021-05-25 20:46:37 -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
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
Mateusz Rzeszutek 9c7fae3b04
Extract javaagent-extension-api from tooling & spi (#2879) 2021-05-06 23:30:25 -07:00
Trask Stalnaker 1824e36b96
Better server span name for Grails and Wicket (#2814) 2021-04-22 14:16:54 -07:00
Mateusz Rzeszutek 078603caf5
Generate InstrumentationModule#contextStore() with muzzle (#2775) 2021-04-13 20:05:01 -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