Commit Graph

2049 Commits

Author SHA1 Message Date
Mateusz Rzeszutek 47f2732aae
Split out DbClientAttributesGetter and SqlClientAttributesGetter (#5354)
* Split out DbClientAttributesGetter and SqlClientAttributesGetter

* code review comments
2022-03-04 09:58:04 -08:00
Trask Stalnaker 8b26cef666
Add JBoss java.util.logging support (#5498) 2022-03-04 09:27:52 -08:00
Trask Stalnaker b0e4be0e5f
Capture logback formatted message (#5497) 2022-03-04 13:10:55 +02:00
Trask Stalnaker 151b956e98
Test jaxrs-client-1.1 for duplicate nested spans (#5485) 2022-03-03 12:21:21 +02:00
Trask Stalnaker 4a8d6d552e
Add log4j 1.2 appender MDC capture (#5475)
* Add log4j 1.2 appender MDC capture

* Spotless
2022-03-02 09:56:01 -08:00
Trask Stalnaker 627f5d3e1c
Add experimental thread attributes for logs (#5474) 2022-03-02 09:06:08 -08:00
Trask Stalnaker 3ab1b8516f
Add markdown spell check (#5450)
* Add markdown link check

* Fix links

* update workflows

* move comment

* Add misspell check

* Fix misspellings

* Fix more misspellings

* Run against all files

* Spotless
2022-03-01 19:18:53 -08:00
Trask Stalnaker c06d70d174
Remove JAXRS HttpClient instrumentation (#5430) 2022-02-28 22:47:26 -08:00
Trask Stalnaker 8d18e463ea
Add markdown link check (#5449)
* Add markdown link check

* Fix links

* update workflows

* move comment
2022-02-28 11:30:16 -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
Trask Stalnaker e058fa7810
Fix aws-core testLatestDeps (#5458)
* Fix aws-core testLatestDeps

* ooops
2022-02-27 21:07:27 -08:00
Trask Stalnaker 0a6b87eb69
Remove server span peer name (#5404)
* Fix server -> client reference

* Remove server span peer name
2022-02-27 11:06:20 -08:00
Trask Stalnaker e89a9f2ea1
Use gradle cache for setup-muzzle-matrix job (#5448) 2022-02-25 09:28:33 -08:00
Trask Stalnaker 02a4fd41c2
Fix regression in spring-scheduling span name (#5436) 2022-02-24 12:27:43 -08:00
Lauri Tulmin 12e1134f57
Increase delay in attempt to fix flaky test in AbstractAws1ClientTest (#5441) 2022-02-24 08:38:16 -08:00
Lauri Tulmin 4d103263f7
Increase ready timeout for couchbase31 (#5442) 2022-02-24 08:37:07 -08:00
Armin Ruech 640e95df1c
Update Log4j appender example to follow the spec (#5443) 2022-02-24 08:32:01 -08:00
eugeniyk bf16564321
Set custom gRPC client/server span name extractor (#5244)
* Set custom gRPC client/server span name extractor

* Fix imports

* Fix compilation

* Fix style rule

* Update to use Functions instead

* Fix formatting
2022-02-24 13:59:00 +02:00
Lauri Tulmin 6d58704e76
Sort spans in Netty41ClientSslTest (#5433) 2022-02-24 13:02:40 +02:00
Lauri Tulmin 9fd34144e3
Wait before clearing metrics (#5434) 2022-02-24 13:02:24 +02:00
Anuraag Agrawal 9f00cf38d5
Migrate google-http-client tests to Java. (#5399) 2022-02-24 16:51:08 +09:00
Trask Stalnaker d7725d248b
Fix server -> client reference (#5396) 2022-02-19 11:49:00 -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 2f5e1f0703
Fix another reverse lookup (#5393)
* Fix another reverse lookup

* Update tests to verify NET_PEER_NAME is never captured for http server spans

* Revert "Update tests to verify NET_PEER_NAME is never captured for http server spans"

This reverts commit 44c9e91048.
2022-02-18 08:54:08 -08:00
Lauri Tulmin 8c6cd97cc7
Sort netty RESOLVE, CONNECT and SSL handshake spans (#5394) 2022-02-17 20:20:08 -08:00
Mateusz Rzeszutek 27ed47ccda
Split out CodeAttributesGetter (#5342) 2022-02-17 16:47:18 -08:00
Mateusz Rzeszutek 6774ce5791
Change the way Micrometer LongTaskTimer is bridged (#5338) 2022-02-17 16:46:23 -08:00
Lauri Tulmin cc60ffb6e0
Fix netty38 latest deps test (#5392) 2022-02-17 07:29:24 -08:00
Lauri Tulmin 9f98a0953a
Disable connection pooling in netty38 tests (#5384) 2022-02-17 11:02:43 +02:00
Lauri Tulmin 9b9fe6a8b3
Setting bean class name overwrites bean class (#5387) 2022-02-17 11:02:24 +02:00
Lauri Tulmin 40557768f6
Fix flaky jdk http client test (#5371) 2022-02-17 09:36:51 +02:00
Lauri Tulmin 53359f09ea
Use repository interface name in spring data operation name (#5352)
* Use repository interface name in spring data operation name

* Update instrumentation/spring/spring-data-1.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/data/SpringDataInstrumentationModule.java

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

* spotless

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-02-16 12:04:42 +02:00
Lauri Tulmin be0f07e3e4
Alter flaky redisson test (#5376) 2022-02-16 11:25:17 +02:00
Lauri Tulmin 3b81bc49e8
Remove oshi latest dep test restriction (#5383) 2022-02-15 11:11:02 -08:00
Lauri Tulmin 3fadca743e
Exclude broken oshi release (#5372)
* Exclude broken oshi release

* fix latest deps test
2022-02-14 13:25:45 -08:00
Lauri Tulmin fc5b0e9a02
Remove and ignore .attach_pid files (#5348) 2022-02-11 09:37:52 -08:00
Lauri Tulmin e9b9fcc4a7
Increase couchbase timeout (#5349) 2022-02-11 09:33:12 -08:00
Lauri Tulmin ec36dbf7bd
Add more sleep to weak gauge test (#5350) 2022-02-11 09:32:39 -08:00
Anuraag Agrawal 7e5fa5ee93
Add all AWS SDK api libraries referenced in testing to latestDepTest (#5280)
* Add all AWS SDK api libraries referenced in testing in latestDepTest

* Fix merge
2022-02-11 10:48:52 +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
Lauri Tulmin 51b88c7bce
Muzzle fails for elasticsearch 8 (#5343)
* Muzzle fails for elasticsearch 8

* Muzzle fails for elasticsearch 8
2022-02-10 13:48:41 -08:00
Lauri Tulmin c7f9715f34
Wait for kafka to start (#5341) 2022-02-10 09:55:49 -08:00
ralphgj e551d99db3
fix: add attributes of net.peer.* for grpc client span (#5324) 2022-02-10 09:54:43 -08:00
Lauri Tulmin afdeb1a557
Change rxjava version that is used in hystrix tests (#5335) 2022-02-10 08:58:32 -08:00
Mateusz Rzeszutek 956b5660de
Implement NamingConvention support in Micrometer bridge (#5328)
* Implement NamingConvention support in Micrometer bridge

* default naming convention
2022-02-09 17:48:13 -08:00
Mateusz Rzeszutek 2cf853dba3
Fix base time unit in Micrometer FunctionTimer (#5321) 2022-02-09 10:29:58 +01:00
Mateusz Rzeszutek edfd842185
Fix time units in Micrometer Timer max measurements (#5320) 2022-02-08 14:00:13 +01:00
Mateusz Rzeszutek 0b7f466724
Make it possible to configure base time unit used by the Micrometer bridge (#5304)
* Make it possible to configure base time unit used by the Micrometer bridge

* add readme
2022-02-08 10:39:02 +01:00
Mateusz Rzeszutek 551418c283
Refactor AttributesExtractor so that it extracts route from Context (#5288)
* Refactor AttributesExtractor so that it extracts route from Context

* typo

* fix tests

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

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

* fix all AttributesExtractors

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-02-08 10:38:41 +01:00
Mateusz Rzeszutek 99f8c8d1cd
Add max measurements to Micrometer Timer & DistributionSummary (#5303) 2022-02-08 08:17:28 +01:00
Anuraag Agrawal b9fac11c90
Migrate AWS Lambda tests to Java (#5315)
* Migrate AWS Lambda tests to Java

* Only assert OTLP fields for links
2022-02-08 15:27:20 +09:00
Trask Stalnaker 186c657b4e
Avoid potential for reverse name lookup (#5305) 2022-02-07 17:39:16 -08:00
Lauri Tulmin 1bdd88d10c
Propagate context into redisson async callback (#5313)
* Propagate context into redisson async callback

* Apply suggestions from code review

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-02-07 17:35:42 -08:00
Trask Stalnaker a0f3ad7279
Add code attributes to spring-scheduling spans (#5306) 2022-02-07 17:31:11 -08:00
Marc Pichler db20a5344f
Fix artifactID in log4j-context-data-2.16 documentation (#5310) 2022-02-04 08:56:58 -08:00
Trask Stalnaker 3d0ebce2ba
Fix triggering of DNS lookup (#5297)
* Fix triggering of DNS lookup

* Update test

* Update test
2022-02-03 08:39:52 -08:00
Nikita Salnikov-Tarnovski a3ce5d5e2a
Use "--add-opens" to allow test to run on java 16+ (#5290)
* Use "--add-opens" to allow test to run on java 16+

* Update instrumentation/executors/javaagent/build.gradle.kts

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

* Update instrumentation/executors/javaagent/build.gradle.kts

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-02-03 08:22:49 +02:00
Trask Stalnaker 6f38a42a97
Replace nameMatches with named (#5296) 2022-02-02 16:19:07 -08:00
Mateusz Rzeszutek 21f968abb4
Add missing return type matchers to the executor instrumentation (#5294) 2022-02-02 13:19:42 -08: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
Lauri Tulmin 3cb1efceb3
Remove struts2 latest dep restriction (#5289) 2022-02-01 09:52:23 -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 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
Lauri Tulmin fbf00761cc
Use VirtualField for associating netty listener with wrapper (#5282)
* Use VirtualField for associating netty listener with wrapper

* Move ignoring lambas for injected classes to LambdaTransformer
2022-01-31 14:45:12 -08:00
Trask Stalnaker c54a823bae
Rename vertx-reactive module (#5274) 2022-01-31 09:42:09 -08:00
Mateusz Rzeszutek 8b767ac435
Refactor HTTP attributes extractors to use composition over inheritance (#5267)
* Refactor HTTP attributes extractors to use composition over inheritance

* Rename remaining variables: *Extractor to *Getter
2022-01-31 09:25:27 -08:00
Mateusz Rzeszutek cf6f9b7631
Log a warning whenever GlobalOpenTelemetry.set() is called (#5264) 2022-01-31 09:24:01 -08:00
Trask Stalnaker 3bee90a69b
Use BatchSpanProcessor (#5275) 2022-01-31 09:14:03 -08:00
Trask Stalnaker aa2ac33b70
Rename scala-executors module (#5273) 2022-01-29 13:27:16 -08:00
Trask Stalnaker 23b33adb0a
Auto-format groovy files in Intellij (#5260)
* Auto-format groovy files in Intellij

* A bit of clean up
2022-01-28 09:29:46 -08:00
Lauri Tulmin 72afa5a8ed
Fix serialization fo quartz JobExecutionContext (#5263)
* Fix serialization fo quartz JobExecutionContext

* address review comments
2022-01-28 09:19:59 -08:00
Lauri Tulmin 014624e196
kotlinx-coroutines-reactor context propagation (#5196)
* kotlinx-coroutines-reactor context propagation

* extract context from reactor

* add generics

* muzzle

* actually use the context extracted from reactor

* test context propagation operator

* typo

* used named instead of namedOneOf

* instrument newCoroutineContext, remove reactor specific code

* revert changes
2022-01-28 09:16:47 -08:00
Trask Stalnaker 7df2b0e2df
Don't run testLatestDeps on alpha/beta/rc versions (#5258)
* Don't run testLatestDeps on alpha/beta/rc versions

* More logback
2022-01-28 08:21:53 -08:00
Mateusz Rzeszutek 16335a0c47
Use HttpRouteHolder in spring-webflux instrumentation (#5239) 2022-01-28 10:07:19 +01:00
Mateusz Rzeszutek 817b3d2671
Use HttpRouteHolder in spark instrumentation (#5241) 2022-01-27 12:38:59 +01:00
Mateusz Rzeszutek 9ff7b92841
Use HttpRouteHolder in camel instrumentation (#5242) 2022-01-27 12:38:42 +01:00
Mateusz Rzeszutek 6c855d9789
Use HttpRouteHolder in vertx-web instrumentation (#5240)
* Use HttpRouteHolder in vertx-web instrumentation

* Fix vertx-reactive tests
2022-01-27 12:38:01 +01:00
Trask Stalnaker 51e52427bb
Fix logback testLatestDeps (#5248) 2022-01-26 12:09:31 -08:00
Trask Stalnaker 477f7163f0
Some testLatestDeps cleanup (#5226) 2022-01-26 09:27:53 -08:00
Trask Stalnaker a5e0696af2
Improve log4j ContextDataProvider injection (#5216) 2022-01-26 09:26:49 -08:00
Trask Stalnaker 953fd106a7
Fix vertx-http-client testLatestDeps Xlint errors (#5228)
* Fix vertx-http-client testLatestDeps

* fix
2022-01-25 20:58:48 -08:00
Anuraag Agrawal d79c26f23d
Support AWS SDK v1 request object subclasses. (#5231) 2022-01-26 13:47:34 +09:00
Trask Stalnaker 87d26ae185
Fix testLatestDeps lint error (#5219) 2022-01-25 13:18:35 -08:00
Lauri Tulmin efc5dc720a
Fix vaadin14 latest dep test (#5214) 2022-01-25 09:49:29 -08:00
Mateusz Rzeszutek edc185b133
Rename ServerSpanNaming to HttpRouteHolder (#5211)
* Rename ServerSpanNaming to HttpRouteHolder

* HttpRouteBiGetter
2022-01-25 09:44:15 -08:00
Lauri Tulmin f2a2786759
Recover from duplicate class definition errors (#5185)
* Recover from duplicate class definition errors

* fix hotspot8

* Suppress dupicate class definiton errors only when helper classes were injected

* exit define class context when there is an exception, update pseudocode in comment
2022-01-25 09:37:37 -08:00
Mateusz Rzeszutek 064d923b84
Actually fix redisson instrumentation after 3.16.8 release (#5201)
* Actually fix redisson instrumentation after 3.16.8 release

* try MethodHandles

* remove unneeded virtual fields
2022-01-24 15:51:56 -08:00
Anuraag Agrawal e04f52b9db
Enable java lint (#5182)
* Enable java lint

* Compile internal-lambda-java9 withot using --release flag (#34)

* Fix some custom testsets

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-01-24 12:45:42 +09:00
Lauri Tulmin c1280a9ee3
Limit latest dep version in aws sdk library-autoconfigure module (#5205) 2022-01-22 10:19:02 -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
jason plumb fe8a132ee9
Factor out NetServerAttributesGetter (#5194)
* factor out NetServerAttributesGetter and favor composition over inheritance.

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

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

* errorprone and spotless

* spotless

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-01-21 17:01:30 -08:00
Trask Stalnaker 23fb0bd73b
Limit aws-sdk version for latest dep tests (#5202) 2022-01-21 15:19:09 -08:00
Lauri Tulmin 26aee0411d
Limit spring boot version in grails latest dep tests (#5199) 2022-01-21 09:33:46 -08:00
Mateusz Rzeszutek 3c8a192d1d
Limit redisson version to 3.16.7 (#5198)
* Limit redisson version to 3.16.8

* latestDepTestLibrary
2022-01-21 15:45:17 +02:00
Matthew Ho 66bf050bf8
Akka http server span names are always akka.request #3478 (#5150)
* Akka http server span names are always akka.request #3478
 - removed hardcoded span name "akka.request"
 - implemented route() in AkkaHttpServerAttributesExtractor to provide a better span name
 - retrofitted AkkaHttpServerInstrumentationTest.groovy

* Akka http server span names are always akka.request #3478
 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}"
 - retrofitted AkkaHttpServerInstrumentationTest.groovy

* Akka http server span names are always akka.request #3478
 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}"
 - retrofitted AkkaHttpServerInstrumentationTest.groovy

* Akka http server span names are always akka.request #3478
 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}"
 - retrofitted AkkaHttpServerInstrumentationTest.groovy and related tests
2022-01-20 14:11:33 -08:00
jack-berg 48f8031baa
Fix log4j appender docs (#5192) 2022-01-20 14:08:41 -08:00
Lauri Tulmin dadf1e4d71
Move reactor context propagation operator instrumentation to separate instrumentation module (#5188) 2022-01-20 11:00:48 -08:00
jason plumb c5c0a2bcdf
NetClientAttributesAdapter - favor composition over inheritance (#5030)
* first pass at separating NetAttributesAdapter interface and make NetClientAttributesExtractor concrete

* rename the implementations extractor -> adapter

* hide constructor and make factory method

* rename to client and add javadoc

* spotless

* finish javadoc thought

* rebase

* renamed NetClientAttributesAdapter to NetClientAttributesGetter

* fix lettuce

* code review comments

* code review comments -- renaming for consistency

* adapter -> getter

* fix ratpack

* adapter -> getter
2022-01-20 10:51:13 -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
Trask Stalnaker d8a392210a
Remove unnecessary destroyMethod (#5179) 2022-01-20 11:39:34 +02:00
Anuraag Agrawal e6e2190f68
Fix most lint warnings. (#5180)
* Fix most lint warnings.

* Fix test
2022-01-20 18:28:45 +09:00
Christian Frommeyer d017d5f18a
SdkTracerProvider auto closed as separate Context Bean (#5124) (#5125) 2022-01-19 20:48:49 -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
Anuraag Agrawal 52394a2ff9
Remove deprecated tracer API (#5175)
* Remove deprecated tracer API

* Groovy too
2022-01-19 09:52:51 -08:00
Amir Blum e28235ffd6
fix(aws-sdk): use RPC attributes from spec (#5166)
* style: rename AwsSdkAttributes to AwsSdkHttpAttributes

* feat(aws-sdk-1.11): use rpc attributes from spec

* feat(aws-sdk-2.2): use rpc attributes from spec

* fix: update apache-camel test with aws-sdk rpc attributes

* chore: lint fix

* Update instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkRpcAttributesExtractor.java

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

* Update instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRpcAttributesExtractor.java

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-01-19 09:51:20 -08:00
Mateusz Rzeszutek 1ecf493332
Fix flaky micrometer retries in javaagent test (#5168)
* Fix flaky micrometer retries in javaagent test

* remove comment

* add clarifying comment
2022-01-19 18:43:50 +09:00
Lauri Tulmin f6c520a062
Hopefully fix flaky spring-rmi test (#5172) 2022-01-19 11:28:24 +02:00
Mateusz Rzeszutek 4f29770f73
Remove old TraceUtils and use InstrumentationTestRunner#run*Span() (almost) everywhere (#5160)
* Remove old TraceUtils and use InstrumentationTestRunner#run*Span() (almost) everywhere

* Fix HTTP server tests

* Fix compilation failure

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-18 13:42:53 -08:00
Anuraag Agrawal bdd82a899e
Parameterize VirtualField field type (#5165)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-18 13:42:44 -08:00
Javier Salinas 95e240c3e1
Ratpack httpclient (#4787)
* Add Ratpack HttpClient instrumentation

* Propagate trace through Ratpack HttpClient

* Add test to verify trace propagation

* Fix spotlessApply

* Use HTTP method as name for ratpack http client

* Add current Context to the execution

* Fix HttpClient tests

* Move Ratpack HttpClient tests to java package

* Remove nullaway conventions from library

* Add Context to ExecHarness executions

* Remove ContextHolder from execution

* Fix function test using other server stub

* Fix lazy other app

* Refactor ratpack client packages

* Rename getter method
2022-01-18 12:06:13 -08:00
Mateusz Rzeszutek 69fc3df19a
Try to make Spring RMI tests less flaky (hopefully) (#5164) 2022-01-18 10:58:45 -08:00
Mateusz Rzeszutek 816d322cbf
Fix flaky micrometer tests (#5171) 2022-01-18 10:54:41 -08:00
Mateusz Rzeszutek cee51bcf7e
Fix micrometer flaky test (#5157)
* Fix micrometer flaky test

* spotless
2022-01-17 10:35:15 -08:00
Anuraag Agrawal b7a95857c7
Fix some java lint warnings (#5120)
* Convert InstrumentationTestRunner from interface to abstract class

* Foo

* Commit

* Revert unintended
2022-01-17 10:26:03 -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
acm19 a8069370ad
Fix serialisation exception on default lambda events (#4724)
Adds `FAIL_ON_UNKNOWN_PROPERTIES` to the paramter parser on the lambda
as events coming from AWS have more fields than those represented in the
libraries provided by AWS. Adds a custom `JodaModule` to the same
parser to support `ScheduledEvent` which for now uses Joda Time. At the
same time avoid the real Joda Module to not have extra dependencies.

Resolves: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/4645
2022-01-14 13:54:50 -08: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 262a8734ca
One more micrometer AsyncInstrumentRegistry fix (#5118) 2022-01-14 10:00:49 -08:00
Mateusz Rzeszutek 9583ca6246
Fix resteasy muzzle (#5121) 2022-01-14 11:53:48 +01:00
Mateusz Rzeszutek 6eeb6ccfd0
Fix flaky micrometer tests (#5106)
* Fix flaky micrometer tests

* Add comment
2022-01-13 11:47:37 -08:00
jason plumb 963b5cc087
Connect AgentLogEmitterProvider global during OpenTelemetryInstaller (#5088)
* during install, hook up the log emitter provider for instrumentation to use.

* spotless

* Fix tests

* Default instrumentation name to ROOT when logger name null/empty

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-13 08:31:02 -08:00
Mateusz Rzeszutek 9299567a96
Micrometer library instrumentation (#5063) 2022-01-12 20:06:27 -08:00
Lauri Tulmin 0624b6561e
Add debug logging to SpringTemplateJms1Test (#5087) 2022-01-12 16:13:32 -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
Lauri Tulmin f60f7e2cc1
Attempt to fix flaky micrometer test (#5085) 2022-01-12 17:29:54 +02:00
Mateusz Rzeszutek 8324b51c04
Micrometer instrumentation, part 3 (#5017)
* Micrometer instrumentation, part 3

* fix compilation

* add comment

* code review comments
2022-01-12 16:25:49 +01:00
Lauri Tulmin 0eb3156420
Increase timeout for redisson test (#5084) 2022-01-12 17:25:19 +02:00
Anuraag Agrawal 5577afbf45
Update dependencies (#5083)
* Update dependencies

* Downgrade jackson for jax test
2022-01-12 17:21:13 +02:00
Trask Stalnaker 39d20b5fbc
Fix lettuce testLatestDeps (#5079) 2022-01-11 14:16:19 -08:00
Trask Stalnaker 61cc276264
Remove unnecessary verification (#5057) 2022-01-11 11:37:43 -08:00
Mateusz Rzeszutek 929b6808dd
End redisson span when the operation actually ends (#5073) 2022-01-11 09:41:06 -08:00
Trask Stalnaker db8cd050a7
Add spotless to standalone subprojects (#5058)
* Update spotless version

* Add spotless to benchmark-overhead

* Add spotless to smoke-test images

* Add spotless to examples

* Apply spotless

* Resolve log4j conflict

* Apply spotless after upgrade
2022-01-10 12:46:52 -08:00
Lauri Tulmin c6fe6b8252
Fix flaky log4j appender test (#5062) 2022-01-10 09:16:15 -08:00
Mateusz Rzeszutek 6d221e160a
Micrometer instrumentation, part 2 (#5001)
* Micrometer instrumentation, part 2

* use double counter instead of gauge in FunctionTimer

* code review suggestions

* fix errorprone

* rebase and fix compilation failure
2022-01-10 13:22:32 +01:00
Nikita Salnikov-Tarnovski 1a9c633b4b
Rename some packages, move some classes (#5043)
* Rename some packages, move some classes
2022-01-09 13:26:51 +02:00
Lauri Tulmin dcbc2b3866
Retry elasticsearch startup (#5044) 2022-01-08 14:01:54 +02:00
Nikita Salnikov-Tarnovski 3144859396
Stop using deprecated NetPeerAttributes outside of the deprecated package (#5024) 2022-01-08 14:01:09 +02:00
Anuraag Agrawal c75c01f871
Update to OTel 1.10 (#5035)
* Update to OTel 1.10

* Fix metric smoke test

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-07 15:45:20 -08:00
Nikita Salnikov-Tarnovski daeda5dcfc
Don't extract deprecated cassandra keyspace attribute (#5041) 2022-01-07 15:19:59 -08: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
Lauri Tulmin d5bd3cb91b
Fix NPE in rmi server instrumentation (#5042) 2022-01-07 11:47:23 -08:00
Trask Stalnaker 0c5812951f
Remove another unused gradle file (#5028) 2022-01-06 22:54:02 -08:00
Anuraag Agrawal f6bcd76219
Update errorprone (#5016)
* Update errorprone

* gwt

* Remove unnecessary final

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-06 14:21:56 -08:00
Lauri Tulmin 55e44d790c
ktor net attribute extraction (#5027)
* ktor net attribute extraction

* spotless
2022-01-06 12:03:59 -08:00
Lauri Tulmin 12c15b226f
Capture servlet request parameters at the end of the request (#5019)
* Capture servlet request parameters at the end of the request

* add comment
2022-01-06 12:02:42 -08:00
Trask Stalnaker 07ce0b5909
Support log4j map messages (#4966)
* Support log4j map messages

* Cache attribute keys

* Review

* Add tests

* Fix test

* Codenarc

* Better tests

* Remove sysout
2022-01-06 12:02:12 -08:00
Lauri Tulmin acaa5e687a
Remove grails lates dep restriction (#5025) 2022-01-06 08:56:41 -08:00
Lauri Tulmin c45b4ea5be
Fix redefinition failure on openj9 (#5009)
* Fix redefinition failure on openj9

* isntead of remembering the list of interfaces the class has remember whether it has any of the virutal field marker interfaces

* address review comment

* ensure virtual field detection works when internal-reflection instrumentation is disabled
2022-01-06 08:54:32 -08:00
Trask Stalnaker 9d68a9f004
Remove unused file (#5020) 2022-01-06 09:31:59 +02:00
Lauri Tulmin 175d1bfdcb
Create producer span from spring integration instrumentation (#4932)
* Add an option to create producer span from spring integration instrumentation

* Update instrumentation/spring/spring-integration-4.1/library/src/main/java/io/opentelemetry/instrumentation/spring/integration/TracingChannelInterceptor.java

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

* add null check

* add doc

* Update instrumentation/spring/README.md

Co-authored-by: Fabrizio Ferri-Benedetti <fferribenedetti@splunk.com>

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Fabrizio Ferri-Benedetti <fferribenedetti@splunk.com>
2022-01-05 13:00:22 -08:00
Trask Stalnaker 55eb157645
Fix ktor testLatestDeps (#5014) 2022-01-04 21:51:24 -08:00
Trask Stalnaker 1d453debe3
Update log4j instrumentation docs (#4915)
* Update log4j instrumentation docs for 1.10.0 release

* More log4j doc changes for 0.10.0

* Updates for #4937

* Fix log4j documentation

* Update instrumentation/log4j/log4j-2.16/library/README.md

Co-authored-by: jack-berg <jberg@newrelic.com>
2022-01-04 20:55:36 -08:00
Anuraag Agrawal e08ed9d448
Add library instrumentation for ktor. (#4983) 2022-01-04 20:14:31 -08:00
Trask Stalnaker 7c58220d65
Fix logback testLatestDeps (#5010) 2022-01-04 16:20:21 -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
Lauri Tulmin 26d2634beb
Convert camel instrumentation to instrumenter api (#4973) 2022-01-04 13:29:41 -08:00
jack-berg 935cb88ff4
Add logback appender (#4984) 2022-01-03 20:42:28 -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
Fabrizio Ferri-Benedetti 4d7a5d5062
Add settings docs for instrumentations (#4981)
* First commit

* Add other instrumentation docs

* Peer edits

* Update instrumentation/kafka/kafka-clients/README.md

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

* Update instrumentation/methods/README.md

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

* Update instrumentation/netty/README.md

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

* Update instrumentation/reactor/reactor-netty/README.md

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

* Update instrumentation/servlet/README.md

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

* Fixes

* Update instrumentation/couchbase/README.md

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

* Update instrumentation/rocketmq-client-4.8/README.md

Well spotted!

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

* Update instrumentation/spring/README.md

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

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-01-03 10:24:48 -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
Lauri Tulmin a45aaf34fb
Fix oshi latest dep test (#4993) 2022-01-03 08:44:33 +02:00
Trask Stalnaker 39a9a2f8e2
Fix codenarc (#4969)
* Fix codenarc

* Fix violations
2021-12-22 16:15:38 -08:00
Trask Stalnaker d0fb7d5c83
Fix spring-ws muzzle (#4970) 2021-12-22 14:57:08 -08:00
Trask Stalnaker 589ae4ccfa
Fix vertx modules (#4967) 2021-12-22 12:39:22 -08:00
Trask Stalnaker 5bc64a1b8b
Capture log4j2 context data (mdc) attributes (#4959)
* Capture log4j2 context data (mdc) attributes

* Spotless

* Remove system.out.println

* Switch to allow-list

* Spotless
2021-12-22 10:16:45 -08:00
Trask Stalnaker 6884d66c09
Reduce top level instrumentation directories (#4965)
* akka

* dropwizard

* kafka

* reactor

* vertx
2021-12-22 10:16:13 -08:00
Mateusz Rzeszutek 9e3bd5c18d
Remove a few `ServerSpanNaming` usages (#4900)
* Remove a few ServerSpanNaming usages

* revert vaadin changes
2021-12-21 12:49:03 -08:00
Lauri Tulmin 2531b6e569
Context propagation for undertow async dispatch (#4950) 2021-12-21 12:47:54 -08:00
Anuraag Agrawal a9aee8ed45
Fix some gauge types (#4962) 2021-12-21 12:40: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 484ae6be17
Fix logback testLatestDeps (#4953) 2021-12-20 15:45:40 -08: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 a76c35e33f
Minor log4j instrumentation updates (#4938)
* Minor log4j instrumentation updates

* Remove duplicate line

* Use semantic attributes for exceptions
2021-12-19 19:32:46 -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
Lauri Tulmin 1d5b03d3b5
Fix flaky log4j test (#4931)
* Fix flaky log4j test

* Update instrumentation/log4j/log4j-2.16/library/src/test/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryAppenderConfigTest.java

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-12-17 14:04:34 -08:00
Lauri Tulmin 67378edf7e
Ignore exceptions from closing jax-rs response (#4923) 2021-12-17 08:59:32 -08:00
Trask Stalnaker 6776a7e181
Fix log4j library-autoconfigure publishing (#4928) 2021-12-17 08:59:18 -08:00
Lauri Tulmin 08ba196729
Retry rocketmq batch test when it fails (#4922) 2021-12-17 08:59:01 -08:00
Trask Stalnaker dba6e429e4
Cross test log4j javaagent instrumentation (#4918) 2021-12-16 08:48:02 -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
Mateusz Rzeszutek e8e6813f97
Fix NPE in RocketMQ instrumentation (#4901)
* Fix NPE in RocketMQ instrumentation

* fix tests

* add exception

* Changed the condition a bit
2021-12-15 17:32:01 -08:00
Lauri Tulmin 98d3f88ab8
Fix npe in apache http client 4.0 instrumentation (#4913) 2021-12-15 17:29:57 -08:00
Trask Stalnaker b01efec0fd
Split out log4j appender (#4907) 2021-12-15 10:02:40 -08:00
Asaf Ben Aharon 5869df80e5
Fix RabbitMQ instrumentation consumption on empty headers (#4903)
* Handle null on headers getters

* early returns
2021-12-14 12:01:16 -08:00
Mateusz Rzeszutek 09beb58a8c
Move SpanKey to internal package (#4869)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-12-14 11:27:37 -08:00
Trask Stalnaker 98034e93c6
Remove pinned netty test latest dep version (#4896)
This reverts commit be7bc243de.
2021-12-14 11:25:05 +02:00
Lauri Tulmin b1e2c3ced6
Limit elasticsearch memory usage (#4892) 2021-12-14 11:24:42 +02: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 331ce287d2
Don't use HttpStatusConverter outside of instrumentation-api (#4870)
* Don't use HttpStatusConverter outside of instrumentation-api

* add comment
2021-12-14 10:07:18 +01:00
Anuraag Agrawal 8d0541e0b4
Revert spotless to working version (#4884)
* Revert "Fix Intellij import (#4877)"

This reverts commit 63aec1a401.

* Revert "Update spotless (#4863)"

This reverts commit a4f70cbd86.
2021-12-14 10:59:41 +09:00
Lauri Tulmin 0dbc1f2e1f
Add startup check to all rabitmq container usages (#4893) 2021-12-13 17:28:52 -08:00
Mateusz Rzeszutek 93a3282490
Remove ConfigPropertiesAdatpter as it's no longer needed (#4888) 2021-12-13 12:20:11 -08:00
Trask Stalnaker d930971adf
Fix Quarkus correlation (#4883)
* Fix Quarkus correlation

* Add Quarkus smoke test image

* Add Quarkus smoke test

* Fix permission on gradlew

* Update to gradle 7.3.1

* Fix Jib build

* Bump compilation to Java 11

* Better comment

* Fix comment placement

* Fix
2021-12-13 09:26:44 -08:00