Commit Graph

2417 Commits

Author SHA1 Message Date
Mateusz Rzeszutek 245a9f7cf7
Rewrite netty 3.8 tests to Java (#7666)
Part of #7195
2023-01-30 08:46:05 +01:00
Javier Salinas 99e600fff7
Ratpack services OpenTelemetry (#7477)
While using Ratpack Handlers, the context is added by the
`OpenTelemetryServerHandler`

While using Ratpack Services, we might need to add manually the OT
Context into the Ratpack Execution and try to get it from the Execution
in the Ratpack `HttpClient`
2023-01-25 10:28:44 -08:00
Trask Stalnaker b157f14666
Remove unnecessary suppression (#7648)
I accidentally added in #7538
2023-01-25 08:49:14 +01:00
Trask Stalnaker dab33810bb
Convert logging instrumentation tests to Java (#7631)
currently based on #7632
2023-01-24 15:18:39 -08:00
Trask Stalnaker adbd9664f4
Fix some instrumentation scope names (#7632) 2023-01-23 19:46:06 -08:00
jason plumb bb092bf0e5
Fix build (change param type to builder) (#7640)
Looks like there were some merge conflicts around test code in the last
couple of PRs.
I think this will fix up the build.
2023-01-23 16:06:57 -08:00
jason plumb db6b764421
More HTTP testing refactor prework (#7630)
This is another follow-up from #7616. This makes the test options class
immutable and uses `@AutoValue` and `@AutoValue.Builder`. As a result, a
bunch of the configuration/setup code for these said options now flings
around a builder instance. This isn't great, but I think it's an
incremental improvement that can be seen in the `@BeforeAll
AbstractHttpClientTest.setupOptions()` method, where the immutable
options are (finally) instantiated.
2023-01-23 09:42:32 -08:00
Mateusz Rzeszutek 7657b75ddc
Migrate reactor-netty-0.9 tests to java (#7635)
Part of #7195
2023-01-23 09:34:11 -08:00
Mateusz Rzeszutek e1895e548c
Rename all methods in all Getters to use the `get*()` naming scheme (#7619)
Resolves #6562

This PR only contains renames; the actual content is in the `*Getter`
interfaces, the rest of changes is just IntelliJ doing its job.
2023-01-23 09:28:11 +00:00
Andrei Chugunov 9f9d6fee95
webflux 5.0 groovy to java tests part 1 (#7625)
I decided splitting changes on different PRs due to there are a lot of
lines of code in tests here and it should simplify review process.

Another option is I can add additional commit to this PR with conversion
of other groovy files.
2023-01-23 08:59:19 +01:00
jason plumb c5e384fe9f
Http testing refactor prework (#7623)
As part of discussions #7616, the idea of trying to do a more piecemeal
approach came up. A reasonable ask.

This is the first step in refactoring the http client tests. It factors
out the `HttpClientResult` inner class of the `AbstractHttpClientTest`
so that this can be reused by new test framework later. It also factors
the relevant abstract methods in the abstract class to a new type
adapter, which will also be reused.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-20 18:20:42 +00:00
Mateusz Rzeszutek 0223dc3a28
Fix concurrency issue in OpenTelemetryDriver (#7628)
Fixes #7621
2023-01-20 13:28:22 +01:00
Mateusz Rzeszutek 40667ce719
Fix inconsistent handling of net.peer.port in HTTP instrumentations (#7618)
Resolves #4329
2023-01-20 09:57:46 +01:00
Alex Kats eaac709162
Update SQL span name for procedures (#7557)
This PR includes updates to the SQLSanitizer, DbClientSpanNameExtractor
and SqlStatementInfo to name spans according to procedure name for CALL
statements. The updates to the naming logic are in the SqlSanitizer and
table has been renamed to identifier as using the table variable for the
procedure name would not be idiomatic. SqlStatementInfo has been updated
so that the db.sql.table attribute is not included for procedures.
2023-01-19 11:01:36 -08:00
Mateusz Rzeszutek 268165c668
Fix NoClassDefFoundError happening when snakeyaml is used on a custom JRE (#7598)
Fixes #7580
2023-01-19 10:30:18 -08:00
Mateusz Rzeszutek b2f42ec3fa
Encode version in spring instrumentations' package names (#7608)
Part of #932

I wanted to get this done before starting the spring boot starter v3
work.
2023-01-19 10:03:17 +00:00
Andrei Chugunov e6c2254d5c
Cassandra java tests (#7390) 2023-01-18 22:05:57 +00:00
Tav Herzlich b9c10c9607
Add gRPC request metadata instrumentation (#7011)
Solves. #6991 

This PR implements the request portion of the new gRPC metadata
instrumentation spec:

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md#grpc-request-and-response-metadata

The changes include:

- new CommonConfig entry for desired gRPC metadata values:
'otel.instrumentation.grpc.capture-metadata.request'
(Similar to http headers)
- setting the desired metadata values in GrpcTelemetry
- new property in GrpcAttributesExtractor that holds a reference to the
GrpcRpcAttributesGetter
- new property in GrpcAttributesExtractor that stores the desired values
so it can iterate them and extract each one from the request
- inject the GrpcRpcAttributesGetter to GrpcAttributesExtractor (in
GrpcTelemetryBuilder)
- logic in GrpcRpcAttributesGetter to safely extract the gRPC metadata
value
- A new test in GrpcTest that makes sure that when a certain metadata
key name is inserted, it also ends up in the span attributes

** Doesn't take care of the response because gRPC response is not
implemented in java-instrumentation yet. (This is absolutely necessary
but out of scope for this PR)
** "metadataValue" is only implemented inside GrpcRpcAttributesGetter
and not in RpcAttributesGetter to avoid providing implementations for
every RpcAttributesGetter in the repo as this PR only focuses on gRPC.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-01-17 21:18:37 -08: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
dependabot[bot] dfb4a6239d
Bump spotless-plugin-gradle from 6.12.1 to 6.13.0 (#7591) 2023-01-17 19:43:46 -08:00
Mateusz Rzeszutek 743df7b3da
Convert Spring Webflux client tests to Java; add library instrumentat… (#7566)
…ion tests
2023-01-17 11:53:24 +01:00
Amir Blum 911b3b5feb
docs(okhttp): fix class name in README (#7578)
for okhttp-3.0 instrumentation, the README uses `OkHttpTracing`:
```java
import io.opentelemetry.instrumentation.okhttp.v3_0.OkHttpTracing;
...
return OkHttpTracing.builder(openTelemetry).build().newCallFactory(createClient());
```

#5624 changed `OkHttpTracing` to `OkHttpTelemetry` but the docs still
show the previous value which no longer works
2023-01-15 09:10:05 -08:00
Trask Stalnaker 9882f3f901
Fix potential startup failure (#7567)
Can be reproduce (at least on Windows) using

```
java -javaagent:opentelemetry-javaagent.jar anything C:\one
```

producing

```
[otel.javaagent 2023-01-13 11:38:47:978 -0800] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 1.22.0
OpenTelemetry Javaagent failed to start
java.nio.file.InvalidPathException: Illegal char <:> at index 10: anything C:\one
        at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
        at java.base/java.nio.file.Path.of(Path.java:147)
        at java.base/java.nio.file.Paths.get(Paths.java:69)
        at io.opentelemetry.instrumentation.resources.JarServiceNameDetector.getJarPathFromSunCommandLine(JarServiceNameDetector.java:104)
        at io.opentelemetry.instrumentation.resources.JarServiceNameDetector.createResource(JarServiceNameDetector.java:59)
        at io.opentelemetry.sdk.autoconfigure.ResourceConfiguration.configureResource(ResourceConfiguration.java:59)
        at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:332)
        at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:29)
        at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:114)
        at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:94)
        at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:78)
        at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:35)
        at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:57)
        at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:45)
```
2023-01-13 22:51:23 +00:00
Mateusz Rzeszutek ca85a0db3d
Support Spring Web 6 in library instrumentation (#7551)
Part of
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7312
2023-01-12 21:08:15 -08:00
Mateusz Rzeszutek fadd29fa90
Fix build (merge conflict) (#7559)
Resolves #7558
2023-01-12 08:12:44 -08:00
Mateusz Rzeszutek fb5cf9fd97
Support Spring JMS 6.0 (#7438)
Part of #7203

The instrumentation is 100% copy-pasted, tests are rewritten from
scratch in Java because of way too many class name changes.

Depends on
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7418

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-01-12 04:47:45 +00:00
Trask Stalnaker 09b63d2294
Use new reactor contextWrite when available (from reactor 3.4.0) (#7538)
Related to #7107 and #7202

Support WebFlux 6. 

Supporting reactor 3.5 seems pretty straightforward, the
`subscriberContext()` was deprecated in 3.4 in favor of
`contextWrite()`. In 3.5, `subscriberContext()` was removed.

This PR doesn't bump `latestDepTestLibrary` to 3.5 yet because there are
a couple of tests that succeed in 3.4 using `contextWrite()` but fail in
3.5 using `contextWrite()`.

My proposal is to review/merge this PR, and then I can ping our resident
reactor experts to see if they have thoughts on the failing tests in
3.5.
2023-01-11 20:26:12 -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
Mateusz Rzeszutek cd470080b7
Support spring-data 3.0 (test only) (#7376)
Part of #7203
2023-01-11 20:10:38 -08:00
Mateusz Rzeszutek 6603b5d836
Instrument JMS 3.0 (Jakarta) (#7418)
There were so many changes in the tests that extracting a base class
wouldn't really improve the readability; so I just reimplemented them in
Java.
The instrumentation itself is pretty much a copy-paste of the `jms-1.1`
instrumentation, with `s/javax/jakarta/` applied.
2023-01-11 19:54:42 -08:00
Mateusz Rzeszutek ca310b4ddb
Support Spring Web MVC in library instrumentation (#7552)
Part of
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7312

This is pretty much a copy of the `spring-webvmc-5.3:library` module
with `s/javax/jakarta/` applied. I'm planning on removing the 5.3
instrumentation after #7312 is done.
2023-01-11 17:22:55 -08:00
Mateusz Rzeszutek 30de9ff266
Disable internal TaskScheduler spans in Spring Kafka instrumentation (#7553)
Resolves #7511

I used the same pattern we already have for suppressing the wrapping of
the Kafka consumer records lists.
2023-01-11 17:19:43 -08:00
Trask Stalnaker c36b2a156f
Fix muzzle CI (#7547) 2023-01-10 16:40:42 -08:00
jack-berg f0bd7c0504
Make OpenTelemetryAppender.Builder public (#7521)
Allows for programatic configuration as discussed in this [CNCF slack
thread](https://cloud-native.slack.com/archives/C01N5UCHTEH/p1673028580643009).
2023-01-09 09:14:39 -08:00
Lauri Tulmin d0bfc5be0f
Convert vaadin tests to java (#7444)
Part of
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7195
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7417
Vaadin tests often break with a new version of vaadin. To improve this
tests were change to assert only the traces and spans that are common in
all the versions.
2023-01-03 12:46:48 -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 d4d623d272
Fix NPE in servlet AsyncListener on OpenLiberty (#7498)
Fixes #7449
2023-01-03 11:45:21 -08:00
dependabot[bot] 789b66d455
Bump spotless-plugin-gradle from 6.12.0 to 6.12.1 (#7500)
Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless)
from 6.12.0 to 6.12.1.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="718a504c12"><code>718a504</code></a>
Published gradle/6.12.1</li>
<li><a
href="c13acee213"><code>c13acee</code></a>
Published lib/2.31.1</li>
<li><a
href="552aabf876"><code>552aabf</code></a>
fix(deps): update dependency com.facebook:ktfmt to v0.42 (<a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1421">#1421</a>)</li>
<li><a
href="4063e9f6d1"><code>4063e9f</code></a>
Add support for KtLint 0.48.0 (<a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1432">#1432</a>
fixes <a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1430">#1430</a>)</li>
<li><a
href="062e835846"><code>062e835</code></a>
Bump changelogs.</li>
<li><a
href="8f7e00594d"><code>8f7e005</code></a>
spotlessApply</li>
<li><a
href="9a8ccae9ec"><code>9a8ccae</code></a>
Bump default ktfmt 0.41 -&gt; 0.42</li>
<li><a
href="fb4277d2b1"><code>fb4277d</code></a>
Merge branch 'main-ktlint-0.48.0' into renovate/ver_ktfmt</li>
<li><a
href="b44d70d00a"><code>b44d70d</code></a>
Move changelog entries to the correct release.</li>
<li><a
href="b3d8e89002"><code>b3d8e89</code></a>
spotlessApply for 2023</li>
<li>Additional commits viewable in <a
href="https://github.com/diffplug/spotless/compare/gradle/6.12.0...gradle/6.12.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.diffplug.spotless:spotless-plugin-gradle&package-manager=gradle&previous-version=6.12.0&new-version=6.12.1)](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: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-03 09:58:06 +00:00
Anurag Agarwal 390803d3e7
GRPC: Adds peer socket address when the client call is ready (#7451)
Closes
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7445
2023-01-02 11:01:37 +01:00
Lauri Tulmin fe540eaad2
Resource injection for class loader getResourceAsStream (#7476)
In
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7447
injected resource is opened with class loader getResourceAsStream. This
works only in class loaders where getResourceAsStream delegates to
getResource. This is not the case with all class loaders, for example
tomcat class loader does not do this. Because of this we also need to
instrument class loader getResourceAsStream.
2023-01-02 11:01:00 +01:00
Mateusz Rzeszutek 8c64a9e6e1
Fix class file load error when using spring-guice together with sprin… (#7447)
…g-web instrumentation

Fixes
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7428
2023-01-02 11:00:51 +01:00
Lauri Tulmin 983b9dddff
Limit cxf latest dep version (#7470) 2022-12-23 09:54:25 -08:00
Lauri Tulmin 3ca6b04a59
Propagate original exception through kafka wrapper (#7452)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7450
2022-12-21 09:26:57 +01:00
Lauri Tulmin e683fd9bee
Preserve original exception in jetty http client wrappers (#7455)
Same issue as in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7452
2022-12-21 09:26:44 +01:00
Lauri Tulmin 1eb0477acd
Limit spring-cloud-stream version (#7442) 2022-12-17 08:18:15 -08:00
Lauri Tulmin 7b87423571
Skip muzzle for broken spring-web versions (#7435) 2022-12-15 22:02:22 +00:00
Trask Stalnaker fd027f1b9a
Fix testLatestDeps (#7431) 2022-12-15 23:43:43 +02:00
Mateusz Rzeszutek fc35d7b5b3
Muzzle: skip broken elasticsearch version (#7427)
Fixes  #7426
2022-12-15 11:45:02 +02:00
Mateusz Rzeszutek 2602cf681a
Add serlvet filter test to spring-webmvc-6.0 (#7406) 2022-12-15 09:07:42 +01:00
Peter Findeisen 5efa6408e4
Adding a reference to runtime metrics (#7407)
As suggested by @tylerbenson, adding a reference to the runtime metrics
reported by the agent.
2022-12-14 07:59:05 -08:00