Commit Graph

482 Commits

Author SHA1 Message Date
Lauri Tulmin dd32ff30f1
Improve compatibility with other agents (#7916)
Fixes the issue described in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7887
Hopefully resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7594
We should not use cached `TypeDescription` for currently transformed
class as the cached description will not be the same as newly created
one if the class bytes were transformed. For example if another agent
adds an interface to the class then returning the cached description
that does not have that interface would result in bytebuddy removing
that interface, see
665a090c73/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java (L5012)
2023-03-01 09:06:59 +02:00
jason plumb 7e187f78e7
Add additional groovy classloaders to ignore list. (#7460)
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.
2023-02-23 09:39:54 -08:00
Lauri Tulmin cde6c98666
Tests need to reset GlobalEventEmitterProvider (#7810)
After sdk update we have new flaky tests

https://ge.opentelemetry.io/s/qozoj3c4zxmge/tests/:javaagent-tooling:test/io.opentelemetry.javaagent.test.HelperInjectionTest/helpers%20injected%20on%20bootstrap%20classloader?top-execution=1

https://ge.opentelemetry.io/s/qozoj3c4zxmge/tests/:javaagent-tooling:test/io.opentelemetry.javaagent.tooling.OpenTelemetryInstallerTest/should%20initialize%20GlobalOpenTelemetry?top-execution=1
2023-02-14 16:43:55 +02:00
Lauri Tulmin 3d571c329a
Reformat comment (#7713) 2023-02-02 14:22:02 +00:00
Steve Dodge 00ae25b89c
Ignore janino classloader (#7710)
Fixes #7670

These obscure classloaders should be ignored completely, they process
in-line class creation and should not branch out to interactions that
are useful in distributed tracing. These two are responsible for outages
recently in many of our applications due to driving up memory usage from
WeakKey caching. In some cases, janino processing has ran wild and
stimulated over 5.7mil WeakKey objects accounting for close to 200MB of
heap.
2023-02-02 15:18:35 +01:00
Mateusz Rzeszutek d89932098a
Disable YodaCondition check and revert some of the changes (#7596)
Let's keep close to the SDK repo config. 

I reverted some of the changes, only left those that I think make sense
anyway (e.g. comparing enums with `==`)
2023-01-17 19:44:15 -08:00
Mateusz Rzeszutek 18cffb7aeb
Make config file available in early agent initialization phase (#7550)
Fixes #7540

I think this kind of early config might be useful in general -- for
instance, I think I'd like to use it for properties introduced in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7339
2023-01-11 20:26:28 -08:00
dependabot[bot] f335861136
Bump errorProneVersion from 2.17.0 to 2.18.0 (#7532)
Bumps `errorProneVersion` from 2.17.0 to 2.18.0.
Updates `error_prone_annotations` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_annotations's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_core` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_core's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_test_helpers` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_test_helpers's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />


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: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-11 20:25:46 -08:00
wallezhang 13be0e2307
Shade `application.io.opentelemetry` in agent extension class loader (#7519)
Related issue #7518 

Add shade rule `application.io.opentelemetry` in
`io.opentelemetry.javaagent.tooling.RemappingUrlConnection` class.

Closed #7518

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-11 20:25:22 -08:00
Mateusz Rzeszutek bb7a12dc8f
Muzzle logs should be logged using the io.opentelemetry.* logger name (#7446)
Also, log them on DEBUG when debug mode is off.
Related to
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7339
2023-01-11 20:18:45 -08:00
dependabot[bot] 0a045e3a00
Bump errorProneVersion from 2.16 to 2.17.0 (#7489)
Bumps `errorProneVersion` from 2.16 to 2.17.0.
Updates `error_prone_annotations` from 2.16 to 2.17.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_annotations's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.17.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/AvoidObjectArrays"><code>AvoidObjectArrays</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/Finalize"><code>Finalize</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/IgnoredPureGetter"><code>IgnoredPureGetter</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/ProtoFieldNullComparison"><code>ImpossibleNullComparison</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/MathAbsoluteNegative"><code>MathAbsoluteNegative</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/NewFileSystem"><code>NewFileSystem</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/StatementSwitchToExpressionSwitch"><code>StatementSwitchToExpressionSwitch</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnqualifiedYield"><code>UnqualifiedYield</code></a></li>
</ul>
<p>Fixed issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2321">#2321</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3144">#3144</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3297">#3297</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3428">#3428</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3437">#3437</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3462">#3462</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3482">#3482</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3494">#3494</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">https://github.com/google/error-prone/compare/v2.16...v2.17.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="27de40ba60"><code>27de40b</code></a>
Release Error Prone 2.17.0</li>
<li><a
href="bcf4dcf764"><code>bcf4dcf</code></a>
Optimize checks that report exactly the same fix in multiple
diagnostics, lik...</li>
<li><a
href="8ddb7cbb05"><code>8ddb7cb</code></a>
Record Error Prone initialization time</li>
<li><a
href="1d23141bd7"><code>1d23141</code></a>
Do the expensive bit last in UnusedMethod.</li>
<li><a
href="e3602572b0"><code>e360257</code></a>
Fix yet another NonCanonicalType crash</li>
<li><a
href="5768290a15"><code>5768290</code></a>
Make UnusedMethod recognize com.google.acai annotations,
com.google.caliper.B...</li>
<li><a
href="7340bdf01d"><code>7340bdf</code></a>
Audit EP checks for argumentless mock().</li>
<li><a
href="b92c9b1b55"><code>b92c9b1</code></a>
Rip out GuardedBy:CheckMemberReferences.</li>
<li><a
href="63fb30be3f"><code>63fb30b</code></a>
Have InvalidLink provide a hint about erasure if it sees &lt; in an
invalid meth...</li>
<li><a
href="4a5fd7bd5a"><code>4a5fd7b</code></a>
Suppress FieldCanBeLocal based on unused prefices.</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_core` from 2.16 to 2.17.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_core's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.17.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/AvoidObjectArrays"><code>AvoidObjectArrays</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/Finalize"><code>Finalize</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/IgnoredPureGetter"><code>IgnoredPureGetter</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/ProtoFieldNullComparison"><code>ImpossibleNullComparison</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/MathAbsoluteNegative"><code>MathAbsoluteNegative</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/NewFileSystem"><code>NewFileSystem</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/StatementSwitchToExpressionSwitch"><code>StatementSwitchToExpressionSwitch</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnqualifiedYield"><code>UnqualifiedYield</code></a></li>
</ul>
<p>Fixed issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2321">#2321</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3144">#3144</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3297">#3297</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3428">#3428</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3437">#3437</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3462">#3462</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3482">#3482</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3494">#3494</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">https://github.com/google/error-prone/compare/v2.16...v2.17.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="27de40ba60"><code>27de40b</code></a>
Release Error Prone 2.17.0</li>
<li><a
href="bcf4dcf764"><code>bcf4dcf</code></a>
Optimize checks that report exactly the same fix in multiple
diagnostics, lik...</li>
<li><a
href="8ddb7cbb05"><code>8ddb7cb</code></a>
Record Error Prone initialization time</li>
<li><a
href="1d23141bd7"><code>1d23141</code></a>
Do the expensive bit last in UnusedMethod.</li>
<li><a
href="e3602572b0"><code>e360257</code></a>
Fix yet another NonCanonicalType crash</li>
<li><a
href="5768290a15"><code>5768290</code></a>
Make UnusedMethod recognize com.google.acai annotations,
com.google.caliper.B...</li>
<li><a
href="7340bdf01d"><code>7340bdf</code></a>
Audit EP checks for argumentless mock().</li>
<li><a
href="b92c9b1b55"><code>b92c9b1</code></a>
Rip out GuardedBy:CheckMemberReferences.</li>
<li><a
href="63fb30be3f"><code>63fb30b</code></a>
Have InvalidLink provide a hint about erasure if it sees &lt; in an
invalid meth...</li>
<li><a
href="4a5fd7bd5a"><code>4a5fd7b</code></a>
Suppress FieldCanBeLocal based on unused prefices.</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_test_helpers` from 2.16 to 2.17.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_test_helpers's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.17.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/AvoidObjectArrays"><code>AvoidObjectArrays</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/Finalize"><code>Finalize</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/IgnoredPureGetter"><code>IgnoredPureGetter</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/ProtoFieldNullComparison"><code>ImpossibleNullComparison</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/MathAbsoluteNegative"><code>MathAbsoluteNegative</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/NewFileSystem"><code>NewFileSystem</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/StatementSwitchToExpressionSwitch"><code>StatementSwitchToExpressionSwitch</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnqualifiedYield"><code>UnqualifiedYield</code></a></li>
</ul>
<p>Fixed issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2321">#2321</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3144">#3144</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3297">#3297</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3428">#3428</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3437">#3437</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3462">#3462</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3482">#3482</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3494">#3494</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">https://github.com/google/error-prone/compare/v2.16...v2.17.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="27de40ba60"><code>27de40b</code></a>
Release Error Prone 2.17.0</li>
<li><a
href="bcf4dcf764"><code>bcf4dcf</code></a>
Optimize checks that report exactly the same fix in multiple
diagnostics, lik...</li>
<li><a
href="8ddb7cbb05"><code>8ddb7cb</code></a>
Record Error Prone initialization time</li>
<li><a
href="1d23141bd7"><code>1d23141</code></a>
Do the expensive bit last in UnusedMethod.</li>
<li><a
href="e3602572b0"><code>e360257</code></a>
Fix yet another NonCanonicalType crash</li>
<li><a
href="5768290a15"><code>5768290</code></a>
Make UnusedMethod recognize com.google.acai annotations,
com.google.caliper.B...</li>
<li><a
href="7340bdf01d"><code>7340bdf</code></a>
Audit EP checks for argumentless mock().</li>
<li><a
href="b92c9b1b55"><code>b92c9b1</code></a>
Rip out GuardedBy:CheckMemberReferences.</li>
<li><a
href="63fb30be3f"><code>63fb30b</code></a>
Have InvalidLink provide a hint about erasure if it sees &lt; in an
invalid meth...</li>
<li><a
href="4a5fd7bd5a"><code>4a5fd7b</code></a>
Suppress FieldCanBeLocal based on unused prefices.</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.16...v2.17.0">compare
view</a></li>
</ul>
</details>
<br />


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: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-03 11:49:41 -08:00
Mateusz Rzeszutek 59f00dfc64
Remove remaining context class loader mentions (#7419)
Continuation of #7391
2022-12-14 10:21:41 -08:00
Mateusz Rzeszutek c03bfc255b
Don't call Thread#setContextClassLoader() (#7391)
Related to #7220

Unfortunately it doesn't fix the aforementioned issue; while the CL used
is no longer the agent classloader, gauge collection still throws that
error.
Still, I think this is a good change that removes one source of agent's
CL leaking into application runtime.
2022-12-13 10:24:40 -08:00
Lauri Tulmin 52cfafc44a
Clean WeakConcurrentMap from background thread (#6240)
Currently our `WeakConcurrentMap` is only cleaned of stale entries when
it is accessed. There is an option to clean from a background thread,
but this creates a separate thread for every map. This pr introduces a
single background thread that cleans all maps.
I removed the option to create a thread per map as we don't use it, if
there is interest I could attempt to find a way to add it back.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-23 09:24:51 -08:00
Mateusz Rzeszutek 82a3fe3001
Use otel.sdk.disabled property instead of the deprecated one (#7270) 2022-11-22 08:29:33 -08:00
Lauri Tulmin ae49d4f642
Fix rabbitmq latest deps test (#7262)
Resolves #7269

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-21 20:24:40 -08:00
jack-berg 94ba33e395
Use contrib AwsXrayPropagator (#7234)
Reflects move of `AwsXrayPropagator` to
[opentelemetry-java-contrib/aws-xray-propagator](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-xray-propagator).
2022-11-21 11:31:17 -08:00
dependabot[bot] 12f7871848
Bump byteBuddyVersion from 1.12.18 to 1.12.19 in /dependencyManagement (#7231)
Bumps `byteBuddyVersion` from 1.12.18 to 1.12.19.
Updates `byte-buddy` from 1.12.18 to 1.12.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">byte-buddy's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.12.19</h2>
<ul>
<li>Avoid possible lock through circular class loading of
<code>TypeDescription</code> subtypes.</li>
<li>Avoid access error when using unsafe API on Java 17 with an active
security manager.</li>
<li>Close URL class loader used in Gradle plugin.</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">byte-buddy's
changelog</a>.</em></p>
<blockquote>
<h2>Byte Buddy release notes</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c93425a1e9"><code>c93425a</code></a>
[maven-release-plugin] prepare release byte-buddy-1.12.19</li>
<li><a
href="b1f4e9b4ee"><code>b1f4e9b</code></a>
[release] New release</li>
<li><a
href="8d17e3a2a3"><code>8d17e3a</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1359">#1359</a>
from eyalkoren/protection-domain</li>
<li><a
href="c57139e69c"><code>c57139e</code></a>
Using explicit ProtectionDomain in dynamically loaded classes</li>
<li><a
href="ff8be9a91b"><code>ff8be9a</code></a>
Attempt cloning protection domain from accessible object to avoid
security ma...</li>
<li><a
href="6fe45f76ef"><code>6fe45f7</code></a>
Make s in message optional.</li>
<li><a
href="9023501243"><code>9023501</code></a>
Fix scope of summary variable.</li>
<li><a
href="02091f13f4"><code>02091f1</code></a>
Update codeql-analysis.yml</li>
<li><a
href="628b6a90c5"><code>628b6a9</code></a>
Close class loader in Gradle plugin, if possible.</li>
<li><a
href="9a81856525"><code>9a81856</code></a>
Remove unused import.</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.18...byte-buddy-1.12.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `byte-buddy-dep` from 1.12.18 to 1.12.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">byte-buddy-dep's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.12.19</h2>
<ul>
<li>Avoid possible lock through circular class loading of
<code>TypeDescription</code> subtypes.</li>
<li>Avoid access error when using unsafe API on Java 17 with an active
security manager.</li>
<li>Close URL class loader used in Gradle plugin.</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">byte-buddy-dep's
changelog</a>.</em></p>
<blockquote>
<h2>Byte Buddy release notes</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c93425a1e9"><code>c93425a</code></a>
[maven-release-plugin] prepare release byte-buddy-1.12.19</li>
<li><a
href="b1f4e9b4ee"><code>b1f4e9b</code></a>
[release] New release</li>
<li><a
href="8d17e3a2a3"><code>8d17e3a</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1359">#1359</a>
from eyalkoren/protection-domain</li>
<li><a
href="c57139e69c"><code>c57139e</code></a>
Using explicit ProtectionDomain in dynamically loaded classes</li>
<li><a
href="ff8be9a91b"><code>ff8be9a</code></a>
Attempt cloning protection domain from accessible object to avoid
security ma...</li>
<li><a
href="6fe45f76ef"><code>6fe45f7</code></a>
Make s in message optional.</li>
<li><a
href="9023501243"><code>9023501</code></a>
Fix scope of summary variable.</li>
<li><a
href="02091f13f4"><code>02091f1</code></a>
Update codeql-analysis.yml</li>
<li><a
href="628b6a90c5"><code>628b6a9</code></a>
Close class loader in Gradle plugin, if possible.</li>
<li><a
href="9a81856525"><code>9a81856</code></a>
Remove unused import.</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.18...byte-buddy-1.12.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `byte-buddy-agent` from 1.12.18 to 1.12.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">byte-buddy-agent's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.12.19</h2>
<ul>
<li>Avoid possible lock through circular class loading of
<code>TypeDescription</code> subtypes.</li>
<li>Avoid access error when using unsafe API on Java 17 with an active
security manager.</li>
<li>Close URL class loader used in Gradle plugin.</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">byte-buddy-agent's
changelog</a>.</em></p>
<blockquote>
<h2>Byte Buddy release notes</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c93425a1e9"><code>c93425a</code></a>
[maven-release-plugin] prepare release byte-buddy-1.12.19</li>
<li><a
href="b1f4e9b4ee"><code>b1f4e9b</code></a>
[release] New release</li>
<li><a
href="8d17e3a2a3"><code>8d17e3a</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1359">#1359</a>
from eyalkoren/protection-domain</li>
<li><a
href="c57139e69c"><code>c57139e</code></a>
Using explicit ProtectionDomain in dynamically loaded classes</li>
<li><a
href="ff8be9a91b"><code>ff8be9a</code></a>
Attempt cloning protection domain from accessible object to avoid
security ma...</li>
<li><a
href="6fe45f76ef"><code>6fe45f7</code></a>
Make s in message optional.</li>
<li><a
href="9023501243"><code>9023501</code></a>
Fix scope of summary variable.</li>
<li><a
href="02091f13f4"><code>02091f1</code></a>
Update codeql-analysis.yml</li>
<li><a
href="628b6a90c5"><code>628b6a9</code></a>
Close class loader in Gradle plugin, if possible.</li>
<li><a
href="9a81856525"><code>9a81856</code></a>
Remove unused import.</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.18...byte-buddy-1.12.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `byte-buddy-gradle-plugin` from 1.12.18 to 1.12.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/raphw/byte-buddy/releases">byte-buddy-gradle-plugin's
releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.12.19</h2>
<ul>
<li>Avoid possible lock through circular class loading of
<code>TypeDescription</code> subtypes.</li>
<li>Avoid access error when using unsafe API on Java 17 with an active
security manager.</li>
<li>Close URL class loader used in Gradle plugin.</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">byte-buddy-gradle-plugin's
changelog</a>.</em></p>
<blockquote>
<h2>Byte Buddy release notes</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c93425a1e9"><code>c93425a</code></a>
[maven-release-plugin] prepare release byte-buddy-1.12.19</li>
<li><a
href="b1f4e9b4ee"><code>b1f4e9b</code></a>
[release] New release</li>
<li><a
href="8d17e3a2a3"><code>8d17e3a</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/raphw/byte-buddy/issues/1359">#1359</a>
from eyalkoren/protection-domain</li>
<li><a
href="c57139e69c"><code>c57139e</code></a>
Using explicit ProtectionDomain in dynamically loaded classes</li>
<li><a
href="ff8be9a91b"><code>ff8be9a</code></a>
Attempt cloning protection domain from accessible object to avoid
security ma...</li>
<li><a
href="6fe45f76ef"><code>6fe45f7</code></a>
Make s in message optional.</li>
<li><a
href="9023501243"><code>9023501</code></a>
Fix scope of summary variable.</li>
<li><a
href="02091f13f4"><code>02091f1</code></a>
Update codeql-analysis.yml</li>
<li><a
href="628b6a90c5"><code>628b6a9</code></a>
Close class loader in Gradle plugin, if possible.</li>
<li><a
href="9a81856525"><code>9a81856</code></a>
Remove unused import.</li>
<li>Additional commits viewable in <a
href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.18...byte-buddy-1.12.19">compare
view</a></li>
</ul>
</details>
<br />


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: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-11-18 17:06:57 +01:00
jack-berg 97f036c3e5
Stop relocating :instrumentation:resources:library (#7136)
Per the discussion in the today's SIG and this
[comment](https://github.com/open-telemetry/opentelemetry-java/issues/4919#issuecomment-1305774636).

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-15 22:37:17 +00:00
David Boreham c009c79237
Ignore Nashorn's class loader for performance reasons (#7116)
See this discussion thread for background:
https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/6985
2022-11-11 08:16:39 -08:00
jason plumb d6010b2976
Ignore trino shaded okhttp pool (#7114) 2022-11-09 06:36:18 +01:00
Lauri Tulmin 0c53d1ad8e
Handle UnsupportedClassVersionError in ServiceLoader on jdk9 (#7090)
Hopefully resolves the issue described in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/7084
2022-11-08 08:44:52 -08:00
dependabot[bot] cfb475d7dd
Bump jackson-bom from 2.13.4.20221013 to 2.14.0 in /dependencyManagement (#7091)
Bumps [jackson-bom](https://github.com/FasterXML/jackson-bom) from
2.13.4.20221013 to 2.14.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cd99403b64"><code>cd99403</code></a>
[maven-release-plugin] prepare release jackson-bom-2.14.0</li>
<li><a
href="50dedf02e5"><code>50dedf0</code></a>
Prepare for 2.14.0</li>
<li><a
href="69023b4ec9"><code>69023b4</code></a>
Back to snapshots</li>
<li><a
href="ffb3dd2940"><code>ffb3dd2</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li><a
href="229c0be857"><code>229c0be</code></a>
[maven-release-plugin] prepare release jackson-bom-2.14.0-rc3</li>
<li><a
href="b3e3950eb7"><code>b3e3950</code></a>
Prepare for 2.14.0-rc3 release</li>
<li><a
href="babf49afc8"><code>babf49a</code></a>
Merge branch '2.13' into 2.14</li>
<li><a
href="f52258f22a"><code>f52258f</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li><a
href="20416ee364"><code>20416ee</code></a>
Merge branch '2.13' into 2.14</li>
<li><a
href="fd343f3524"><code>fd343f3</code></a>
Merge branch '2.13' into 2.14</li>
<li>Additional commits viewable in <a
href="https://github.com/FasterXML/jackson-bom/compare/jackson-bom-2.13.4.20221013...jackson-bom-2.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.fasterxml.jackson:jackson-bom&package-manager=gradle&previous-version=2.13.4.20221013&new-version=2.14.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>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-08 13:19:09 +01:00
jason plumb 6f9ca0b80b
Ignore presto-jdbc shaded okhttp3 connection pool. (#7031)
This holds onto span context if not ignored. For vanilla `okhttp3` we
have an explicit ignore in the `OkHttp3IgnoredTypesConfigurer` class,
but `presto-jdbc` repackages okhttp3 when it shades it.
2022-11-03 11:04:57 +01:00
jack-berg aeac361816
Upgrade to otel java 1.19.0 (#6757)
Working PR to capture all the changes required to update to otel java
1.19.0. The new log API force allows
`:instrumentation-appender-api-internal` and
`:instrumentation-appender-sdk-internal`, but necessitates a decent
amount of refactoring as a result.

The PR points at the `1.19.0-SNAPSHOT`, which I'll update upon
publication.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-10-12 09:19:37 -07:00
Trask Stalnaker 429ecfc713
Update error prone (#6646)
(note that change from BDDMockito is due to
https://github.com/google/error-prone/issues/3396)
2022-09-23 11:24:40 -07:00
Trask Stalnaker e7dd21477d
Update bytebuddy core dependency, and make dependencies more dependabot friendly (#6704)
(probably need to revisit later what's a "core dependency" and what's
not, but doesn't seem to be any real difference other than organization)
2022-09-22 09:53:53 -07:00
Mateusz Rzeszutek ff498261c3
Fix the order of configuration file application (#6697)
Fixes #6696
2022-09-21 14:30:40 -07:00
Mateusz Rzeszutek 8b2b3281fe
Encapsulate logging (#6543)
* Encapsulate actual logging implementation better

* Apply suggestions from code review

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

* code review comments

* revert to the old slf4j package name

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-09-12 13:22:26 -07:00
Mateusz Rzeszutek 7b139e9df9
Remove agent's Ordered interface and use the SDK one (#6589) 2022-09-12 12:15:18 -07:00
Trask Stalnaker af61a8b578
Update to otel 1.18.0 (#6575) 2022-09-11 10:35:05 -07:00
Mateusz Rzeszutek 0d6f0b15d0
Update dependencies (#6499)
* Update dependencies

* Strictly pin slf4j and logback versions

* logback 1.3

* Only use slf4j 2.0.0 internally in the javaagent

* Pre-initialize slf4j provider

* Bump jackson version

* licenses
2022-09-06 13:04:30 -07:00
Mateusz Rzeszutek 59cb9ca0df
Remove deprecated code (#6501)
* Remove deprecated code

* unnecessary semicolon

* fix distro and extension examples
2022-08-24 14:36:57 -07:00
Mateusz Rzeszutek fdc325e209
Deprecate agent config SPIs (#6476) 2022-08-18 10:28:16 +02:00
Mateusz Rzeszutek 08f013f9d6
Update gradle to 7.5.1 (#6359)
* Update gradle to 7.5

* Bump to 7.5.1

* gradle 7.5.1 with jdk17

* spotless

* one more --add-opens

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-08-12 12:03:43 +02:00
Trask Stalnaker 68a9f20eb3
Enable PrivateConstructorForUtilityClass errorprone check (#6427)
* PrivateConstructorForUtilityClass

* Advice

* More advice

* More

* More advice

* More

* Spotless

* Fix

* Fix

* Fix

* A better solution

* Revert

* More

* Fix

* Spotless

* Fix
2022-08-10 11:30:22 +03:00
Mateusz Rzeszutek 976ab9411c
Deprecate Config (#6360)
* Deprecate Config

* suppress deprecation on ConfigTest
2022-07-25 12:10:11 -07:00
Lauri Tulmin 57c9072df3
Instrumenting classes with missing method return or parameter types (#6286)
* Allow instrumenting classes with missing method return or parameter types

* add test
2022-07-18 19:13:10 -07:00
Mateusz Rzeszutek b917b3bf9c
Use ConfigProperties instead of Config in the agent code (#6322)
* Use ConfigProperties instead of Config in the agent code

* Fix merge conflict

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-07-18 19:04:48 -07:00
Mateusz Rzeszutek db1250d8c9
Add a dropwizard-metrics -> OTel metrics bridge (#6259)
* Add a dropwizard-metrics -> OTel metrics bridge

* disable by default

* enable metrics for test
2022-07-15 14:48:52 -07:00
Mateusz Rzeszutek a559effa01
Remove config property name normalization (#6320)
* Remove config property name normalization

* fix test
2022-07-13 15:33:04 -07:00
Mateusz Rzeszutek 35c63a4184
Remove the 'noop API' feature (#6313)
* Remove the 'noop API' feature

* remove noop api dep

* fix tooling tests
2022-07-12 10:36:19 -07:00
Mateusz Rzeszutek b23db97a28
Use ConfigProperties in javaagent SPIs (#6285)
* Use ConfigProperties in javaagent SPIs

* remove deprecated

* errorprone

* fix javaagent build

* fix javaagent-tooling tests

* spotless
2022-07-12 08:41:01 +02:00
Trask Stalnaker 177f0aec7c
Rename instrumentation-api-annotation-support (#6288) 2022-07-08 17:07:41 -07:00
Mateusz Rzeszutek e7887ac929
Idea: deprecate `Config`, add agent-only `InstrumentationConfig` (#6264)
* Idea: deprecate Config, add agent-only InstrumentationConfig

* fix

* fix camel test

* fix external-annotation tests
2022-07-08 16:20:49 +02:00
Mateusz Rzeszutek 198dad00d6
Prefer using ConfigProperties over Config in AgentListener (#6202)
* Prefer using ConfigProperties over Config in AgentListener

* normalize property name

* add TODOs
2022-07-07 15:44:32 +02:00
Trask Stalnaker 701ed54311
Use "class loader" instead of "classloader" consistently in docs and comments (#6236)
* Use "class loader" consistently instead of classloader

* Java comments too

* Fix bad merge
2022-06-30 14:57:07 -07:00
Mateusz Rzeszutek 4c5ce632f5
Support metric view configuration file in the Javaagent (#6228) 2022-06-29 22:11:49 -07:00
Trask Stalnaker 8fac01e736
Enable error prone's UnusedVariable check (#6217)
* Enable error prone's UnusedVariable check

* Spotless
2022-06-27 10:55:27 +02:00
Trask Stalnaker 1e439e73d3
Update to OpenTelemetry SDK 1.15.0 (#6170) 2022-06-14 09:44:42 -08:00
Lauri Tulmin 091197a128
Allow specifying a comma separated list of extensions (#6137)
* Allow specifying a comma separated list of extensions

* update doc

* typo

* Update examples/extension/README.md

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-06-08 13:34:37 +03:00
Trask Stalnaker 9c2e508e20
Fix debug logging (#6085)
* Fix debug logging

* Add a test
2022-05-24 11:06:38 +03:00
Mateusz Rzeszutek cb7421c592
Add an SPI for customizing Config just before it's set (#6010)
* Add an SPI for customizing Config just before it's set

* deprecate ConfigPropertySource in favor of ConfigCustomizer

* errorprone
2022-05-16 11:55:01 -07:00
Mateusz Rzeszutek 6a0ca530b7
Instrumentation API changes: VirtualField (#6017)
* Instrumentation API changes: VirtualField

* change class name in string constant
2022-05-12 11:17:24 -07:00
Trask Stalnaker d6cf07496d
Add LoggingCustomizer SPI (#5997)
* Add LoggingCustomizer SPI

* Add comment

* suppress

* Re-order

* Also encompass init() itself

* comment
2022-05-11 18:09:12 -07:00
Mateusz Rzeszutek 25d929b5e7
Deprecate the AgentListener#beforeAgent() method (#6006)
* Deprecate the AgentListener#beforeAgent() method

* errorprone
2022-05-10 10:30:40 -07:00
Trask Stalnaker 8afa13eec8
Minor changes to startup code (#5992)
* Minor changes to startup code

* Fix test
2022-05-10 09:26:38 -07:00
Mateusz Rzeszutek d919f84cf8
Merge javaagent-instrumentation-api into javaagent-extension-api (#5936)
* Merge javaagent-instrumentation-api into javaagent-extension-api

* remove some leftover references to javaagent-instrumentation-api

* add missing instrumentation-api to distro example
2022-04-28 20:11:15 -07:00
Trask Stalnaker e3588ceee3
Fix some jul messages (#5930) 2022-04-27 10:33:12 -07:00
wallezhang 90a239d61b
fix: Fix logging exporter autoconfigured judgment logic problem (#5928) 2022-04-25 11:28:44 +03:00
Lauri Tulmin 4d0564a136
Exclude spring temporary type matching class loader (#5912) 2022-04-22 08:32:16 -07:00
Mateusz Rzeszutek 7c760acea6
Move some classes out of `javaagent-instrumentation-api` (#5841)
* Move concurrent instrumentation utils out from javaagent-instrumentation-api

* Move AgentLogEmitterProvider, InstrumentedTaskClasses and OpenTelemetrySdkAccess out of javaagent-instrumentation-api
2022-04-15 12:09:28 -07:00
Trask Stalnaker 4879cedccb
Prevent possible deadlock (#5830) 2022-04-14 15:00:39 -07:00
Lauri Tulmin 3940529dd2
Agent tooling already has access to bootstrap proxy (#5802) 2022-04-11 12:41:30 -07:00
Lauri Tulmin 4ad44909ca
Faster type matching (#5724)
* Faster type matching

* make findLoadedClass accessible on java17

* enable jaxrs instrumentation for quarkus test

* fix websphere

* fix muzzle

* javadoc formating

* ignore classes that are know to fail to load for virtual field transforms

* add back jaxrs and jaxws annotation instrumentations

* Apply suggestions from code review

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

* fix compile error

* comments

* replace deprecated method usage

* add comment

* add an spi to get access to bootstrap proxy from muzzle module

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-04-08 10:38:50 -07:00
Anuraag Agrawal 7e428168ff
Update dependencies (#5777)
* Update dependencies

* Update licenses

* Exclude licenses from link check

* Exclude licenses from link check?
2022-04-08 20:00:53 +09:00
Mateusz Rzeszutek 519024485c
Move Cache and related classes to internal package (#5759)
* Move Cache and related classes to internal package

* fix imports
2022-04-06 18:12:11 -07:00
Mateusz Rzeszutek 65717dae3e
Cleanup Config & ConfigBuilder API (#5733)
* Cleanup Config & ConfigBuilder API

* errorprone

* errorprone & spotless

* spotless
2022-04-05 20:20:52 -07:00
Mateusz Rzeszutek 8e722cc264
Library instrumentation should read its version from a file (#5692)
* Library instrumentation should read its version from a file

* errorprone

* animalsniffer

* code review comments

* add name as task input too

* code review comments
2022-04-04 11:52:23 -07:00
Mateusz Rzeszutek 2fd167cfe0
Move BootstrapPackagesConfigurer to javaagent-tooling (#5734) 2022-04-01 11:33:07 -07:00
Lauri Tulmin c9ec6f2d5d
Fix flaky exception handler test (#5730) 2022-04-01 11:18:01 -07:00
Mateusz Rzeszutek 7bc748a2ff
Make it possible to register multiple helper resources under the same… (#5703)
* Make it possible to register multiple helper resources under the same name

* go back to using the old property in tests after all

* code review comments
2022-03-31 11:51:46 +02:00
Mateusz Rzeszutek b668e73e13
Convert all logging statements from slf4j to jul (#5674)
* Convert all logging statements from slf4j to jul

* code review comments

* fix tests

* Fix randomly failing test
2022-03-25 10:02:51 -07:00
Anuraag Agrawal 14372adb68
Migrate Guava tests to Java (#5668)
* Migrate Guava tests to Java

* Update instrumentation/guava-10.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/guava/ListenableFutureTest.java

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

* Workaround inline mock issue

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-03-24 14:14:09 +09:00
Mateusz Rzeszutek 56f65e4fab
Convert all logging statements from slf4j to jul - part 1 (#5628)
* Convert all logging statements from slf4j to jul - part 1

* fix tests

* use placeholders

* fixed all comments, added static imports for Level
2022-03-22 10:35:27 -07:00
Lauri Tulmin c461d22d83
Define helper classes in loadClass (#5528)
* Define helper classes in loadClass similarly to regular classes

* fix test

* spotless

* address review comments
2022-03-09 09:12:25 -08:00
Anuraag Agrawal 36b758e600
Add jaeger remote sampler to agent (#5346) 2022-02-11 16:40:26 +09:00
Anuraag Agrawal 791083eedf
Remove separate exporter configuration which we always have in distro… (#5331)
* Remove separate exporter configuration which we always have in distro now.

* Actually remove
2022-02-11 12:11:35 +09:00
Anuraag Agrawal 407e86df2b
Update to Otel 1.11.0 (#5322)
* Update to OTel 1.11

* Suppress gRPC export usage warning
2022-02-09 12:53:09 +09:00
Trask Stalnaker 0510ca6188
Remove slim artifact (#5251)
* Remove slim artifact

* Fix build

* Revert one change
2022-01-27 08:31:46 -08:00
Anuraag Agrawal e6e2190f68
Fix most lint warnings. (#5180)
* Fix most lint warnings.

* Fix test
2022-01-20 18:28:45 +09: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
Lauri Tulmin c76345a973
Always set parent of agent class loader to bootstrap class loader (#5169)
* Always set parent of agent class loader to bootstrap class loader

* remove parent class loader argument
2022-01-18 19:36:28 -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
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
Lauri Tulmin 40ce04028a
Fix flaky OpenTelemetryInstallerTest (#5123) 2022-01-14 10:22:44 -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
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
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 25550e0a63
Stop using deprecated constructor (#5040)
* Stop using deprecated constructor

* Try to fix the build
2022-01-07 11:47:54 -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 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 e5da618196
Add logs to testing infra (#4927)
* Add logs to testing infra

* Drift
2021-12-17 18:23:42 -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
Mateusz Rzeszutek 93a3282490
Remove ConfigPropertiesAdatpter as it's no longer needed (#4888) 2021-12-13 12:20:11 -08:00
jack-berg 45dca4fc5d
Expose AutoConfiguredOpenTelemetrySdk to AgentListener (#4831)
* Expose AutoConfiguredOpenTelemetrySdk to AgentListener

* Only call AgentListener if noop is disabled, deprecate AgentListener methods

* Call AgentListener in DelayedAfterAgentCallback
2021-12-10 12:55:57 -08:00
Nikita Salnikov-Tarnovski a70682c390
Remove unhelpful benchmarks (#4766)
* Remove unhelpful benchmarks

* Restore one more benchmark

* spotless
2021-12-02 17:17:39 +02:00
Lauri Tulmin f5142f24e9
Remove internal-proxy instrumentation (#4749) 2021-11-30 07:56:26 -08:00
Lauri Tulmin 1e371377a1
Fix build (#4743)
* Fix build

* avoid npe
2021-11-30 14:07:07 +02:00