Bumps com.diffplug.spotless from 6.13.0 to 6.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>
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`
The build takes ~2 hours when there are changes to core modules that
force re-running of all tests.
Ran into the long test times (again) in #7632.
This also affects release times since the version bump PR build takes 2
hours to run, and then another 2 hours to run release (or wait 2 hours
for CI build to run and update gradle cache).
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.
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.
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>
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.
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>
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 `==`)
Bumps dependency-check-gradle from 7.4.4 to 8.0.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>
Bumps [joox](https://github.com/jOOQ/jOOX) from 1.6.2 to 2.0.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/jOOQ/jOOX/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.11.0 to
5.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mockito/mockito/releases">mockito-core's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h1>Mockito 5: prepare for future JDK versions</h1>
<p>For a while now, we have seen an increase in
problems/incompatibilities with recent versions of the JDK due to our
usage of JVM-internal API.
Most notably, JDK 17 made some changes which are incompatible with the
current subclass mockmaker.
Therefore, to prepare for the future of JDK, we are making some core
changes to ensure Mockito keeps on working.</p>
<h2>Switch the default mockmaker to <code>mockito-inline</code></h2>
<p>Back in Mockito 2.7.6, we published a new mockmaker based on the
"inline bytecode" principle.
This mockmaker creates mocks manipulating bytecode equivalent within the
original class such that its method implementations hook into the normal
Mockito machinery.
As a comparison, the subclass mockmaker generates "real"
subclasses for mocks, to mimic the same behavior.
While the approaches are similar, the inline mockmaker avoids certain
restrictions that the JDK imposes.
For example, it does not violate module boundaries (introduced in JDK 9,
but more heavily used in JDK 17) and avoids the leaking of the creation
of the subclass.</p>
<p>Massive thanks to community member <a
href="https://github.com/reta"><code>@reta</code></a> who implemented
this change.</p>
<h3>When should I still be using the subclass mockmaker?</h3>
<p>There are legitimate remaining use cases for the subclass mockmaker.
For example, on the Graal VM's native image, the inline mockmaker will
not work and the subclass mockmaker is the appropriate choice.
Additionally, if you would like to avoid mocking final classes, using
the subclass mockmaker is a possibibility.
Note however that if you solely want to use the subclass mockmaker to
avoid mocking final, you will run into the above mentioned issues on JDK
17+.
We want to leave this choice up to our users, which is why we will keep
on supporting the subclass mockmaker.</p>
<p>If you want to use the subclass mockmaker instead, you can use the
new <code>mockito-subclass</code> artifact (published <a
href="https://search.maven.org/artifact/org.mockito/mockito-subclass">on
Maven Central</a> along with all our other artifacts).</p>
<h2>Update the minimum supported Java version to 11</h2>
<p>Mockito 4 supports Java 8 and above.
Similar to other open source projects, we are moving away from JDK 8 and
to newer versions.
The primary reason for moving away from JDK 8 is the increasing
maintenance costs with keeping our own infrastructure working.
Lately we have been running into more and more JDK 8 breakages.
Additionally, while we want to support the newest JDK API's, our current
solution to support both JDK 8 and newer versions causes <a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2798">issues
with the <code>SecurityManager</code></a>.
Since we want Mockito to work on the newest version and more and more
businesses adopting JDK 11, we have decided to make the switch as
well.</p>
<p>Massive thanks to community member <a
href="https://github.com/reta"><code>@reta</code></a> who implemented
this change.</p>
<h3>What should I do if I still run JDK 8?</h3>
<p>For JDK 8 and below, you can keep on using Mockito 4.
This is similar to if you are using JDK 6, for which you can keep on
using Mockito 2.
The changes in Mockito 5 (for now) are primarily focused on the latest
JDK versions, which means the API differences between Mockito 4 and 5
are minimal.
However, over time this will most likely widen, so we do recommend
adopting JDK 11 in the future.</p>
<h2>New <code>type()</code> method on <code>ArgumentMatcher</code></h2>
<p>One of our most used public API's for customizing Mockito is the <a
href="https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/ArgumentMatcher.html"><code>ArgumentMatcher</code>
interface</a>.
The interface allows you to define a custom matcher, which you can pass
into method arguments to provide more targeted matches.
One major shortcoming of the <code>ArgumentMatcher</code> was the lack
of varargs support.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="adf528d173"><code>adf528d</code></a>
Bump versions.bytebuddy from 1.12.21 to 1.12.22 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2864">#2864</a>)</li>
<li><a
href="2418419a19"><code>2418419</code></a>
Bump versions.junitJupiter from 5.9.1 to 5.9.2 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2858">#2858</a>)</li>
<li><a
href="3d40cd51d3"><code>3d40cd5</code></a>
Bump junit-platform-launcher from 1.9.1 to 1.9.2 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2859">#2859</a>)</li>
<li><a
href="9bec8e3a1a"><code>9bec8e3</code></a>
Bump versions.errorprone from 2.17.0 to 2.18.0 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2857">#2857</a>)</li>
<li><a
href="a9595f559c"><code>a9595f5</code></a>
Switch the default mockmaker to the inline mockmaker on JDK 17+ (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2834">#2834</a>)</li>
<li><a
href="c5d7fbc532"><code>c5d7fbc</code></a>
Bump assertj-core from 3.23.1 to 3.24.1 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2854">#2854</a>)</li>
<li><a
href="dbd7f2ff4a"><code>dbd7f2f</code></a>
Bump versions.bytebuddy from 1.12.20 to 1.12.21 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2852">#2852</a>)</li>
<li><a
href="4d62fa75c7"><code>4d62fa7</code></a>
Bump junit from 1.1.4 to 1.1.5 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2850">#2850</a>)</li>
<li><a
href="b1b6d6afcb"><code>b1b6d6a</code></a>
Bump espresso-core from 3.5.0 to 3.5.1 (<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2849">#2849</a>)</li>
<li><a
href="7b5b8dd840"><code>7b5b8dd</code></a>
Remove use case for non-existent method VerificationWithTimeout#never
(<a
href="https://github-redirect.dependabot.com/mockito/mockito/issues/2848">#2848</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mockito/mockito/compare/v4.11.0...v5.0.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>