Commit Graph

295 Commits

Author SHA1 Message Date
Ago Allikmaa fae88de680
Implement Apache DBCP2 datasource metrics (#6175)
* Apache DBCP2 datasource metrics

* Fix issues from PR

* Add readme for autoinstrumentation
2022-06-15 15:00:46 -07:00
dependabot[bot] cc30b5218b
Bump com.gradle.plugin-publish from 1.0.0-rc-2 to 1.0.0-rc-3 (#6167)
Bumps com.gradle.plugin-publish from 1.0.0-rc-2 to 1.0.0-rc-3.

---
updated-dependencies:
- dependency-name: com.gradle.plugin-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 19:38:01 -07:00
dependabot[bot] 52f6e24780
Bump com.gradle.enterprise from 3.10.1 to 3.10.2 (#6168)
Bumps com.gradle.enterprise from 3.10.1 to 3.10.2.

---
updated-dependencies:
- dependency-name: com.gradle.enterprise
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 19:37:38 -07:00
dependabot[bot] a9cc02a677
Bump com.gradle.common-custom-user-data-gradle-plugin from 1.7 to 1.7.2 (#6141)
Bumps com.gradle.common-custom-user-data-gradle-plugin from 1.7 to 1.7.2.

---
updated-dependencies:
- dependency-name: com.gradle.common-custom-user-data-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 08:54:09 +03:00
Lauri Tulmin cd2e11a9d6
Add instrumentation for JAX-RS 3.0 (#6136)
* Add instrumentation for JAX-RS 3.0

* set min java version to 11 for jax-rs 3.0

* exclude broken version

* fix muzzle range

* include correct api

* fix muzzle

* fix muzzle

* remove generics

* share test code
2022-06-03 12:49:14 +03:00
Lauri Tulmin 157ab7f754
Implement Oracle UCP connection pool metrics (#6099)
* Implement Oracle UCP connection pool metrics

* add additional instrumentation name

* change asserting no metrics reported after shutdown
2022-06-02 22:47:04 -07:00
jason plumb f1a746dca5
Add tomcat-jdbc connection pool metrics instrumentation (#6102)
* add tomcat-jdbc connection pool metrics instrumentation

* use duration

* code review comments

* remove unnecessary awaits

* udpate supported-libraries.md

* add comment about weakmap

* add sleeps for safety
2022-06-02 16:18:07 -07:00
jason plumb ee90c7c716
Change play instrumentation name to play-mvc and restructure dirs (#6106)
* restructure play instrumentation dirs

* change instrumentation name from play -> play-mvc

* Revert "change instrumentation name from play -> play-mvc"

This reverts commit 2174e0935f.

* spring-mvc names
2022-06-02 12:48:36 -07:00
Lauri Tulmin efd40f8cdf
Instrumentation for redisson 3.17.2 (#6096)
* Instrumentation for redisson 3.17.2

* cross test instrumentation

* split at 3.17.0, assert inverse

* Apply suggestions from code review

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-05-26 09:44:34 -07:00
Lauri Tulmin b95b64ba88
Implement Vibur DBCP connection pool metrics (#6092)
* Implement Vibur DBCP connection pool metrics

* Apply suggestions from code review

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

* address review comments

* don't check for metircs that aren't reported

* rework library test setup

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-05-26 11:26:02 +03:00
dependabot[bot] fb69a98efe
Bump com.gradle.common-custom-user-data-gradle-plugin from 1.6.5 to 1.7 (#6080)
Bumps com.gradle.common-custom-user-data-gradle-plugin from 1.6.5 to 1.7.

---
updated-dependencies:
- dependency-name: com.gradle.common-custom-user-data-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-05-24 12:43:51 +03:00
dependabot[bot] c10d8b2905
Bump com.gradle.enterprise from 3.10 to 3.10.1 (#6079)
Bumps com.gradle.enterprise from 3.10 to 3.10.1.

---
updated-dependencies:
- dependency-name: com.gradle.enterprise
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-05-24 10:42:55 +03:00
Trask Stalnaker a54631f00e
Centralize all plugin versions (#6064) 2022-05-18 20:22:24 -07:00
Trask Stalnaker 88ba8d3e6d
Rename jboss-logmanager module to jboss-logmanager-appender (#6045)
* Rename jboss-logmanager module

* Package names too
2022-05-17 14:18:57 -07:00
Anuraag Agrawal 528360db8c
Update dependencies (#6007)
* Update dependencies

* Add maven to plugin repos

* Fix tests that fail with groovy 4.0.2 (#42)

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-05-17 14:12:36 -07:00
dependabot[bot] 20aeb582a6
Bump com.gradle.plugin-publish from 1.0.0-rc-1 to 1.0.0-rc-2 (#6037)
Bumps com.gradle.plugin-publish from 1.0.0-rc-1 to 1.0.0-rc-2.

---
updated-dependencies:
- dependency-name: com.gradle.plugin-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 22:48:54 -07:00
Mateusz Rzeszutek dd5e30defd
Implement HikariCP library instrumentation (#6023) 2022-05-13 10:22:35 -07:00
Mateusz Rzeszutek 5bcab32379
Implement HikariCP connection pool metrics (#6003)
* Implement HikariCP connection pool metrics

* rebase after SDK update

* fix muzzle

* code review comments
2022-05-12 18:48:07 -07:00
Trask Stalnaker cfe4a22307
Remove netty-4.1-common (#5985)
* Remove netty-4.1-common

* reactor-netty-1.0
2022-05-06 11:51:02 -07:00
Mateusz Rzeszutek 2a7700351d
Implement vertx-kafka-client instrumentation; single record handler (#5973)
* Implement vertx-kafka-client instrumentation; single record

* add muzzle

* Update baseline to 3.6

* Set baseline to 3.6 everywhere

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-05-05 12:06:39 -07:00
Trask Stalnaker f2ed9bfbcc
Consolidate jboss-logmanager directories (#5983) 2022-05-05 08:54:48 -07:00
Trask Stalnaker 400bd5af3f
Update log4j package names (#5978) 2022-05-05 08:39:21 -07:00
dependabot[bot] e85dba4375
Bump com.gradle.enterprise from 3.9 to 3.10 (#5977)
Bumps com.gradle.enterprise from 3.9 to 3.10.

---
updated-dependencies:
- dependency-name: com.gradle.enterprise
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 13:18:28 -07:00
Trask Stalnaker d17a0d7d9a
Instrument SpanKey directly (#5933)
* Instrument SpanKey directly

* feedback

* Make muzzle work

* Revert unrelated change
2022-05-03 14:56:33 -07:00
Mateusz Rzeszutek d919f84cf8
Merge javaagent-instrumentation-api into javaagent-extension-api (#5936)
* Merge javaagent-instrumentation-api into javaagent-extension-api

* remove some leftover references to javaagent-instrumentation-api

* add missing instrumentation-api to distro example
2022-04-28 20:11:15 -07:00
Mateusz Rzeszutek 1345a6665e
Test spring-kafka instrumentation with receive telemetry disabled (#5913)
* Test spring-kafka instrumentation with receive telemetry disabled

* checkstyle and code review comment
2022-04-25 15:56:55 +02:00
Mateusz Rzeszutek 2bb7873f99
Add javaagent<->application context bridge for HttpRouteHolder (#5838)
* Add javaagent<->application context bridge for HttpRouteHolder

* remove comments

* fix broken http.route bridge

* spotless

* Move to a separate module
2022-04-22 08:29:54 -07:00
Mateusz Rzeszutek 4e3f19d469
Enable span suppression by SpanKey by default (#5779)
* Enable span suppression by SpanKey by default

* fix HTTP tests (probably)

* add exception for camel

* remove suppression tests from @WithSpan instrumentations

* remove suppression tests from @WithSpan instrumentation; spring boot autoconfigure

* fix twilio tests

* fix netty-based HTTP clients, remove AWS SDK 1.11 unit test

* fix elasticsearch tests

* codenarc

* spotless

* fix AWS SDK 1.11 tests

* remove a TODO

* code review comments

* fix merge conflict

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-04-19 14:13:09 -07:00
Mateusz Rzeszutek 1ab173755f
Delete deprecated micrometer library instrumentation (#5884) 2022-04-19 12:22:45 -07:00
Trask Stalnaker 85061691fe
Bump log4j version for library instrumentation to 2.17 (#5849)
* Bump log4j library version to 2.17

* muzzle
2022-04-19 12:11:10 -07:00
Will Li c7f6eab664
Add jboss-logmanager mdc support (#5842)
* add support for jboss-logmanager-mdc

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* update based on feedback

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* update

* check spanContext is valid
2022-04-19 12:10:40 -07:00
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
Anuraag Agrawal 784f4b6704
Integrate servlet smoke into main build (#5829)
* Integrate servlet smoke test into main build.

* errorprone

* Update updater
2022-04-14 17:01:58 +09:00
Anuraag Agrawal ed0b17df21
Integrate fake-backend project into main build. (#5828) 2022-04-14 15:33:10 +09:00
Anuraag Agrawal 1ca700525f
Integrate smoketests into the normal build (#5825)
* Integrate grpc, play, quarks, spring boot projects into main build.

* Apply spotless

* Apply spotless

* Fix spring-boot

* Fix quarkus

* README drift

* Update updater
2022-04-14 14:37:42 +09:00
Trask Stalnaker 7b6b31ff88
Extract instrumentation out of jaxrs-common module (#5788)
* Extract instrumentation out of jaxrs-common module

* dropwizard

* Move jaxrs annotation test too

Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-04-11 16:59:15 -07:00
Lauri Tulmin 91066a8073
Add library instrumentation for ktor 2 (#5797) 2022-04-11 13:05:00 +03:00
Anuraag Agrawal 496c6cfb0a
Fix WithSpan initialization ordering requirement for SpanAttribute and Flux (#5764)
* Add shared tests for async end strategy WithSpan

* WIP

* WIP

* Finally

* dump

* Oops

* namedOneOf
2022-04-08 20:01:39 +09:00
Anuraag Agrawal a48ecd0365
Upgrade Gradle and build dependencies (#5775) 2022-04-08 14:31:38 +09:00
Will Li 4815f1e7d1
Add support for jboss-logmanager (#5737)
* initialize the package

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* add jboss-logmanger 2.1 instrumentation

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* rename the test

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* clean comment

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Revert "Add JBoss java.util.logging support (#5498)"

This reverts commit 8b26cef666.

* Remove extra directory

* Remove old jboss log manager test

* Ensure no cross interference

* Change base version to 1.1

* fix styles

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* run spotless apply

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* fix codenarc

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* change the package version and additional module name

Signed-off-by: Cuichen Li <cuichli@cisco.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-04-04 14:23:31 -07:00
Mateusz Rzeszutek 5fb2261a82
Split out instrumentation-api-semconv (#5721)
* Split out instrumentation-api-semconv

* fix tests

* Moved LoggingContextConstants to semconv module too
2022-04-01 10:04:52 -07:00
Mateusz Rzeszutek f2587ba248
Apply micrometer instrumentation to spring-boot-actuator apps (#5666)
* Apply micrometer instrumentation to spring-boot-actuator apps

* fix a bug

* code review comments
2022-03-23 10:25:51 -07:00
Anuraag Agrawal 9f3ad23a9a
Migrate scala executor tests to Java (#5618) 2022-03-18 13:49:03 +09:00
Lauri Tulmin 2ebe912fe4
GraphQL java instrumentation (#5583)
* GraphQL Java Initial Commit

* [WIP] First steps for GraphQL instrumentation, totally not ready

[skip ci]

* GraphQL Java instrumentation

* address review comments

* Apply suggestions from code review

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

* review feedback

* scope handling

* Apply suggestions from code review

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

* use spotless:off

* trigger build

* review comments

Co-authored-by: Jordie <xd@jrdie.nl>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-03-17 08:55:45 -07:00
Anuraag Agrawal 487a01eb3e
Update Gradle and build dependencies (#5531) 2022-03-09 09:09:20 -08:00
Trask Stalnaker e67c9c4796
Fix jboss-logmanager testLatestDeps (#5503) 2022-03-04 21:01:38 -08:00
Trask Stalnaker ab9169cd25
Add Azure SDK instrumentation (#5467)
* Add Azure SDK instrumentation

* Add to supported libraries table

* Keep suppression for 1.19
2022-03-04 13:08:50 -08:00
Trask Stalnaker c06d70d174
Remove JAXRS HttpClient instrumentation (#5430) 2022-02-28 22:47:26 -08:00
Lauri Tulmin e6a8bdf697
Add peer service support back to couchbase26 (#5451)
* Add peer service support back to couchbase26

* extract common module

* move tests

* fix tests

* address review comments

* remove CouchbaseRequestInfoHolder
2022-02-28 10:00:27 -08:00
Anuraag Agrawal 791083eedf
Remove separate exporter configuration which we always have in distro… (#5331)
* Remove separate exporter configuration which we always have in distro now.

* Actually remove
2022-02-11 12:11:35 +09:00
Anuraag Agrawal f236b2d4c9
Split lambda instrumentation into core and events (#5326)
* Split out lambda core instrumentation

* More

* Remove request wrapper from core

* Split events

* Dedupe

* More

* More renames

* Finish

* Clean

* README

* Rename more

* Finish

* Fix README

* Fix README

* Fix

* Comments
2022-02-10 17:27:22 -08:00
Jérôme Prinet 0b60069e0b
Bump up Gradle plugin dependencies (#5148) 2022-02-07 17:30:17 +02:00
Trask Stalnaker 1077258263
Add InternalJavadoc custom error prone check (#5277)
* Add InternalJavadoc custom error prone check

* Add example usage

* Move to conventions

* Revert "Move to conventions"

This reverts commit d8a8209b59.

* Just get it working

* Clearer error message

* versions

* Apply almost everywhere

* feedback

* Always at the end of javadoc

* Fix test

* Missed (at least) one

* No longer internal

* Fix NPE

* Spotless

* Convert awslambda Java test to JUnit 5 so can reduce visibility

* Reduce visibility

* Rename the check

* More

* Move into errorprone-convention

* Fix UserExcludedClassesConfigurerTest
2022-02-01 17:54:57 -08:00
Mateusz Rzeszutek 3bbc41a6ce
Enable oshi ProcessMetrics in javaagent (and refactor oshi instrumentation) (#5281)
* Enable oshi ProcessMetrics in javaagent (and refactor oshi instrumentation)

* Get rid of double async instrument registration logs

* spotless
2022-02-01 09:57:48 +01:00
Lauri Tulmin 8240a5f66f
End jedis span when operation actually ends (#5256)
* End jedis span when operation actually ends

* address review comments
2022-01-31 20:20:44 -08:00
Trask Stalnaker c54a823bae
Rename vertx-reactive module (#5274) 2022-01-31 09:42:09 -08:00
Trask Stalnaker aa2ac33b70
Rename scala-executors module (#5273) 2022-01-29 13:27:16 -08:00
Samudraneel Dasgupta 3b0c49094d
Spring RMI instrumentation (#5033)
* Spring RMI instrumentation

* Change the order of import statements

* remove extra separation in import statements

* stylistic changes

* Fix groovy rule violations

* Formatting changes in groovy file

* Spotless fixes and muzzle check version change

* Fixed minimum version in filenames and fixed muzzle check

* single InstrumentationModule and added context propagation test

* Merged singletons, use random port in test and add stricter matchers.

* Remove unused import
2022-01-14 13:56:40 -08:00
Mateusz Rzeszutek 9299567a96
Micrometer library instrumentation (#5063) 2022-01-12 20:06:27 -08:00
Trask Stalnaker f7da97bd9d
Move appender api to internal (#5080)
* rename artifacts and packages

* Library users shouldn't need to use internal

* Update docs

* Rename in order to simplify HelperClassPredicate

* Spotless

* Move AgentLogEmitterProvider to javaagent-instrumentation-api
2022-01-12 08:38:28 -08:00
Anuraag Agrawal 5577afbf45
Update dependencies (#5083)
* Update dependencies

* Downgrade jackson for jax test
2022-01-12 17:21:13 +02:00
Nikita Salnikov-Tarnovski 25550e0a63
Stop using deprecated constructor (#5040)
* Stop using deprecated constructor

* Try to fix the build
2022-01-07 11:47:54 -08:00
Anuraag Agrawal e08ed9d448
Add library instrumentation for ktor. (#4983) 2022-01-04 20:14:31 -08:00
Lauri Tulmin 97f110405d
Instrumentation for rxjava3.1.1 (#4954)
* Instrumentation for rxjava3.1.1

* Move common test classes

* spotless

* move rxjava 3.1.1 classes to separate package
2022-01-04 14:15:35 -08:00
Trask Stalnaker 1a9b37525c
Add support for capturing logback mdc attributes (#4968)
* Add support for capturing logback mdc attributes

* Spotless
2022-01-03 10:32:49 -08:00
Mateusz Rzeszutek a022f0ce59
Micrometer bridge instrumentation (#4919)
* Micrometer bridge instrumentation

* gauges with the same name and different attributes

* weak ref gauge

* one more test

* disable by default + muzzle

* code review comments

* log one-time warning

* make AsyncInstrumentRegistry actually thread safe

* code review comments

* one more minor fix
2022-01-03 13:33:39 +01:00
Nikita Salnikov-Tarnovski 606f39c9c7
Remove deprecated module (#4976) 2022-01-03 12:17:40 +02:00
Anuraag Agrawal 83c94e9554
Update Gradle and build dependencies (#4971) 2021-12-23 16:01:39 +02:00
Trask Stalnaker 589ae4ccfa
Fix vertx modules (#4967) 2021-12-22 12:39:22 -08:00
Trask Stalnaker 6884d66c09
Reduce top level instrumentation directories (#4965)
* akka

* dropwizard

* kafka

* reactor

* vertx
2021-12-22 10:16:13 -08:00
Trask Stalnaker 88121c1583
Rename log4j-thread-context modules to log4j-context-data (#4957) 2021-12-21 11:40:03 -08:00
Trask Stalnaker 460c079619
Add ratpack top-level folder (#4951) 2021-12-21 10:17:45 +02:00
Trask Stalnaker 47aacd3318
Add java.util.logging javaagent instrumentation (#4941)
* java.util.logging

* Update instrumentation/java-util-logging/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jul/JavaUtilLoggingInstrumentationModule.java

* sync

* Update instrumentation/java-util-logging/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jul/JavaUtilLoggingHelper.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Remove unused code

* Simplification

* Remove JBoss logger instrumentation

* Spotless

* Unroll

* Remove unused dependency

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-20 12:36:30 -08:00
Trask Stalnaker 0302e9b921
Add log4j2 appender javaagent instrumentation (#4944)
* log4j2

* Spotless

* Target 2.16 for javaagent instrumentation and share

* review feedback

* Add comment

* Remove unnecessary configuration

* Fix comment
2021-12-20 12:28:29 -08:00
Trask Stalnaker b5df9bab83
Add log4j 1.2 appender javaagent instrumentation (#4943)
* log4j1

* review feedback

* final
2021-12-20 12:28:05 -08:00
Trask Stalnaker ea359e61fb
Add logback appender javaagent instrumentation (#4939)
* logback

* Use assertInverse

* sync

* sync

* Update instrumentation/logback/logback-appender-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/logback/appender/v1_0/LogbackHelper.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update instrumentation/logback/logback-appender-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/logback/appender/v1_0/LogbackHelper.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Unroll

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-20 12:27:54 -08:00
Trask Stalnaker 5d2cc7eed3
Rename (and move around) log4j instrumentation modules (#4937)
* Rename to log4j-thread-context

* Rename to log4j-mdc-1.2

* move

* update

* subdir
2021-12-19 19:58:37 -08:00
Trask Stalnaker cc9d2877c9
Add a logging appender API (#4917)
* Add logging appender api

* noop

* Add global

* drift

* Feedback

* compileOnly

* fix

* fix

* Rename instrumentation-appender-api to instrumentation-api-appender

* Rename package

* Optimization

* Split out instrumentation-sdk-appender

* Fix

* Update instrumentation-api-appender/src/main/java/io/opentelemetry/instrumentation/api/appender/LogEmitter.java

Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>

* Fix

* Fix

* Fix

* Fix sdk-appender package name

Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
2021-12-17 16:09:32 -08:00
Anuraag Agrawal 5e1e0c2642
Update to OTel 1.10 (#4866)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-12-16 18:46:17 +09:00
Trask Stalnaker 88f11d0525
Update log4j library base version (#4914)
* Update log4j-2.7 javaagent instrumentation to match up through 2.15.0

* Rename log4j 2.13.2 to 2.16

* Update one more location
2021-12-15 20:47:26 -08:00
Trask Stalnaker b01efec0fd
Split out log4j appender (#4907) 2021-12-15 10:02:40 -08:00
Mateusz Rzeszutek 0bab0c2aa3
Move `ServletContextPath` to `servlet-common:bootstrap` (#4824)
* Move ServletContextPath to servlet-common:bootstrap

* fix tests

* Simplify ServletContextPath calls in restlet instrumentation
2021-12-08 15:59:31 +01:00
Javier Salinas ebe4c6538c
Bump ratpack to 1.7 (#4796) 2021-12-07 07:27:03 -08: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
Anuraag Agrawal ca3919ea31
Update Gradle and build dependencies (#4808)
* Update Gradle and build dependencies

* Add spotless + Java 17 workaround

* Revert spotless for now

* Fix merge

* jvmTarget
2021-12-07 14:42:52 +09:00
Nikita Salnikov-Tarnovski b994497ec0
Add requested java and smoke test suite as build tags (#4811)
* Add requested java and smoke test suite as build tags

* spotless
2021-12-06 16:27:40 +02:00
Mateusz Rzeszutek 0dc410a2e3
Reorganize shared servlet code (intro to #4317) (#4785)
* Reorganize shared servlet code (intro to #4317)

* Fix dropwizard tests

* fix compile error
2021-12-06 13:49:55 +01:00
Nikita Salnikov-Tarnovski a70682c390
Remove unhelpful benchmarks (#4766)
* Remove unhelpful benchmarks

* Restore one more benchmark

* spotless
2021-12-02 17:17:39 +02:00
Trask Stalnaker a9980cd014
Rename autoconfigure modules (#4779) 2021-12-01 22:03:12 -08:00
Nikita Salnikov-Tarnovski 08e92a5374
Rework build scan configuration (#4763) 2021-12-01 09:27:45 -08:00
Lauri Tulmin f5142f24e9
Remove internal-proxy instrumentation (#4749) 2021-11-30 07:56:26 -08:00
Nikita Salnikov-Tarnovski 05e163e595
Allow using GE if locally authenticated (#4742) 2021-11-30 17:00:22 +02:00
Trask Stalnaker 9b49fc5ae8
Publish gradle scans from PRs (#4696) 2021-11-29 09:32:56 -08:00
Nikita Salnikov-Tarnovski 0aa888a014
Upgrade plugins versions (#4723) 2021-11-28 14:38:54 +02:00
Trask Stalnaker 195c1f733e
Remove nebula references (#4704) 2021-11-24 13:07:54 -08:00
Mateusz Rzeszutek 9a4a68d836
Add Android API-friendliness checks (#4505)
* Add Android API-friendliness checks

* Improve comments

* Remove ignores

* Handle CompletionException

* Spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-11-24 12:59:11 -08:00
Nikita Salnikov-Tarnovski 821a4b870b
Drop instrumentation-api-caching module and move weak cache implementation to instrumentation-api (#4667)
* Drop instrumentation-api-caching module and move weak cache implementation to instrumentation-api

* Some test fixes

* Some cleanup

* Temporary workaround for using weak values in FutureListenerWrappers

* Spotless

* Update ClassNames and SpanNames

* Compilation and comment

* Add bounded cache and clean interface

* Polish

* Add comment

* Vendor ConcurrentLinkedHashMap in

* Let errorprone ignore vendored CLHM for now

* Keep license in java files too

* Convert Netty wrapper cache to VirtualField

* Work around lambda instrumentation failure

Ideally we would ignore instrumenting helper classes...

* Revert "Work around lambda instrumentation failure"

This reverts commit 6d63815b44.

* Revert "Convert Netty wrapper cache to VirtualField"

This reverts commit dac1522a3f.

* Handle cleared weak values

* Fix comment

* Delete instrumentation-api-caching

* Copy in weak-lock-free

* Remove caffeine remnants

* Fix checkstyle

* Rename BoundedCache to MapBackedCached

* Remove duplicate LICENSE

* Remove outdated comment

* Sync with SDK copy of weaklockfree

* Enable checkstyle:off comment

* Re-generate license report

* Move NOTICE file to package-info.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-11-24 09:05:12 -08:00
Trask Stalnaker 336a73b0b3
Remove gradle scan publishing from CI (#4689)
* Remove gradle scan publishing from CI

* Remove doc too
2021-11-22 13:36:14 -08:00
Steven Aerts e01422736b
Automatic AWS library instrumentor (#4607)
Like AWS X-Ray, provide an instrumentor which automatically registers
opentelemetry instrumentation in the AWS SDK without any code changes.
Those instrumentors are separate libraries published as
opentelemetry-aws-sdk-1.11-instrumentor and opentelemetry-aws-sdk-2.2-instrumentor
2021-11-22 11:15:44 -08:00
Nikita Salnikov-Tarnovski 254a26745a
Start using Gradle Enterprise instance (#4663)
* Start using Gradle Enterprise instance

* Require opt-in to publish build scan from local machine

* Publish build scan only if authenticated

* Switch to GE cache
2021-11-21 18:53:55 +02:00
Mateusz Rzeszutek cd119f491d
Trace DNS resolution in reactor-netty (#4627)
* Trace DNS resolution in reactor-netty

* Code review comments

* removed a little too much

* implementation -> api

* revert and make muzzle happy
2021-11-16 08:34:27 +01:00
Anna Nosek 8b7c097912
Restlet 2.0 instrumentation (#4535)
* add restlet 2.0 instrumentation

* add restlet 2.0 instrumentation

* revies: testLibrary, create RestletInstrumenterFactory
2021-11-09 11:52:04 -08:00
Lauri Tulmin 609795184f
Jedis 4 instrumentation (#4555) 2021-11-01 17:54:53 -07:00
Lauri Tulmin c109773f17
Test modular jdk (#4501)
* Test modular jdk

* review comment
2021-10-28 10:54:00 -07:00
Trask Stalnaker 1b37df7afd
Move common testing modules to match convention a bit better(?) (#4451)
* Rename jsf modules to match convention

* Couchbase too

* Mongo too

* Play WS too

* Log4j too

* Elasticsearch too

* JAX-RS too

* JAX-WS sort of

* Spotless

* empty commit
2021-10-21 12:41:28 -07:00
Trask Stalnaker b1d638fc35
Move jaxrs bootstrap module (#4448) 2021-10-20 15:02:06 -07:00
Mateusz Rzeszutek 2e97a4d3d5
Netty: preserve caught exception in the context instead of calling end() (#4413) 2021-10-19 13:40:11 -07:00
Lauri Tulmin 0cfc71c3c6
Support kafka streams 3 (#4236)
* Support kafka streams 3

* make thread local wider so it would work on all kafka-streams versions

* Move classes used by multiple instrumentations into bootstrap module to ensure that everybody uses the same copy of them

* spotless

* allow project as muzzle extra dependency

* add comment

* fix merge
2021-10-05 09:43:00 -07:00
Aleš Justin ff0bf0a8f3
Add support for Kafka consumer and producer interceptors. (#4065)
* Add support for Kafka consumer and producer interceptors, move common Kafka code to library module.

* Apply feedback

* Apply feedback, #3.

* Apply feedback, #4.

* Add producer / consumer wrappers.

* Move to kafka-clients-2.6.

* Apply feedback #5.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-02 11:27:57 -07: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
Nikita Salnikov-Tarnovski f788d84e35
Remove muzzle from gradleplugins (#4183)
* Include gradle-plugins as a composite build

* Make gradle-plugins project independent from the main one

* Delete old ClassRef and friends

* Fixes

* Polish

* Polish

* Simplify
2021-09-24 15:59:03 +03:00
Lauri Tulmin 0f3d0cb05b
Generate our own sun.misc.Unsafe if it is not available (#4124)
* Generate our own sun.misc.Unsafe if it is not available

* skip generating invokeCleaner method

* grpc isn't shaded so setting system property doesn't affect only our bundled copy

* generate invokeCleaner when it is present in internal unsafe
2021-09-22 20:18:20 -07:00
Lauri Tulmin 8c8eb3ddea
Use caffeine3 on jdk11 and caffeine2 on older jdks (#4154)
* Use caffeine3 on jdk11 and caffein2 on older jdks

* ignore caffeine3 classes on java 8

* Update dependencyManagement/build.gradle.kts

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-21 14:04:09 -07:00
Mateusz Rzeszutek 12d60b05d7
Rewrite kafka-clients and kafka-streams tests to use testcontainers (#4178)
* Rewrite kafka-clients and kafka-streams tests to use testcontainers

* codenarc
2021-09-21 17:47:16 +02:00
Mateusz Rzeszutek 1c3ea2ec56
Convert elasticsearch-rest to Instrumenter API (#4153)
* Convert elasticsearch-rest to Instrumenter API

* Add net.transport attribute
2021-09-17 11:19:53 -07:00
Anna Nosek 473f16fa68
Restlet instrumentation (#3946)
* server instrumentation with first tests

* migrate to instrumenter API, move TracingFilter to library, rename module, other review refinements

* change name to 1.0 and rebase

* review, add ServerSpanNaming, create RestletTracing

* codenarc fix

* review

* fix TracingFilter behaviour on exception, inline HeadersAdapter's methods

* move instrumentation to doHandle, add StatusFilter in library test
2021-09-13 22:39:25 -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
Lauri Tulmin 436184002c
Bridge trace builder (#4090)
* Bridge tracer builder

* put api 1.4 bridging into separate moulde

* remove duplicate test

* remove testing dependencies

* use static import

* Update instrumentation/opentelemetry-api/opentelemetry-api-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/trace/ApplicationTracerProvider.java

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

* rename make -> create

* replace reflection with methodhandle

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-13 09:30:02 -07:00
Anuraag Agrawal 10bce56cd6
Add instrumentation for Quartz 2.0 (#4017)
* Add instrumentation for Quartz 2.0

* Fix drift in comment

* Fix fix

* Comment

* Cleanup
2021-08-31 18:05:36 +09:00
Mateusz Rzeszutek 4567bc0c2f
Instrument spring-kafka batch message listeners (#3922)
* Instrument spring-kafka batch message listeners

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java

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

* fix compilation failure

* Suppress nested CONSUMER spans

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-27 08:02:37 -07:00
Lauri Tulmin b5aec6a2e0
Bridge span keys defined in instrumentation api (#3911) 2021-08-25 20:25:37 -07:00
Lauri Tulmin 564f51c706
Hide our generated fields and methods from reflection (#3948) 2021-08-25 09:24:27 -07:00
Lauri Tulmin 38c8f8940c
Move helper class to spring package so that loadClass can find it (#3718)
* Move helper class to spring package so that loadClass can find it

* spotless

* Add tests

* Add comments

* remove unneeded dependency

* comments
2021-08-20 12:31:25 -07:00
Lauri Tulmin 514553eac2
Context propagation to elasticsearch-transport callbacks (#3861) 2021-08-19 12:59:47 +03:00
Lauri Tulmin 7a705d861e
Move SpringRestTemplateTest (#3870) 2021-08-19 12:58:24 +03:00
Mateusz Rzeszutek 88be2940eb
Extract common consumer-related kafka-clients parts to a new module (#3817) 2021-08-13 20:28:25 -07:00
Lauri Tulmin d9080a745b
Test latest version of kafka client and streams (#3803) 2021-08-11 17:12:44 +03:00
Anuraag Agrawal e92ecc02bc
Add library instrumentation for Ratpack server (#3749)
* Add Ratpack server library instrumentation

* Finish

* Back to 1.4

* Drift

* Cocaine

* Update instrumentation/ratpack-1.4/library/src/main/java/io/opentelemetry/instrumentation/ratpack/RatpackTracingBuilder.java

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

* Cleanup

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-08-04 16:21:36 +09:00
Lauri Tulmin 441609a0d4
Vertx http client 4 instrumentation (#3665)
* Vertx http client 4 instrumentation

* remove debugging

* rebase
2021-07-28 15:10:28 +03:00
Anuraag Agrawal 695cf0ad5f
Add library instrumentation for Apache HTTPClient 4.3 (#3623)
* Add apache httpclient 4.3 library instrumentation.

* Fixup

* Mostly done

* Finish

* Finish

* Update instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientRequest.java

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>

* Cleanup

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2021-07-28 12:18:45 +09:00
Trask Stalnaker 07250d3adc
Add JFR profile analyzer (#3678)
* Add JFR profile analyzer

* Spotless

* Nullable
2021-07-27 15:42:02 -07:00
Mateusz Rzeszutek ed9e1a0cb3
Move instrumentation specific classes out of javaagent-instrumentation-api (#3604) 2021-07-27 12:56:59 -07:00
Trask Stalnaker 59e46477dd
Add basic jmh overhead test (#3672)
* Add basic jmh overhead test

* Move javaagent arg to gradle file

* Rename module to benchmark-overhead-jmh

* Add imports

* Add comment

* Add benchmark for noop api
2021-07-26 12:55:18 -07:00
Lauri Tulmin 4f088c7e05
Test latest version of vert.x http server (#3621)
* Test latest version of vert.x http server

* add missing files

* spotless
2021-07-23 11:00:48 +03:00
Lauri Tulmin d7dcc70119
Rename jws-1.1 to jaxws-jws-api-1.1 (#3653) 2021-07-22 10:25:43 -07:00
Lauri Tulmin fc9609d814
couchbase 3.2.0 (#3645) 2021-07-21 16:46:31 +03:00
Lauri Tulmin 050e675abc
Split vertx instrumentation into client and server instrumentation (#3567) 2021-07-18 21:15:02 +03:00
HaloFour 814239c8c0
Adds binding of attributes in methods annotated with @WithSpan (#3188)
* Add binding of span attributes for traced methods

* Spring Aspect support, memoization

* Test with attribute name from ParameterNameDiscoverer

* Refactorings, javadocs and tests

* Refactor out creating AttributeBinding to separate class

* Wrapped attribute bindings for array parameters

* Attribute binding for List and EnumSet

* Attribute binding for subclass of List with reflection helper class

* Fix test failures in JDK 8

* Attribute binding to Set<? extends Enum>

* Move attribute binding to instrumentation-annotation-support project

* Fix copypastaed missing imports in tests

* Simplify ParameterizedClass based on PR feedback and add javadocs

* Remove blank javadoc

* Switch to cache with weak keys for memoizing attribute bindings by method

* Remove binding support for EnumSet<?>

* Clean up javadoc

* Use SpanAttribute annotation from opentelemetry 1.4.0-SNAPSHOT

* Address some PR concerns

* Clean up

* Fix instrumentation dependency in Springboot

* Update documentation

* Switch javaagent dep to compileOnly per PR comment

* spotless

* Kick CI

* Rename annotation support module and packages

* Resolve SpanAttribute annotation at runtime with fallback for older OTel versions

* Remove unnecessary dependency

* Move reflection helper to annotation support module

* Remove unnecessary enum and fields from unit test
2021-07-14 13:32:07 -07:00
Nikita Salnikov-Tarnovski cbfd7e1a02
Trying to extract codegen plugin (#3521)
* Muzzle code generation moved to a separate plugin
* Restored old MuzzleCodeGenerationPlugin to use until the new one is published
* The simplest dependency management possible

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-07-14 17:08:47 +03:00
Mateusz Rzeszutek c1b5c0884d
Move caffeine patching to instrumentation-api-caching (#3559) 2021-07-14 13:59:50 +02:00
Mateusz Rzeszutek 3d1e782fc5
Instrumentation-specific bootstrap classes (#3495)
* Instrumentation-specific bootstrap classes

* try to move bootstrap modules dependency to javaagent
2021-07-13 09:34:02 +02: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
Alexey Zhokhov ed02aff7b5
OpenTelemetry JDBC instrumentation library (#3367)
* Added jdbc library with ported version of OpenTracing JDBC Instrumentation.

* Gradle 7.1.

* Revert "Gradle 7.1."

This reverts commit e3df35b0

* Code style fixes.

* Code style fixes.

* Moved some JDBC utilities classes to the library module.

* javax.annotation.Nullable -> org.checkerframework.checker.nullness.qual.Nullable

* Build fix.

* Spotless fixes.

* Cache prepared statements.

* Cache connection info.

* Tracing for JDBC statement and prepared statement.

* Added some API dependencies.

* Fixed ending the span.

* Removed proxy usage.

* Cleanup.

* Implemented datasource with tracing support.

* Renamed Tracing prefix with OpenTelemetry.

* Renamed Tracing prefix with OpenTelemetry.

* Moved utilities classes to io.opentelemetry.instrumentation.jdbc.internal subpackage.

* Build fix.

* Build fix.

* Cleanup.

* Moved some shared classes to instrumentation-api module.

* Code review fixes.

* Make OpenTelemetryDriver final.

* Spotless fixes.

* Moved test classes from javaagent-unit-tests module to library module.

* Removed javaagent-unit-tests module.

* Covered OpenTelemetryDriver with tests.

* Cleanup.

* Covered OpenTelemetryDataSource with tests.

* Covered OpenTelemetryConnection with tests.

* Revert TestPreparedStatement.

* Added README.

* Build fix.

* Checkstyle fixes.

* Spotless fixes.

* Rename to build.gradle

* Fix build.gradle format.

* INSTANCE package scope.

* Documented OpenTelemetryDataSource usage.

* Renamed CheckedCallable to ThrowingSupplier.

* Update instrumentation/jdbc/library/README.md

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

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

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

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

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

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

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

* Update instrumentation/jdbc/library/README.md

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

* Update instrumentation/jdbc/library/README.md

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

* Update instrumentation/jdbc/library/README.md

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

* Removed javaagent-api module usage.

* Removed useless checking.

* Moved javaagent test classes to testing module.

* Move common JDBC test classes to testing module.

* Spotless fixes.

* Code format.

* Moved PeerServiceAttributesExtractor back to javaagent-api module.

* Rename JavaAgentJdbcSingletons to JdbcSingletons.

* Fixed JdbcSingletons import.

* Cleanup.

* Codenarc fixes.

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Parse InstrumentationVersion.VERSION.

* Store major and minor version in private static fields.

* Make the datasource way a preferred way.

* Removed interceptor mode.

* Rename build.gradle -> build.gradle.kts.

* Switch to Gradle Kotlin DSL.

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-07-01 10:35:07 -07:00
Anuraag Agrawal fc78cd0af3
Migrate build / settings to kotlin (#3468) 2021-07-01 16:23:27 +03:00