Commit Graph

345 Commits

Author SHA1 Message Date
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
Lauri Tulmin 79433966fb
Liberty server span handling (#1929)
* Liberty server span handling

* review fixes

* review fixes

* add doc about using compile stubs

* Update instrumentation/liberty/liberty/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/LibertyInstrumentationModule.java

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

* Update instrumentation/liberty/liberty/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/ThreadLocalContext.java

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

* add links to advice classes

* add commnet, remove unneeded dependency

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-12-22 15:00:58 +02: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
Bhautik Pipaliya a1945f27c0
end to end latency benchmark (#1935)
* end to end latency benchmark

* minor changes

* added final

* fix spotless check
2020-12-22 13:34:44 +09:00
Vladimir Šor 135ba344cb
Tomcat server handlers (#1902)
* Tomcat server handler with passing integration and smoke tests.

* Update server span name from the servlet integration instead of trying to mimic it from the server handler.

* Cleanup and more javadocs.

* Use Java8BytecodeBridge in advice code.

* Use Java8BytecodeBridge in advice code.

* Use earliest version for compilation and muzzling.

* Use consistent instrumentation name.

* Record throwables only if the context is managed by something else.

* Getting scope handling right. Moved server span renaming logic via AppServerBridge to the ServletHttpServerTracer.

* codenarc

* more PR comments addressed

* Pass Method to startServerSpan
2020-12-16 16:59:54 +02:00
Mateusz Rzeszutek f82e9107d6
Instrument spring-batch (#1843)
* Instrument spring-batch: job & step

* Instrument spring-batch: job & step - code review comments

* Instrument spring-batch: job & step - code review comments

* Instrument spring-batch: job & step - code review comments

* spotless

* Apply suggestions from code review

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

* Instrument spring-batch: job & step - code review comments

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-12-16 13:27:23 +02:00
Mateusz Rzeszutek a7cad4b36f
Propagate context in Spring SimpleAsyncTaskExecutor (#1897)
* Propagate context in Spring SimpleAsyncTaskExecutor

* Propagate context in Spring SimpleAsyncTaskExecutor: code review comments
2020-12-15 15:30:25 +01:00
jason plumb 4c8b8a77fb
Add exporter factory for JaegerThriftSpanExporter (#1868)
* add exporter factory for JaegerThriftSpanExporter

* add smoke test
2020-12-14 13:02:51 -08:00
Trask Stalnaker 8bcd5f1229
Simplify Apache HttpAsyncClient instrumentation (#1894)
* Simplify Apache HttpAsyncClient instrumentation

* Bump baseline version to 4.1

* Remove all the Intellij auto-formatting of README
2020-12-14 15:16:06 +09: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 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
Trask Stalnaker f2bb2f3e30
Split out methods and opentelemetry-annotations modules (#1787) 2020-11-28 12:25:09 -08:00
Anuraag Agrawal 31f1a73d59
Upgrade build plugin versions. (#1774) 2020-11-26 18:16:14 +09:00
Trask Stalnaker 889bce0976
Create jaxrs-client-2.0-common module (#1746) 2020-11-24 11:49:05 -08:00
Trask Stalnaker 0c5c4caaa4
Rename java-concurrent and java-classloader instrumentation modules (#1733)
* Rename java-concurrent instrumentation to executors

* Rename java-classloader to classloaders
2020-11-23 17:49:10 -08:00
Trask Stalnaker 5d0506e5e8
Convert rxjava-1.0 into library (#1732) 2020-11-23 14:51:55 -08:00
Trask Stalnaker 081e142718
Rename grizzly-client instrumentation (#1709)
* Rename grizzly-client instrumentation
2020-11-21 10:51:45 -08:00
John Watson e9821e9cd1
Directly port the java-runtime-metrics module over from otel-java. (#1720)
* Directly port the java-runtime-metrics module over from otel-java.

* java 8 cleanups

* Make consistent with oshi module

* Bump mockito and assertj versions

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-21 10:51:03 -08:00
Trask Stalnaker 238e2ddca5
Rename propagation modules (#1706)
* Rename propagation modules

* Fix test
2020-11-20 15:05:30 +02:00
Trask Stalnaker 55a6a858f7
Rename opentelemetry-api instrumentation module (#1707) 2020-11-20 15:01:53 +02:00
Anuraag Agrawal 7bfb6b6dbd
Update to SDK 0.11.0 (#1690) 2020-11-19 19:37:49 -08:00
Mateusz Rzeszutek 1a23ac3027
Standardize instrumentation names in InstrumentationModules (#1648)
* Standardize instrumentation names in InstrumentationModules

* rename gradle modules:
  * vertx-3.0 to vertx-web-3.0
  * spark-web-framework-2.3 to spark-2.3
* add JavaDoc describing the naming rules to InstrumentationModule
2020-11-17 13:30:28 -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
Nikita Salnikov-Tarnovski ab53f0ba9f
Remove default aws credentials lookup (#1659)
It leads to a lot of warnings on any developer machine without AWS credentials configured. And CI, where AWS credentials actually matter, uses explicit env variables anyway.
2020-11-17 16:29:33 +02:00
Trask Stalnaker 6d5ec329d6
Enable checkstyle for google style guide (#1641) 2020-11-16 18:46:59 -08:00
Nikita Salnikov-Tarnovski f0a4049b52
Add support for Reactor Netty's HttpClient (#1601)
* Add support for Reactor Netty's HttpClient

* Format

* Update instrumentation/reactor-netty-0.9/src/main/java/io/opentelemetry/javaagent/instrumentation/reactor_netty/ReactorHttpClientInstrumentation.java

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

* Convert to InstrumentationModule

* Cleanup

* Rename module

* Polish

* Format

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2020-11-16 12:07:51 +02:00
Anuraag Agrawal 9ac34bce67
Prepare a single test bootstrap jar at top level. (#1635)
* Prepare a single test bootstrap jar at top level.

* Apply suggestions from code review

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

* Add comment

* Use buildDir instead of build

* Testing SDK also in bootstrap

* Remove sdk from testing bootstrap loader

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-16 11:25:40 +09:00
Sergei Malafeev 70dcb93121
Activate SystemMetrics (#1530) 2020-11-05 13:02:01 -08:00
Jakub Wach 049358e81b
apache camel 2.20.x instrumentation (#1397)
* apache camel 2.20.x instrumentation

* removed instrumentation advice from helper classes

* code review #1

* code review #2 / experimental server name update

* code review changes / new tests, improved direct, new license header

* rebase changes

* code review changes

* code review changes, REST tests added

* changes after rebase to newest master

* code review changes

* code review

* code review

* rebase to master
2020-11-03 11:42:33 +02:00
Mateusz Rzeszutek 35dc9071ef
Log normalised full statement in Redis instrumentations (#1441)
* Log normalised full statement in Redis instrumentations (jedis, lettuce, redisson)
2020-10-27 14:29:47 -07:00
Sergei Malafeev d2813c838d
Add system metrics (#1309)
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-10-27 08:48:36 -07:00
Nikita Salnikov-Tarnovski d033ed594f
Review our usage of gradle cache (#1474)
* Experiments

* Experiments

* Experiments

* Update nightly.yaml

Trying to populate remote cache

* Experiments

* Better cache and snapshot publishing in GHA

* Read-only remote cache for PRs
2020-10-25 22:06:21 +02:00
Trask Stalnaker 7ecc9bb37b
Rename "auto" to "javaagent" in modules (#1370) 2020-10-13 12:32:13 -07:00
Pavol Loffay 3f5c644885
Add Prometheus metric exporter (#1262) 2020-10-09 12:06:51 -07:00
Anuraag Agrawal 525b3f729d
Split out gRPC library instrumentation. (#1329)
* Split out gRPC library instrumentation.

* Simpler status
2020-10-07 17:57:28 +09:00
Mateusz Rzeszutek d89ce818ef
Implement MDC auto-instrumentation for log4j2 (#1200)
* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2 2.7

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j1

* Implement MDC auto-instrumentation for log4j2
2020-09-18 17:53:43 +03:00
Mateusz Rzeszutek bc8224f88f
Implement MDC auto-instrumentation for log4j1 (#1211) 2020-09-17 12:07:12 +03:00
Anuraag Agrawal 01ec2ad6a7
Add initial baseline instrumentation for AWS lambda runtime. (#1192)
* Add initial baseline instrumentation for AWS lambda runtime.

* narc

* Cleanup

* docs

* Remove sentence which is redundant with every manual instrumentation we provide.
2020-09-14 12:57:51 +09:00
Mateusz Rzeszutek 9566315914
Support RESTeasy 4.0 version in unit tests (#1082)
* Support RESTeasy 4.0 version in unit tests

* Split jaxrs-2.0 into jaxrs-2.0-common and jaxrs-2.0-testing (similar to e.g. play)
* Support newest RESTEasy version in unit tests

* Apply suggestions from code review

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

* Support RESTeasy 4.0 version in unit tests - code review follow-up

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-11 07:21:16 +03:00
Anuraag Agrawal 266b8b927d
Split out artifact for javaagent SPI. (#1187)
* Split out artifact for javaagent SPI.

* Fix test - exporters are loaded by test and should not be on the classpath

* Fix
2020-09-11 07:09:04 +03:00
Sergei Malafeev f0eaa5f0fa
JDK 11 HttpClient instrumentation (#1121)
* JDK 11 HttpClient instrumentation

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* trace sync request

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of unnecessary gradle options

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* wip

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* end span when future completed

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove unneeded check

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of repeated test code

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of unneeded code

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* implement review comments

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* Update instrumentation/httpclient/src/main/java/io/opentelemetry/instrumentation/auto/httpclient/HttpClientInstrumentation.java

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

* Update instrumentation/httpclient/src/main/java/io/opentelemetry/instrumentation/auto/httpclient/HttpClientInstrumentation.java

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

* Update instrumentation/httpclient/src/test/groovy/JdkHttpClientTest.groovy

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

* rename to java-httpclient

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove unused

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* follow redirects

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-10 16:04:52 +09:00
dengliming 4959aa735f
Rename spring instrumentation modules (#1125) 2020-09-10 08:41:25 +09:00
John Bley 030e9fe107
Properly track causality of kotlin suspend functions (#1168)
* Initial work on kotlin suspend functions.

Introduce new instrumentation to capture kotlin suspended coroutines
and track/update Context appropriately.  Add high-concurrency test
showing the issue and that it is solved.

* spotlessApply

* Fix spelling of continuation.

* Fix kotlin style

* Add kotlin dependencies to muzzle

* Fix muzzle in another package that pulls in java-concurrent.

* Use runBlocking instead of a sleep to finish test

* Clarify and improve comments on how/why

* Move kotlin coroutines instrumentation to top-level instrumentation module

* Properly build muzzle check for kotlin-coroutines

* Merge kotlin-testing into regular src/test rather than separate module

* Clean up attach/detach logic

* Tighten bounds and skipVersions on kotlin muzzle

* Rename fields and clean up attach logic

* Clean up types/side-effect code

* spotlessApply

* Enhance muzzle testing to properly test latest kotlin.
Required updating a few kotlin-y things to latest version to properly resolve the jvm
variant of their new multiplatform stuff.
2020-09-09 14:11:00 +09:00
Anuraag Agrawal 7202d105ba
Auto instrumentation for logback event wrapping. (#1180) 2020-09-09 14:10:02 +09:00
Anuraag Agrawal d21db7b0a6
Add a logback appender that can be added to a config to export context IDs (#1165)
* Add a logback appender that exports IDs.

* Progress

* Finish

* NOTICE
2020-09-04 14:41:41 +09:00
Tyler Benson 9f4c1ae578 Separate out Scala ForkJoinPool instrumentation from java_concurrent (DataDog/dd-trace-java#1687) 2020-09-01 10:31:23 -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
dengliming 8415a908b5
Add support for redisson instrumentation (#1132) 2020-08-31 18:05:50 -07:00
Nikita Salnikov-Tarnovski c0cd7ca23b
Removing some gralde warnings (#1094) 2020-08-26 19:58:55 -07:00