Resolves#7894
Replace `MethodHandle` with older `java.lang.reflect.Field`, which is
supported on older Java versions.
Also enables animal sniffer for the RxJava2 instrumentation to prevent
regression.
---------
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Bumps me.champeau.jmh:jmh-gradle-plugin from 0.6.8 to 0.7.0.
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Groovy apps that parse a lot of scripts can generate a lot of
classloaders that will ultimately end up causing the agent to cache a
LOT of memory. For example, some java code that uses the Gremlin groovy
script engine to dynamically create and execute scripts can reproduce
this:
```
GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine();
Bindings bindings = new SimpleBindings();
TinkerGraph graph = TinkerGraph.open();
GraphTraversalSource g = graph.traversal();
bindings.put("g", g);
for (int i = 0; i < 100000; i++) {
engine.eval("g.V(" + i + ")", bindings);
if(i % 250 == 0) System.out.println("Iteration " + i);
}
```
I have manually confirmed that ignoring the groovy classloaders (in this
PR) prevent the agent from exploding the cache and holding onto memory.
I could use another brain in deciding if there could be other unintended
consequences.
This PR resolves#7629
This adds javaagent instrumentation for the
[jodd-http](https://http.jodd.org/) `HttpRequest`.
It creates `Http Client Spans` and `Http Client Metrics`, the lowest
supported version is `org.jodd:jodd-http:4.2.0` (most recent: `6.3.0`),
since this is the first version of the library supporting java 8, having
follow-redirect capability and `HttpRequest#overwriteHeader()` method.
The instrumented method's signature and return type `HttpRequest#send()`
has not been modified since, and therefore the instrumentation works for
all `jodd-http` versions above `4.2.0`.
Since this is my first contribution/instrumentation, I orientated myself
on the `apache-httpclient-5.0` instrumentation, but obviously I would be
glad to get some feedback on this
---------
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Bumps `byteBuddyVersion` from 1.13.0 to 1.14.0.
Updates `net.bytebuddy:byte-buddy` from 1.13.0 to 1.14.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">net.bytebuddy:byte-buddy's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.14.0</h2>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/blob/master/release-notes.md">net.bytebuddy:byte-buddy's
changelog</a>.</em></p>
<blockquote>
<h3>18. February 2023: version 1.14.0</h3>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00da41ec54"><code>00da41e</code></a>
[maven-release-plugin] prepare release byte-buddy-1.14.0</li>
<li><a
href="c601a7886a"><code>c601a78</code></a>
[release] Release new version</li>
<li><a
href="102ee25440"><code>102ee25</code></a>
Avoid test execution on Java 7.</li>
<li><a
href="3b5f4dcb8a"><code>3b5f4dc</code></a>
Remove unused packages.</li>
<li><a
href="b42f78b2a5"><code>b42f78b</code></a>
Add scheme part to URI.</li>
<li><a
href="d94d66a18c"><code>d94d66a</code></a>
Add scheme part to URI.</li>
<li><a
href="aaa18f29c9"><code>aaa18f2</code></a>
Adjust expectation for dynamic lambda invocation.</li>
<li><a
href="0f3bd5f2e6"><code>0f3bd5f</code></a>
Add hints for spotbugs.</li>
<li><a
href="c2242c7f3c"><code>c2242c7</code></a>
fix javadoc.</li>
<li><a
href="0a2e4ea5d2"><code>0a2e4ea</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1407">#1407</a>
from capthua/master</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.13.0...byte-buddy-1.14.0">compare
view</a></li>
</ul>
</details>
<br />
Updates `net.bytebuddy:byte-buddy-dep` from 1.13.0 to 1.14.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">net.bytebuddy:byte-buddy-dep's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.14.0</h2>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/blob/master/release-notes.md">net.bytebuddy:byte-buddy-dep's
changelog</a>.</em></p>
<blockquote>
<h3>18. February 2023: version 1.14.0</h3>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00da41ec54"><code>00da41e</code></a>
[maven-release-plugin] prepare release byte-buddy-1.14.0</li>
<li><a
href="c601a7886a"><code>c601a78</code></a>
[release] Release new version</li>
<li><a
href="102ee25440"><code>102ee25</code></a>
Avoid test execution on Java 7.</li>
<li><a
href="3b5f4dcb8a"><code>3b5f4dc</code></a>
Remove unused packages.</li>
<li><a
href="b42f78b2a5"><code>b42f78b</code></a>
Add scheme part to URI.</li>
<li><a
href="d94d66a18c"><code>d94d66a</code></a>
Add scheme part to URI.</li>
<li><a
href="aaa18f29c9"><code>aaa18f2</code></a>
Adjust expectation for dynamic lambda invocation.</li>
<li><a
href="0f3bd5f2e6"><code>0f3bd5f</code></a>
Add hints for spotbugs.</li>
<li><a
href="c2242c7f3c"><code>c2242c7</code></a>
fix javadoc.</li>
<li><a
href="0a2e4ea5d2"><code>0a2e4ea</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1407">#1407</a>
from capthua/master</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.13.0...byte-buddy-1.14.0">compare
view</a></li>
</ul>
</details>
<br />
Updates `net.bytebuddy:byte-buddy-agent` from 1.13.0 to 1.14.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">net.bytebuddy:byte-buddy-agent's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.14.0</h2>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/blob/master/release-notes.md">net.bytebuddy:byte-buddy-agent's
changelog</a>.</em></p>
<blockquote>
<h3>18. February 2023: version 1.14.0</h3>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00da41ec54"><code>00da41e</code></a>
[maven-release-plugin] prepare release byte-buddy-1.14.0</li>
<li><a
href="c601a7886a"><code>c601a78</code></a>
[release] Release new version</li>
<li><a
href="102ee25440"><code>102ee25</code></a>
Avoid test execution on Java 7.</li>
<li><a
href="3b5f4dcb8a"><code>3b5f4dc</code></a>
Remove unused packages.</li>
<li><a
href="b42f78b2a5"><code>b42f78b</code></a>
Add scheme part to URI.</li>
<li><a
href="d94d66a18c"><code>d94d66a</code></a>
Add scheme part to URI.</li>
<li><a
href="aaa18f29c9"><code>aaa18f2</code></a>
Adjust expectation for dynamic lambda invocation.</li>
<li><a
href="0f3bd5f2e6"><code>0f3bd5f</code></a>
Add hints for spotbugs.</li>
<li><a
href="c2242c7f3c"><code>c2242c7</code></a>
fix javadoc.</li>
<li><a
href="0a2e4ea5d2"><code>0a2e4ea</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1407">#1407</a>
from capthua/master</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.13.0...byte-buddy-1.14.0">compare
view</a></li>
</ul>
</details>
<br />
Updates `net.bytebuddy:byte-buddy-gradle-plugin` from 1.13.0 to 1.14.0
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
Bumps
[net.bytebuddy:byte-buddy-dep](https://github.com/raphw/byte-buddy) from
1.13.0 to 1.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">net.bytebuddy:byte-buddy-dep's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.14.0</h2>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/blob/master/release-notes.md">net.bytebuddy:byte-buddy-dep's
changelog</a>.</em></p>
<blockquote>
<h3>18. February 2023: version 1.14.0</h3>
<ul>
<li>Add <code>Step.Factory.ForDelegation</code> in
<code>MemberSubstitution</code> that allows for delegation similar to
<code>MethodDelegation</code> but in-code.</li>
<li>Add handlers for <code>MethodDelegation</code> and
<code>Advice</code> that leverage method handles for field access and
self-invocation.</li>
<li>Add <code>Step.Factory</code> for type assignment that allows
casting the return value from a previous step to another type.</li>
<li>Avoid usage of <code>URL</code> class loader as it is deprecated,
and use newer method if available.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00da41ec54"><code>00da41e</code></a>
[maven-release-plugin] prepare release byte-buddy-1.14.0</li>
<li><a
href="c601a7886a"><code>c601a78</code></a>
[release] Release new version</li>
<li><a
href="102ee25440"><code>102ee25</code></a>
Avoid test execution on Java 7.</li>
<li><a
href="3b5f4dcb8a"><code>3b5f4dc</code></a>
Remove unused packages.</li>
<li><a
href="b42f78b2a5"><code>b42f78b</code></a>
Add scheme part to URI.</li>
<li><a
href="d94d66a18c"><code>d94d66a</code></a>
Add scheme part to URI.</li>
<li><a
href="aaa18f29c9"><code>aaa18f2</code></a>
Adjust expectation for dynamic lambda invocation.</li>
<li><a
href="0f3bd5f2e6"><code>0f3bd5f</code></a>
Add hints for spotbugs.</li>
<li><a
href="c2242c7f3c"><code>c2242c7</code></a>
fix javadoc.</li>
<li><a
href="0a2e4ea5d2"><code>0a2e4ea</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1407">#1407</a>
from capthua/master</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.13.0...byte-buddy-1.14.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.github.ben-manes.versions from 0.45.0 to 0.46.0.
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Another part of #932
In this PR I changed all the library instrumentation packages -- these
are breaking changes, so I figured the earlier we do this the less
painful it'll be to the users. I know that at least some of them are
actively used, so we'll need to spell this out in the release notes.
---------
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>