Commit Graph

86 Commits

Author SHA1 Message Date
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
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
Lauri Tulmin d53c276b96
Ensure that netty 4.0 instrumentation is not applied to 4.1 (#4626)
* Enusre that netty 4.0 instrumentation is not applied to 4.1

* formatting

* cross test netty instrumentation
2021-11-11 08:38:56 -08:00
Mateusz Rzeszutek 59c1ce11a7
Improve muzzle check for constructors (#4591) 2021-11-05 08:40:20 +01:00
Lauri Tulmin 6694f85532
Inject helper resources only once (#4573)
* Inject helper resouces only once

* use resources instread of resource
2021-11-03 09:30:22 -07:00
Lauri Tulmin 8dce10f8ae
Muzzle match only once in each class loader (#4543)
* Muzzle match only once in each class loader

* Move muzzle matcher caching from ReferenceMatcher to InstrumentationModuleInstaller

* Update comment as caching was moved to a different method

* Fix comment
2021-11-01 11:30:03 -07:00
Martin d314d76fce
rename `newBuilder()` to `builder()` (#4475)
* rename `newBuilder()` to `builder()`

* rename `newBuilder()` to `builder()`
2021-10-22 20:50:43 -07:00
Lauri Tulmin 9b8ab5eeec
Migrate to spock 2 (#4458)
* Migrate to spock 2

* Fix smoke test suites

* address review comments

* review comment

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-22 08:40:58 -07:00
Lauri Tulmin 17a85bbc22
Use byte-buddy-dep instead of byte-buddy (#4400)
* Use byte-buddy-dep instead of byte-buddy

* print stacktrace on examples failure

* try to fix gradle plugins

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try removing mavenLocal

* add mavenLocal plugin repository

* publish gradle-plugins to mavenLocal for examples ci build

* Fix bytebuddy exclusion
2021-10-19 13:46:48 -07:00
Martin 6d9e3618d3
rename `newBuilder()` to `builder()` (#4407)
* rename `newBuilder()` to `builder()`

* code format
2021-10-18 10:00:49 -07:00
Martin ac91dc090a
Type annotation placement (#4406)
* switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable`

* code format
2021-10-17 17:38:43 -07:00
Mateusz Rzeszutek fb77651658
Restrict usage of arrays as VirtualField types and fix field naming (#4323)
* Restrict usage of arrays as VirtualField types and fix field naming

* disallow primitive type usage too

* A few more test cases and validations
2021-10-08 10:52:26 +02:00
Nikita Salnikov-Tarnovski 0683371110
Add supported way to add additional helper classes to instrumentation without interfering with muzzle (#4302)
* Add supported way to add additional helper classes to instrumentation without interfering with muzzle

* Better javadoc
2021-10-06 09:52:54 -07:00
Nikita Salnikov-Tarnovski c28374615b
Add functionality to generate API changes (#4285)
* Add functionality to generate API changes

* Update conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts

Co-authored-by: John Watson <jkwatson@gmail.com>

* Do not commit any API changes until we have stable release

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-10-06 09:59:01 +03:00
Nikita Salnikov-Tarnovski 9bbd490288
Remove last muzzle generate method from InstrumentationModule (#4281)
* Remove last muzzle generate method from InstrumentationModule
2021-10-05 14:43:21 +03:00
Trask Stalnaker 2a76d41807
Small renames for clarification (#4294) 2021-10-05 10:37:02 +03:00
Mateusz Rzeszutek 9d6fb65b41
Remove ContextStore/InstrumentationContext mentions from internal age… (#4267)
* Remove ContextStore/InstrumentationContext mentions from internal agent classes

* Fix internal-reflection module
2021-10-04 09:24:25 -07:00
Mateusz Rzeszutek c11b96e4d0
Make it possible to use InstrumentationContext (now VirtualField) fro… (#4218)
* Make it possible to use InstrumentationContext (now VirtualField) from library instrumentation

* fix tests

* fix javadocs

* fix some more tests

* code review comments

* setIfNull, computeIfNull
2021-10-01 11:13:11 +02:00
Trask Stalnaker 43926071c3
Update error message based on new findings (#4228) 2021-09-29 10:01:06 -07:00
Nikita Salnikov-Tarnovski ba332a970a
Remove deprecated method helperResourceNames from InstrumentationModule (#4221)
* Remove deprecated method helperResourceNames from InstrumentationModule

* Restore test
2021-09-29 15:25:19 +03:00
Nikita Salnikov-Tarnovski 07871686ea
Hide InstrumentationContextBuilder from public API (#4216)
* Introduce muzzle-specific interface to InstrumentationModule

* Moved more methods to the InstrumentationModuleMuzzle interface

* Fixing tests

* More logs

* Fix log name

* Hide InstrumentationContextBuilder from public API
2021-09-29 11:26:39 +03:00
Nikita Salnikov-Tarnovski 5dffeef4aa
Introduce muzzle-specific interface to InstrumentationModule (#4207)
* Introduce muzzle-specific interface to InstrumentationModule
* Moved more methods to the InstrumentationModuleMuzzle interface
2021-09-28 12:15:33 +03: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
Mateusz Rzeszutek 699cc81990
Remove one unnecessary list copy from AgentLocationStrategy (#4156) 2021-09-17 11:30:20 -07:00
Nikita Salnikov-Tarnovski 17d9c6f414
Remove generated InstrumentationModule#getMuzzleReferences() method from the source code (#4087)
* Remove generated InstrumentationModule#getMuzzleReferences() method from the source code

* Fix errorprone

* Class-based cache for MethodHandle

* Consistent suppression.
2021-09-13 12:55:38 +02:00
Matthew Ho 6967484a97
Update groovy import order to match default IntelliJ (#1708) (#4047)
* Update groovy import order to match default IntelliJ (#1708)

* organized imports for .groovy files to follow default IntelliJ import settings

* updated intellij-setup.md

* Spotless

* drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-11 11:53:08 -07:00
Mateusz Rzeszutek 7424f33dfb
Allow adding multiple ContextStore fields to one key class, part 2 (#4084)
* Allow adding multiple ContextStore fields to one key class, part 2

* checkstyle
2021-09-10 13:50:26 -07:00
Lauri Tulmin 38470bd2e6
Use unsafe to inject classes to boot loader (#4026) 2021-08-30 11:29:37 -07:00
Trask Stalnaker 20c72f3e98
Format kotlin gradle files (#3942)
* Add ktlint for kotlinGradle

* ktlint fails on wildcard imports

* Auto-format kotlin gradle files
2021-08-25 13:43:57 +09:00
Trask Stalnaker 5ff7901efc
Versioned helper resources, part 2 (#3880)
* Versioned helper resources, part 2

* Remove accidentally added javadoc param

* Spotless

* Fix test
2021-08-20 13:52:04 -07:00
Trask Stalnaker 36bdce2f5c
Support versioned instrumentation helper resources (#3864)
* Support versioned instrumentation helper resources

* Remove duplicated class

* Groovy

* Spotless

* Renames

* HelperResources -> HelperResourceBuilder
2021-08-19 12:17:09 -07:00
Mateusz Rzeszutek bebb877017
Fix printMuzzleReferences gradle task (#3808)
* Fix printMuzzleReferences gradle task

* suppress SystemOut warnings

* bump gradle-plugins version
2021-08-10 12:10:29 -07:00
Nikita Salnikov-Tarnovski e20c3779e1
Extract helper injection verification logic from plugin util into standalone class (#3688) 2021-07-29 10:23:49 +03:00
Nikita Salnikov-Tarnovski 4617a0475a
Extract some muzzle checking logic from plugin util into standalone class (#3685)
* Extract some muzzle checking logic from plugin util into standalone class
2021-07-28 10:40:30 +03:00
Nikita Salnikov-Tarnovski 6a2ee3255a
Extract muzzle check plugin (#3657)
* Extract muzzle check plugin
2021-07-26 12:37:14 +03: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