Commit Graph

628 Commits

Author SHA1 Message Date
Trask Stalnaker 65f54e450b
Use Context more in HttpClientTracer (#1811)
* Use Context more in HttpClientTracer

* Better http-url-connection response object

* Follow database semantic conv for elasticsearch-rest

* Remove unnecessary CallDepth tracking
2020-12-03 11:47:08 -08:00
Nikita Salnikov-Tarnovski 54e3df3cd4
Add jsp to test matrix application (#1825)
* Add jsp to test matrix application

* Trying to fix sudden muzzle failure
2020-12-03 19:40:31 +02:00
Mateusz Rzeszutek fff6eb7004
Add HTTP attributes support for AWS lambda function wrapper (#1780) 2020-12-03 18:20:04 +02:00
Trask Stalnaker a04a0586a5
Fix mongo-common testLatestDeps (#1818) 2020-12-01 20:18:17 -08:00
Trask Stalnaker a2770c311e
Don't use ConfigUtils outside of AgentTestRunner tests (#1796)
* NetPeerUtilsTest

* RedisCommandNormalizerTest

* InstrumentationModuleTest

* HttpClientTracerTest

* Normalize test config properties

* Create ConfigBuilder in instrumentation-api

* Keep config properties compatible with SDK
2020-12-01 16:52:08 -08:00
Trask Stalnaker 0bd85d7b7f
Pass around context more instead of span (HttpServerTracer) (#1810) 2020-12-01 14:49:01 -08:00
Trask Stalnaker 01b4345742
Move MongoClientTracerTest to same module as MongoClientTracer (#1804)
* Move MongoClientTracerTest to mongo-common

* Remove multi-version support

* Use library dependency
2020-12-01 14:45:45 -08:00
Trask Stalnaker c07da390c0
Update WithSpan instrumentation to prevent multiple SERVER and CLIENT spans (#1801)
* Make WithSpan instrumentation SERVER aware

* Also CLIENT aware

* Spotless

* Don't put invalid span into scope

* Return Context from startSpan
2020-12-01 08:05:34 +02:00
Trask Stalnaker ca76c80820
Hardcode expected values in tests (#1803)
* DEFAULT_SPAN_NAME

* TEMP_DESTINATION_NAME

* LoggingContextConstants

* Remove unnecessary dependencies

* Hardcode expected normalized queries in tests

* Spotless
2020-11-30 09:16:59 +02:00
Trask Stalnaker e92bdb46f8
Don't dynamically change config mid-Kafka test (#1797)
* Don't dynamically change config mid-Kafka test

* Codenarc

* Spotless
2020-11-30 09:14:11 +02:00
Trask Stalnaker 0c8d7fe73f
Miscellaneous cleanup (#1805)
* Remove outdated doc

* Remove unnecessary dependencies

* Formatting

* Rename TRACER to tracer

* Move WrappedFuture to top-level class

* Add missing shadow config

* Use simpler type

* Use simpler base class
2020-11-29 21:05:53 -08:00
Trask Stalnaker a3d11c0262
Rename auto annotations to ext annotations (#1799) 2020-11-29 21:04:55 -08:00
Trask Stalnaker 61d0af0bd5
Format scala files (#1800) 2020-11-29 21:04:34 -08:00
Trask Stalnaker 26f254b10d
Create javaagent dirs for all instrumentations, part 2 (#1794) 2020-11-28 22:26:49 -08:00
Trask Stalnaker 41bd489a77
Format groovy files (#1793) 2020-11-28 21:22:14 -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
Trask Stalnaker 083651acef
Update more config property names (#1786) 2020-11-28 10:50:51 -08:00
Trask Stalnaker b683c2ff05
Convert the last two decorators to tracers and delete BaseDecorator (#1785) 2020-11-28 10:50:41 -08:00
Trask Stalnaker 66b4088450
Remove servlet.context span attribute (#1783) 2020-11-28 10:50:26 -08:00
Jakub Wach 2689653ee7
open AWS lambda wrapper for extensions (#1777) 2020-11-27 11:12:52 +09:00
Mateusz Rzeszutek 9a64a628ea
Make instrumentations non final (#1752)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-26 11:22:25 -08:00
Anuraag Agrawal 31f1a73d59
Upgrade build plugin versions. (#1774) 2020-11-26 18:16:14 +09:00
Anuraag Agrawal 412d9991be
Inject context for aws sdk 1.11 requests too. (#1771) 2020-11-26 15:25:37 +09:00
Trask Stalnaker 7a6613ca6c
Simplify netty-4.1 AttributeKeys (#1757)
* Simplify netty-4.1 AttributeKeys

* Suggestions

* Shorten names

* Make same naming changes for netty-4.0

* Update instrumentation/netty/netty-4.0/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v4_0/AttributeKeys.java

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2020-11-26 11:49:52 +09:00
Trask Stalnaker 325238f128
Rename otel.trace.classes.excludes to otel.javaagent.exclude-classes (#1747)
* Rename otel.trace.classes.excludes

* Spotless
2020-11-25 16:53:49 +02:00
Mateusz Rzeszutek 46a96c09f7
Remove unnecessary additionalHelperClasses() from elasticsearch-transport (#1766) 2020-11-25 15:00:19 +02:00
Anuraag Agrawal 822be11dbc
Use Kotlin context element in agent instrumentation (#1618)
* Use SDK helper

* Revert unintended.
2020-11-25 18:45:00 +09:00
Anuraag Agrawal 9802539b07
Add an AWS SDK type instrumentation on an 'entry point' type of class… (#1759)
* Add an AWS SDK type instrumentation on an 'entry point' type of class to ensure helper resources are injected before clients are made.

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

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-25 18:21:06 +09:00
Anuraag Agrawal 737f78acfa
Inject context into AWS SDK 2.2 HTTP request from interceptor. (#1763) 2020-11-25 17:37:16 +09:00
Mateusz Rzeszutek 50c8ab499d
Remove no longer needed helperClassNames() methods (#1755) 2020-11-24 20:50:32 -08:00
Trask Stalnaker a5a36bd203
Use namespace for attributes put into user classes (#1739)
* Use namespace for attributes put into user classes

* Add dependency to remove duplication
2020-11-24 12:07:10 -08:00
Trask Stalnaker 889bce0976
Create jaxrs-client-2.0-common module (#1746) 2020-11-24 11:49:05 -08:00
Mateusz Rzeszutek 13c405c174
Make muzzle generate helperClassNames() method (#1714) 2020-11-24 10:07:22 -08:00
Mateusz Rzeszutek 45646ff367
Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization() (#1741)
* Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization()

* Removed no longer needed comments & improved JavaDoc

* Improve TypeInstrumentation Javadoc
2020-11-24 14:27:58 +02:00
Jakub Wach 7e8d549347
AWS lambda tracing - http propagation for non-stream handler / wrapper (#1650)
* AWS lambda tracing - http propagation for non-stream handler / wrapper

* code review

* null-handling improvements

* rebase to newest master

* code review

* less dependencies, lower coupling
2020-11-24 12:42:05 +01: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 d2f064dcd4
Add static keyword to make groovy inner classes nested (#1734)
* Add static keyword to make groovy inner classes nested

* Too much

* A bit less

* Spotless
2020-11-23 15:43:42 +02:00
Trask Stalnaker 79f76c78ad
Move java files to java source folder and groovy files to groovy source folder (#1735)
* Move java files to java source folder

* Move groovy files to groovy source folder

* Too much

* Move another one back

* Codenarc

* Move test resource to where test is

* Spotless
2020-11-23 15:42:04 +02:00
Trask Stalnaker 308a8f9b0f
Consistent equals implementations (#1736)
* Consistent equals implementations

* Use direct equals where previous behavior
2020-11-23 15:41:31 +02: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
Sergei Malafeev f0feefc4b2
update SystemMetrics according to spec update (#1705) 2020-11-20 09:54:31 -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
Trask Stalnaker c3e1a321d2
Fix MongoDB testLatestDeps (#1703)
* Fix MongoDB testLatestDeps

* Codenarc
2020-11-20 09:34:25 +02:00
Anuraag Agrawal 7bfb6b6dbd
Update to SDK 0.11.0 (#1690) 2020-11-19 19:37:49 -08:00
Jeff Yemin d093a561b9
Report only known collection names in MongoClientTracer (#1625) (#1662)
* Report only known collection names in MongoClientTracer (#1625)

* Use allow-list of commands that are known to use collection name as the value of the command
* Special-case getMore command, which uses a different field for the collection name

* Add create, drop, and createIndexes to list of commands with collection name as their values
2020-11-19 16:26:27 -08:00
Jeff Yemin 65a6293714
Improve command scrubber in MongoClientTracer (#1587) (#1663)
* Improve command scrubber in MongoClientTracer (#1587)

* Don't scrub the command field value at all if it's a string
* Use JsonWriter to improve efficiency of the scrubber
* If available, user JsonWriter.Builder.maxLength to limit size of the query string
2020-11-19 13:21:29 -08:00
Trask Stalnaker e092e87d6b
Remove disabled by default servlet instrumentation (#1684) 2020-11-19 11:22:02 -08:00
Trask Stalnaker d183692699
Enable checkstyle type var naming rule (#1666) 2020-11-19 11:00:31 -08:00
Vladimir Šor a4e6d9322d
Fix dependencies for testLatestDeps to work. (#1683) 2020-11-19 10:59:22 -08:00
Trask Stalnaker 0eede40d06
Improve consistency of struts with existing tests (#1665)
* Improve consistency of struts with existing tests

* spotless
2020-11-19 19:19:39 +02:00
Trask Stalnaker 80b068b459
Instrument java.servlet.Filter directly (#1606)
* Instrument filter directly

* Remove some additional ignores

* Fix OncePerRequestFilter not being instrumented itself
2020-11-18 19:59:28 -08:00
Trask Stalnaker cecdfc2cd0
Update instrumentation names to be consistent (#1671)
* Update instrumentation names to be consistent

* Remove amqp from rabbitmq package name
2020-11-18 19:53:31 -08:00
Nikita Salnikov-Tarnovski 3c195f3273
Limit latest test version for Apache HttpClient 2.0 (#1676) 2020-11-18 14:57:58 +02:00
Trask Stalnaker 2e51003900
Enable checkstyle overload method ordering rule for Google Java Style (#1656) 2020-11-17 14:41:14 -08:00
Mateusz Rzeszutek cea28356c6
Remove some no longer needed muzzleCheck() methods (#1660)
* Remove some no longer needed muzzleCheck() methods

And add muzzle references to log4j 2.13.2 instrumentation
2020-11-17 14:40:33 -08:00
Nikita Salnikov-Tarnovski a446d7ea22
Prevent bootstrap classes from being included into agent classloader (#1646) 2020-11-17 13:31:41 -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
Trask Stalnaker b35c0b28cc
Java 7 and CircleCI cleanup (#1654)
* Java 7 and CircleCI cleanup

* Bring back and increment version instead
2020-11-17 10:36:23 +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 d435da4638
Update to Gradle 6.7 and use new toolchains feature for testing on Ja… (#1627)
* Update to Gradle 6.7 and use new toolchains feature for testing on Java versions.

* Update docs

* Add back sum

* Use GitHub test JDK for toolchain.

* Use maxJavaVersionForTests for default test version when set.

* Fix RMI

* Fix configs

* Go back to rule

* Extract variable for default Java version.
2020-11-16 10:29:36 +02:00
Trask Stalnaker 55530ee03e
Better muzzle for external-annotations module (#1624) 2020-11-12 21:11:26 -08:00
Mateusz Rzeszutek 1765839d01
Simplify JDBC span names (#1533) 2020-11-10 13:34:54 -08:00
Nikita Salnikov-Tarnovski 76f6b8aa49
Netty bug (#1604)
* Netty connection span leak

* Demonstrating Netty bug

* Format
2020-11-10 14:44:27 +02:00
Mateusz Rzeszutek 9d2db827b9
Refactor Instrumenters into InstrumentationModules - R, S, T, V (#1576) 2020-11-09 18:48:52 -08:00
Trask Stalnaker 087a9cbc4e
Fix dropwizard instrumentation (#1607)
* Fix dropwizard instrumentation

* Fix others too
2020-11-09 18:46:26 -08:00
Mateusz Rzeszutek 7f36dd1617
Refactor Instrumenters into InstrumentationModules - N, O, P (#1575) 2020-11-09 14:42:16 -08:00
Mateusz Rzeszutek ef58ec1770
Refactor Instrumenters into InstrumentationModules - K, L, M (#1563) 2020-11-09 14:41:55 -08:00
Mateusz Rzeszutek 0e83a5b56d
Refactor Instrumenters into InstrumentationModules - J (#1562) 2020-11-09 14:41:37 -08:00
Mateusz Rzeszutek aa3ba8d165
Refactor Instrumenters into InstrumentationModules - D, E, F, G, H (#1557) 2020-11-09 14:41:12 -08:00
Mateusz Rzeszutek d307ffc532
Refactor Instrumenters into InstrumentationModules - A, B, C (#1556)
* Refactor Instrumenters into InstrumentationModules - A, B, C

* Fixed some modules' names to match library/instrumentation gradle module

* Fix couchbase 2.6 muzzle
2020-11-09 15:42:41 +01:00
Jakub Wach 09fda6e52a
AWS lambda instrumentation - HTTP context propagation (#1536)
* AWS lambda instrumentation - HTTP context propagation

* code review, added tests for stream wrapper

* code review - recpects XRay propagation, tests added

* rebase to master
2020-11-09 15:59:33 +02:00
Trask Stalnaker 45d1a0811a
Publish lettuce-common (#1589) 2020-11-09 15:04:25 +02:00
Trask Stalnaker 8ee2533c96
Fix ClassNotFoundException on Wildfly (#1593) 2020-11-09 13:59:36 +09:00
Trask Stalnaker 71f91877ab
Fix muzzle and add missing helper classes (#1585)
* Fix muzzle

* Fix jdbc instrumentation

* Fix jms instrumentation

* Fix couchbase instrumentation

* Fix servlet instrumentation
2020-11-08 13:54:00 -08:00
Anuraag Agrawal 3d21c26632
Update to SDK 0.10.0 (#1564) 2020-11-05 13:17:47 -08:00
Sergei Malafeev 70dcb93121
Activate SystemMetrics (#1530) 2020-11-05 13:02:01 -08:00
Anuraag Agrawal e1c7baab42
Upgrade to latest SDK snapshot (#1549) 2020-11-05 17:45:59 +09:00
Mateusz Rzeszutek 8629edd346
Run muzzle once per instrumented library - introducing InstrumentationModule (#1528)
* Run muzzle once per instrumented library - introducing InstrumentationModule

* spotless

* Fix muzzle

* Apply code review comments
2020-11-04 15:39:12 +01:00
Jakub Wach 81101ed463
fix master build fail due to latestDepTest (#1554) 2020-11-04 16:21:29 +02: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
Anuraag Agrawal d3b60a5e33
Rename TRACER to tracer() (#1540) 2020-11-02 20:49:51 -08:00
Anuraag Agrawal 5d2cb459df
Update to latest SDK snapshot (#1539) 2020-11-02 16:07:53 +09:00
Anuraag Agrawal c6eee70660
Update to latest snapshot. (#1524) 2020-10-29 18:54:09 -07:00
Mateusz Rzeszutek e89942d430
Standardize DB query normalizer property names (#1509)
* Standardize DB query normalizer property names

And add normalizer configuration for Redis, Couchbase, Cassandra and Geode

* apply code review comments
2020-10-29 16:20:33 +02:00
Anuraag Agrawal dfda406fee
Migrates to using a context when span is started (#1525)
* Return Context when starting span to preserve baggage.

Co-authored-by: Marcin Grzejszczak <marcin.grzejszczak@gmail.com>

* Use bridge

Co-authored-by: Marcin Grzejszczak <marcin.grzejszczak@gmail.com>
2020-10-29 13:50:54 +02:00
Nikita Salnikov-Tarnovski f3559de4a3
Cap latest supported version for Spring Data JPA (#1522) 2020-10-29 10:24:27 +02:00
Anuraag Agrawal fd03a4b1e1
Replace ContextStore for context bridge with a custom context storage… (#1493)
* Replace ContextStore for context bridge with a custom context storage provider.

* Handle context mapping at storage layer.

* Cleanup

* Add interop test

* Small comment

* No threads

* Groovy
2020-10-29 15:42:50 +09:00
Nikita Salnikov-Tarnovski 4959b7eb34
Fix property name for latest Spring MVC (#1516)
Cap latest supported version for Spring Data JPA
2020-10-28 22:28:19 +02:00
Mateusz Rzeszutek 9bb13bd8f0
Fix Redisson latestDep tests (#1507)
* Fix Redisson latestDep tests

* spotless

* Add comment
2020-10-28 16:18:13 +01:00
Trask Stalnaker 58c78ec7d0
Fix test latest deps build (#1503) 2020-10-27 15:48:58 -07: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
Trask Stalnaker f046e598c6
Add context root to the front of the route in the span name (#1418)
* Add application root to span name

* Reduce duplicate context lookups

* Use servlet path as route

* Test against jetty instrumentation

* Add JAX-RS context path test

* Fix JAX-RS 1.0 span names
2020-10-27 14:21:10 -07:00
Mateusz Rzeszutek d3c39228c6
Couchbase instrumentation should store normalized queries as db.statement (#1462)
* Couchbase instrumentation should store normalized queries as db.statement

* Fix inaccurate version comments
2020-10-27 18:15:27 +01:00
Sergei Malafeev d2813c838d
Add system metrics (#1309)
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-10-27 08:48:36 -07:00