Commit Graph

45 Commits

Author SHA1 Message Date
Trask Stalnaker 2ea27b29e2
End span after closing scope (#12952) 2024-12-27 09:22:26 -08:00
Trask Stalnaker 6b9e68ebfd
Change `setCaptured*Headers(List)` to `setCaptured*Headers(Collection)` (#12901) 2024-12-23 15:49:55 -08:00
Trask Stalnaker 2371589ec5
Statically import semconv constants in tests (#12575) 2024-11-06 08:17:57 -08:00
renovate[bot] 855c7a0fad
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv to v1.28.0-alpha (#12292)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2024-10-28 10:55:06 -07:00
Lauri Tulmin 84f272445f
Make rocketmq span status extractor delegate to default extractor (#12183) 2024-09-06 21:32:32 +03:00
Gregor Zeitlinger 798bdd5569
config properties support for spring starter clients (#11605) 2024-07-02 16:49:39 +03:00
Jay DeLuca a0de9c453e
Remove unneeded groovy dependencies (#11467) 2024-05-27 10:57:17 +00:00
Lauri Tulmin 3a9972b16f
Remove incubating semconv dependency from library instrumentation (#11324) 2024-05-15 11:44:21 -07:00
Zachary Sistrunk 0727225bd9
Non-localhost RocketMQ fix (followup to #11106) (#11222) 2024-04-30 11:16:11 +03:00
Zachary Sistrunk d4237fc01a
Updating tests to support using non-localhost Docker runtimes (#11106) 2024-04-24 15:18:06 -07:00
SylvainJuge 955470a63a
Semconv 1.25.0 migration (#10983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 11:25:52 -07:00
Lauri Tulmin 789f444f78
Fix rocketmq test (#10902) 2024-03-21 20:17:52 +02:00
Steve Rao b14f1fe929
Convert rocketmq unit test from groovy to java (#10520) 2024-02-20 09:02:24 -08:00
Lauri Tulmin b57c1a023b
Update semconv (#10272) 2024-01-30 17:10:35 +00:00
Helen fdeb032b33
Disable controller and view spans by default (#10042)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-01-04 09:16:46 -08:00
Lauri Tulmin ebb9595b7f
Remove deprecated rocketmq setting (#10125) 2024-01-02 08:36:53 +02:00
Mateusz Rzeszutek 65ee9510f5
Rename the `instrumentation-api-semconv` module into `instrumentation-api-incubator` (#9985) 2023-12-04 08:28:10 +01:00
Lauri Tulmin 70e3962a87
Always set messaging operation (#9791) 2023-11-06 12:30:27 +02:00
Trask Stalnaker 3b77cc4b2d
Semconv 1.21 (#9408)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-09-13 19:20:23 +00:00
Trask Stalnaker 2bdddafdc4
Apply Prettier to markdown files (#8968) 2023-07-19 12:22:35 -07:00
jason plumb 55368a52d7
Rename messaging operation "send" to "publish" per spec (#8929)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-07-12 08:59:38 -07:00
Lauri Tulmin 11aba268d8
Remove testcontainers version, it is set via bom (#8880) 2023-07-06 12:50:35 +02:00
Lauri Tulmin a1ccaad76c
Fix rocketmq latest dep test (#8756) 2023-06-19 10:07:55 +02:00
OpenTelemetry Bot bbb05276be
Update the OpenTelemetry SDK version to 1.27.0 (#8688)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-06-13 12:02:11 +03:00
Lauri Tulmin f1411d1cb3
Share timer class used by messaging instrumentations (#8009)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/4514
There is also a slightly different timer class in netty instrumentation
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/netty/netty-common/library/src/main/java/io/opentelemetry/instrumentation/netty/common/internal/Timer.java
that I didn't touch.
2023-03-10 10:40:41 +02:00
Mateusz Rzeszutek 1649a90e29
Add protocol name&version to net attribute getters (#7994)
In preparation for
https://github.com/open-telemetry/opentelemetry-specification/pull/3272
2023-03-09 11:37:52 +00:00
Mateusz Rzeszutek 998e781009
Remove deprecated messaging.url attribute from messaging getter (#8008) 2023-03-09 11:41:51 +01:00
Lauri Tulmin 1da7d55989
Increase rocketmq request timeout (#7987)
Same as
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7968
2023-03-07 08:56:08 +02:00
Lauri Tulmin dbb1b7ff03
Increase rocketmq request timeout (#7968)
Hopefully avoids exceptions like
`org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException:
DEADLINE_EXCEEDED: deadline exceeded after...` in rocketmq 5 test setup.
2023-03-03 08:31:54 -08:00
Aaron Ai 88352fb8d3
Support more semantic convention for RocketMQ trace (#7871)
Fixes #7858
2023-03-01 12:48:42 -08:00
Aaron Ai 8a7e8a8ca2
Replace InternalLogger of RocketMQ by Slf4j Logger (#7873)
Fixes #7872
2023-02-22 09:38:19 +02:00
OpenTelemetry Bot f074b93110
Update the OpenTelemetry SDK version to 1.23.0 (#7800)
Update the OpenTelemetry SDK version to `1.23.0`.

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-13 20:22:09 +00:00
Mateusz Rzeszutek a9c065930d
Return interface instead of concrete implementation in instrumentatio… (#7658)
…n-api-semconv

We're already doing that for `SpanNameExtractor`, `OperationMetrics`,
`ContextCustomizer`, etc., so I figured we should do the same for
`AttributesExtractor` implementation. Also, none of the implementations
have any additional public surface - aside from the builder/factory
method users can just simply use the interface everywhere.
2023-01-31 13:21:28 +01: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
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
Aaron Ai 85b3644787
Remove redundant code in AbstractRocketMqClientTest (#7285) 2022-11-23 17:21:28 +01:00
Lauri Tulmin 910d177e6c
Rocketmq 5: set context for async callback (#7238)
Run callbacks added to the `CompletableFuture` returned from `sendAsync`
with the context that was used when `sendAsync` was called.
Add test for capturing message headers.
2022-11-22 08:25:59 -08:00
Aaron Ai 2d7395c44b
Introduce markdown lint check (#7175)
Fixes #7129
2022-11-16 20:48:42 -08:00
Aaron Ai b3cd45685d
Implement consumer part of rocketmq new client instrumentation (#7019)
Fixes #6764 , This PR is about the consumer part.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-15 13:21:14 +01:00
Trask Stalnaker 5345c87680
End groovy files with newline (#7127) 2022-11-10 12:21:55 +01:00
Aaron Ai 029ed3d98b
Implement producer part of RocketMQ new client instrumentation (#6884)
Fix #6764 . This pull request is about the producer part.
2022-10-27 19:25:22 -07:00
Aaron Ai 0a5fce8243
Add docs for library instrumentation of RocketMQ remoting-based client (#6960)
Fixes #6954

Co-authored-by: Fabrizio Ferri-Benedetti <fferribenedetti@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-24 22:57:04 -07:00
Trask Stalnaker b64706721a
Deprecate RocketMQ propagation setting (#6958)
I suspect that this was added in the original RocketMQ instrumentation
because it existed in the Kafka instrumentation, and not because there
was a need for it(?)

See #6957 for documentation on why it is needed in Kafka
2022-10-24 10:27:28 -07:00
Lauri Tulmin 44b02e51bd
Don't use rocketmq trace context (#6940)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6934
As described in the linked issue our usage of rocketmq trace context can
conflict with other hooks that also use `setMqTraceContext`.
2022-10-23 17:50:09 +00:00
Aaron Ai 4e59f10687
Rearrange the file structure of RocketMQ instrumentation (#6762)
Fixes #6761
2022-09-28 13:45:59 -07:00