Commit Graph

185 Commits

Author SHA1 Message Date
Trask Stalnaker 690e3bdd16
Remove outdated muzzle condition (#2906)
* Remove outdated muzzle condition

* Remove outdated test
2021-05-05 10:33:28 +03:00
Lauri Tulmin beae3276df
Fix flaky smoke tests (#2849)
* Enable debug logging for smoke tests

* trigger rerunning of smoke tests

* trigger rerunning of smoke tests

* pass agent in JVM_ARGS instead of JAVA_TOOL_OPTIONS on glassfish

* spotless

* remvove debugging code

* update windows image versions

* Ensure java.lang.reflect.Proxy is loaded before bytebuddy transformer is set up

* update windows image version

* Update javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentInstaller.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-04-29 12:47:42 +02:00
Mateusz Rzeszutek e4133f1845
Muzzle should check whether used fields are declared somewhere (#2870) 2021-04-28 10:01:21 -07:00
Lauri Tulmin bd02b0ce76
Log the whole exception when transformation fails (#2852) 2021-04-23 10:36:13 +09:00
Lauri Tulmin 9f8371e77c
Use locale insensitive lower/upper case conversion (#2838) 2021-04-22 11:24:13 +09:00
Pavol Loffay ce5355c211
Move install component before BB to install method (#2821) 2021-04-21 15:05:07 -07:00
Lauri Tulmin a3c0b44b31
JAX-RS ApplicationPath annotation (#2824) 2021-04-21 09:07:54 -07:00
Mateusz Rzeszutek 95f8342558
Deprecate additionalHelperClassNames (#2810)
* Deprecate additionalHelperClassNames

* Deprecate additionalHelperClassNames
2021-04-16 10:11:11 +02:00
Trask Stalnaker c17b803b71
Use isHelperClass over additionalHelperClassNames (#2796) 2021-04-14 09:38:16 -07:00
Trask Stalnaker 9bd028f767
Remove unnecessary genericness (#2797) 2021-04-14 00:01:28 -07:00
Mateusz Rzeszutek 078603caf5
Generate InstrumentationModule#contextStore() with muzzle (#2775) 2021-04-13 20:05:01 -07:00
Trask Stalnaker 117d38a01b
Support URLClassLoader addURL (#2772) 2021-04-12 15:53:44 -07:00
Trask Stalnaker 0f60b44b7c
Avoid proxy IllegalArgumentException: repeated interface (#2773) 2021-04-12 13:59:40 -07:00
Trask Stalnaker 5be065cd31
Switch to grpc-netty-shaded (#2769) 2021-04-11 13:27:37 -07:00
Mateusz Rzeszutek b204fcc56e
Bring back Guava to javaagent-tooling (it's actually used here) (#2764) 2021-04-09 16:54:06 +03:00
Mateusz Rzeszutek c872513896
Remove unused class (#2757) 2021-04-08 17:49:19 +02:00
Anuraag Agrawal a4ea1c9db2
Update to OTel 1.1.0 (#2744)
* Update to OTel 1.1.0

* Use transform safe logger

* Finish

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-04-08 16:01:16 +09:00
Trask Stalnaker 6ea316e22e
Remove timeout annotations (#2725) 2021-04-06 16:36:18 +09:00
Mateusz Rzeszutek 1406855bb7
Revert "Prevent duplicate telemetry when using both library and auto instrumentation (#2661)" (#2689) 2021-04-01 16:11:15 -07:00
Trask Stalnaker d5e526b9f3
Cache config values in instrumentations (#2681)
* Cache config values in instrumentations

* Bring back defaultEnabled()

* comment

* one problem
2021-03-31 22:54:20 -07:00
Mateusz Rzeszutek 30434696ae
Prevent duplicate telemetry when using both library and auto instrumentation (#2661)
* Prevent duplicate telemetry when using both library and auto instrumentation

* Add unit test

* Fix Oshi tests

* Fix couchbase 3.1 tests
2021-03-31 10:57:04 -07:00
Mateusz Rzeszutek 1e50b72937
Make muzzle reference creation package(s) configurable (#2615)
* Make muzzle reference creation package(s) configurable

* Code review comments
2021-03-26 14:12:43 +02:00
Anuraag Agrawal 81648fe560
Remove CommonTaskExecutor (#2635) 2021-03-26 13:58:11 +02:00
Anuraag Agrawal 79d7e88e53
Use Caffeine for weak maps (#2601)
* Caffeine weakmap

* Use Caffeine for weak maps

* Drift

* Drift

* Remove weak-lock-free

* Update licenses

* Fix bug

* Restore weaklockfree

* Clean

* Fixes

* Inline expunction

* Synchronized

* More comment

* Fix shading

* Executor

* computeIfAbsent and delete unused.

* Fix license report
2021-03-24 17:12:26 +09:00
Nikita Salnikov-Tarnovski d79f90492a
Make sure muzzle build-time check actually validates anything (#2599)
* Check if muzzle build-time check actually validates anything

* Force class files generation before muzzle

* Apply muzzle only to javaagent projects

* Apply muzzle only to javaagent projects

* More fixes

* More fixes

* PR review comments

* polish

* Exclude "broken" version

* Polish

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-23 14:12:01 +02:00
Mateusz Rzeszutek 9fff4a3b47
ComponentInstallers should run after LogManager if a custom one is detected (#2592)
* ComponentInstallers should run after LogManager if a custom one is detected

* Limit to Java 8
2021-03-18 14:10:22 +02:00
jason plumb 6ea1e8d0ef
Let the ComponentInstaller be passed a Config instance (#2569)
* Let the ComponentInstaller be passed a Config instance, and prefer using Config over Properties

* revert span exporter factory and metric exporter factory and stick with the ol' properties for now.

* rollback
2021-03-18 00:11:42 +02:00
Mateusz Rzeszutek f3ba2302eb
Remove unnecessary libs from the javaagent shadowJar (#2566)
* Remove unnecessary libs from the javaagent shadowJar

And make it a bit lighter: 36 MB -> 21 MB

* Apply code review comments

* Remove unnecessary kotlin exclusion
2021-03-16 10:47:05 +01:00
Mateusz Rzeszutek 670a9cde3f
Minor InstrumentationClassPredicate refactor (don't treat javaagent-t… (#2536)
* Minor InstrumentationClassPredicate refactor (don't treat javaagent-tooling as helper classes)

* Update javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/InstrumentationClassPredicate.java

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

* fix tests

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-12 16:36:34 +01:00
Trask Stalnaker f94fabe07f
Fix app failure under Eclipse OSGi (#2521)
* Fix app failure under Eclipse OSGi

* Feedback

* Alphabetical
2021-03-10 08:19:32 +02:00
Lauri Tulmin 7013376030
Add support for Grails (#2512)
* Add support for Grails

* exclude bad version from muzzle

* Review fixes

* review fixes

* rebase

* Trigger Build
2021-03-09 08:56:33 +02:00
Mateusz Rzeszutek 3dff44874f
Fix RestTemplateInterceptor so that it calls endExceptionally() on exception (#2516) 2021-03-08 09:36:47 -08:00
Anuraag Agrawal 2c03f2c526
Add support for muzzle to process AWS SDK v1 handler resource file. (#2526)
* Add support for muzzle to process AWS SDK v1 handler resource file.

* git add
2021-03-08 15:03:08 +02:00
Anuraag Agrawal d7f8967ff6
Add a caching API based on caffeine for use from instrumentation, not just javaagent (#2477)
* Add caching API

* Finish

* javadoc

* Extract dep

* git add

* Drift

* Spotbugs

* checkstyle

* Fix package

* Test Caffeine patch
2021-03-05 17:57:23 +09:00
Trask Stalnaker 0abc492bc3
Rename more properties (#2486)
* Rename more props to experimental

* Rename more properties

* Rename .internal to .testing

* Revert changes to examples distro

* Move chunk.new-trace to experimental

* Fix unrelated build issue
2021-03-04 11:20:47 -08:00
Mateusz Rzeszutek a139d72014
Initialize Config for library instrumentations (#2467)
* Initialize Config for library instrumentations

Extracted from https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/2434

* Fix tests
2021-03-03 09:55:14 +02:00
Mateusz Rzeszutek 8f3ea83504
Move some classes out of instrumentation-api (#2466)
* MethodsConfigurationParser is moved to javaagent-tooling - it's only used in some instrumentation modules
* BootstrapPackagePrefixesHolder is moved to javaagent-api - it just needs to be in the bootstrap CL for the classloader instrumentation, so it does not necessarily need to be instrumentation-api
2021-03-02 10:31:53 -08:00
Trask Stalnaker c838498a73
Rename two props to otel.instrumentation.common.* (#2457) 2021-03-02 10:25:36 -08:00
Trask Stalnaker d4676c4ebc
Rename otel.javaagent.config property (#2455) 2021-03-02 10:25:20 -08:00
Trask Stalnaker 5c1a432c54
Update old name (#2440) 2021-03-01 15:43:49 -08:00
Trask Stalnaker e0bd17aca9
Util simplification (#2394) 2021-02-24 11:09:53 -08:00
jason plumb 413b2aee5d
precompile pattern and use char replacement. (#2374)
* precompile pattern and use char replacement.

* expand description for the narc.

* use endsWith and substring vs. regex.

* make .class a string constant
2021-02-24 10:08:55 +09:00
Lauri Tulmin 4c49932d8b
Add instrumentation for jax-ws frameworks (#2314)
* Add instrumentation for jax-ws frameworks

* remvoe commneted out code

* Update instrumentation/jaxws/jaxws-2.0-axis2-1.6/library/src/main/java/io/opentelemetry/instrumentation/axis2/Axis2JaxWsTracer.java

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

* review fixes

* review fix

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-02-22 16:46:33 +02:00
Anuraag Agrawal 2244377dd4
Remove trivial uses of Guava from agent. (#2360)
* Remove trivial uses of Guava from agent.

* Extract

* Clean
2021-02-22 12:31:02 +09:00
Trask Stalnaker 79fa9e0816
Fix debug logging (#2351)
* Fix debug logging

* Fix test

* Fix another test
2021-02-20 10:06:50 +02:00
Anuraag Agrawal 000df967ce
Update to SDK 0.17.0 (#2338)
* Update to SDK 0.17.0

* Finish

* ottrace
2021-02-19 15:51:55 +09:00
Trask Stalnaker 427bd5fbb0
Move slf4j-simple initialization from bootstrap into tooling (#2305)
* Move more init out of bootstrap

* spotLESS
2021-02-17 14:51:45 +02:00
John Watson a0b208fd52
Turn on the logging span exporter if agent debug is enabled. (#2270) 2021-02-16 15:38:37 -08:00
Trask Stalnaker 9d58ac864c
Reduce debug logging (#2296) 2021-02-16 16:08:59 +09:00
Trask Stalnaker 59c9b544d1
Bring back debug logging under class file transform (#2236)
* Bring back debug logging under class file transform

* spotless

* Feedback

* Rename to TransformSafeLogger
2021-02-16 12:37:17 +09:00