Commit Graph

84 Commits

Author SHA1 Message Date
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 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
Trask Stalnaker fa359a4a5d
Remove some testNotFound exclusions (#2813) 2021-04-19 15:44:58 -07:00
Trask Stalnaker bd829a6494
Remove duplicate status verification (#2710) 2021-04-19 11:41:37 -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
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
Mateusz Rzeszutek 72ffb3b7c5
Make BaseTracer fields private (#2492)
* Make BaseTracer fields private

By making `tracer` private we're forcing all tracer implementation to use the `spanBuilder()` utility method and pass the parent context manually.
2021-03-05 10:54:00 -08:00
Lauri Tulmin 29790d8472
Low cardinality name for servlet span (#2417) 2021-03-04 12:39:37 -08:00
Mateusz Rzeszutek 04d6fb67ff
Move SERVER and CLIENT span context keys out of BaseTracer (#2468)
* Move SERVER and CLIENT span context keys out of BaseTracer

Inspired by https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1726#issuecomment-731890267

* Rename context keys

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-03 16:12:42 +01:00
Trask Stalnaker 62f2611486
Update instrumentation names (#2433) 2021-03-01 19:34:25 -08:00
Mateusz Rzeszutek e87cf37f63
Remove some deprecated BaseTracer#end(Span) usages (part 1) (#2401) 2021-02-25 11:35:37 +01:00
Lauri Tulmin 1ca7276593
Remove HttpServerTest.testExceptionBody and redirectHasBody (#2346) 2021-02-19 15:57:11 +02:00
Lauri Tulmin 80f389c778
Instrument all jetty handlers (#2320) 2021-02-18 11:51:48 +02: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 ecf64c25f3
Remove BaseTracer#startScope() method (#2224)
* Remove BaseTracer#startScope() method

* fix compilation failure
2021-02-10 11:39:38 +01: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
Lauri Tulmin 4652ce183d
Replace remaining usages of deprecated SemanticAttributes class (#2101) 2021-01-22 12:05:54 +02:00
Vladimir Šor a2cde4132d
Smoke tests declare shadowJar as an input to be rebuilt (#2085)
* Smoke tests declare shadowJar as an input to be rebuilt. Fix some gradle deprecation warnings.

* Try files as inputs.
2021-01-20 16:30:45 +02: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
Pavol Loffay 077d8b64f6
Move common matchers to tooling/bytebuddy/matcher and ignore matchers to tooling/matcher (#1965) 2021-01-10 12:35:53 -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
Trask Stalnaker 84873ea687
Use more semantic attributes (#1905) 2020-12-15 12:45:38 +09:00
Trask Stalnaker 26f254b10d
Create javaagent dirs for all instrumentations, part 2 (#1794) 2020-11-28 22:26:49 -08:00
Trask Stalnaker 5f263644da
Create javaagent dirs for all instrumentations (#1668)
* Create javaagent dirs for all instrumentation

* Add note about kotlin coroutine library instrumentation

* Feedback
2020-11-28 21:04:16 -08:00
Mateusz Rzeszutek 50c8ab499d
Remove no longer needed helperClassNames() methods (#1755) 2020-11-24 20:50:32 -08:00
Mateusz Rzeszutek 45646ff367
Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization() (#1741)
* Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization()

* Removed no longer needed comments & improved JavaDoc

* Improve TypeInstrumentation Javadoc
2020-11-24 14:27:58 +02:00
Vladimir Šor a4e6d9322d
Fix dependencies for testLatestDeps to work. (#1683) 2020-11-19 10:59:22 -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
Trask Stalnaker cecdfc2cd0
Update instrumentation names to be consistent (#1671)
* Update instrumentation names to be consistent

* Remove amqp from rabbitmq package name
2020-11-18 19:53:31 -08: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