Commit Graph

35 Commits

Author SHA1 Message Date
Lauri Tulmin 16728e2445
Add a ClassAndMethod class to Instrumentation API (#4619)
* Add a ClassAndMethod class to Instrumentation API

* remove sentence

* Update docs/contributing/writing-instrumentation.md

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

* address review comment

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-11-10 13:33:11 -08:00
Nikita Salnikov-Tarnovski e7b8cca107
Convert TextMapSetters and TextMapGetters to enums (#4522)
* Convert TextMapSetters to enums

* Convert TextMapGetters to enums
2021-11-08 22:01:40 +02:00
Nikita Salnikov-Tarnovski e19d086d58
Migrate ResponseSendAdvice to Instrumenter (#4488)
* Migrate ResponseSendAdvice to Instrumenter

* Add shouldStart checks
2021-10-25 13:44:26 -07:00
Mateusz Rzeszutek 7473eff1e6
Extract HTTP request/response headers as span attributes (#4237)
* Extract HTTP request/response headers as span attributes

* fix muzzle

* code review comments

* fix compilation failure after merge conflict

* avoid using streams API when transforming the headers list

* fix liberty extractor

* fix spring webmvc extractor
2021-10-05 10:20:59 +02:00
Lauri Tulmin 3f1ec4d034
Delete unused servlet tracer code (#4243) 2021-09-30 14:09:44 +03: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
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
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
Mateusz Rzeszutek b9fcb6b498
Reduce CallDepth classes' API surface (#3497) 2021-07-06 09:24:19 +02: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
Anuraag Agrawal b7bfbf0cc6
Migrate instrumentation-library / common to plugins (#3320) 2021-06-15 11:54:48 -07:00
Trask Stalnaker 9f31a057b6
Refactor span names class (#3281)
* spanNameForMethod

* spanNameForClass

* Cache simple name using ClassValue
2021-06-14 11:56:40 -07: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 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 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
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 f413e5a3aa
Remove RequestDispatcherAdvice (#2942) 2021-05-12 21:37:48 -07:00
Nikita Salnikov-Tarnovski 83c7a40211
Fix potential test flakiness (#2943) 2021-05-09 17:04:44 -07:00
Mateusz Rzeszutek 9c7fae3b04
Extract javaagent-extension-api from tooling & spi (#2879) 2021-05-06 23:30:25 -07:00
Lauri Tulmin 357140c081
Server span naming for servlet filters (#2887)
* Server span naming for servlet filters

* wildfly default servlet has empty mappings

* jetty11 requires java11

* try a differnt way to disable jetty11 tests on java8

* Update instrumentation/servlet/servlet-5.0/javaagent/src/test/groovy/TomcatServlet5FilterMappingTest.groovy

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

* review fix

* rework to use InstrumentationContext

* remove debugging code

* move MappingResolver to avoid ClassCastException on wildfly

* Update instrumentation/servlet/servlet-3.0/javaagent/src/test/groovy/TomcatServlet3FilterMappingTest.groovy

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

* review fixes

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-05-06 13:25:17 +03:00
Trask Stalnaker 46c1212236
Remove forward and include spans (#2816) 2021-04-22 11:36:53 -07:00
Trask Stalnaker bd829a6494
Remove duplicate status verification (#2710) 2021-04-19 11:41:37 -07:00
Mateusz Rzeszutek 078603caf5
Generate InstrumentationModule#contextStore() with muzzle (#2775) 2021-04-13 20:05:01 -07:00
Trask Stalnaker 3bd46091bc
Clean up request dispatcher instrumentation (#2724) 2021-04-06 13:36:38 -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
Ago Allikmaa 69c2644774
Servlet 5 API, reorganize servlet modules (#2609)
* Servlet 5.0 API support, refactored other servlet modules

* Include correct servlet instrumentation module for grails tests

* Reapply spotless after rebase

* Fix checkstyle

* Spotless

* Addressed PR suggestions

* Fixed files in wrong package.

* Fixed mixed up instrumentation names.

* Fixed incomplete instrumentation name.

* Addressed PR suggestions

* Addressed PR suggestions
2021-03-23 14:11:43 +02:00