Commit Graph

9311 Commits

Author SHA1 Message Date
Lauri Tulmin cec7904305
Enable response customizer tests for ratpack (#8277) 2023-04-12 11:38:38 +02:00
Lauri Tulmin 271c72b94a
Implement HttpServerResponseCustomizer support for Grizzly (#8263) 2023-04-12 10:06:01 +03:00
Trask Stalnaker 66f4c80d35
Update instrumentation suppression keys that do not align with their module name (#7811) 2023-04-11 10:54:42 -07:00
Lauri Tulmin 56eae8109b
Implement HttpServerResponseCustomizer support for Akka-http (#8273) 2023-04-11 10:54:03 -07:00
Lauri Tulmin 2dfe64a08b
Set timeout for r2dbc test (#8270) 2023-04-11 12:15:42 +02:00
Lauri Tulmin e03aaed32c
Disable connection recovery in rabbitmq test (#8261) 2023-04-10 19:18:21 -07:00
OpenTelemetry Bot 22df5866b0
Update the OpenTelemetry SDK version to 1.25.0 (#8262)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-10 18:12:57 -07:00
Lauri Tulmin 4b257fe4ea
Implement HttpServerResponseCustomizer support for Liberty (#8264) 2023-04-10 18:09:08 -07:00
Lauri Tulmin bd7d1415ef
Implement HttpServerResponseCustomizer support for Undertow (#8265) 2023-04-10 18:08:53 -07:00
dependabot[bot] 5609f5fc18
Bump io.opentelemetry:opentelemetry-bom from 1.24.0 to 1.25.0 in /examples/distro (#8266)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 18:07:28 -07:00
Trask Stalnaker 41d7ed00b5
Fix auto-update SDK automation (#8260) 2023-04-10 08:47:26 -07:00
Lauri Tulmin 53fc6b6d9f
Update armeria-junit5 (#8259) 2023-04-09 14:12:41 -07:00
dependabot[bot] a84fccdd4b
Bump com.linecorp.armeria:armeria-grpc from 1.22.1 to 1.23.1 (#8250)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 21:24:13 +03:00
dependabot[bot] 91780f43f2
Bump com.gradle.plugin-publish from 1.1.0 to 1.2.0 (#8251)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 21:23:50 +03:00
dependabot[bot] 09e3269e99
Bump io.opentelemetry:opentelemetry-bom from 1.24.0 to 1.25.0 in /examples/extension (#8252)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 21:23:27 +03:00
Mateusz Rzeszutek 5b271c4917
Switch from http.flavor to net.protocol.* in HTTP server instrumentat… (#8244) 2023-04-09 08:47:33 -07:00
Lauri Tulmin 3de8000c30
Limit ucp latest dep test version (#8258) 2023-04-09 08:43:24 -07:00
dependabot[bot] 7c628c920f
Bump com.diffplug.spotless:spotless-plugin-gradle from 6.17.0 to 6.18.0 (#8234)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
2023-04-07 15:51:49 +02:00
Mateusz Rzeszutek 69ee671e99
Fix armeria latestDepTest (#8247) 2023-04-07 13:50:10 +00:00
Lauri Tulmin 1b6d25e519
Disable automatic connection recovery in reactor rabbit test (#8243) 2023-04-07 06:41:40 -07:00
dependabot[bot] 3d020d2f8e
Bump byteBuddyVersion from 1.14.3 to 1.14.4 (#8233) 2023-04-07 06:37:09 -07:00
Mateusz Rzeszutek f501569106
Switch from http.flavor to net.protocol.* in HTTP client instrumentat… (#8131) 2023-04-07 13:39:42 +02:00
dependabot[bot] e79c46e190
Bump com.diffplug.spotless from 6.17.0 to 6.18.0 (#8235)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:17:39 +03:00
dependabot[bot] 8068d9d770
Bump com.diffplug.spotless:spotless-plugin-gradle from 6.17.0 to 6.18.0 in /examples/distro (#8237)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:17:17 +03:00
dependabot[bot] dc696a4d33
Bump net.bytebuddy:byte-buddy-dep from 1.14.3 to 1.14.4 in /examples/distro (#8238)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:16:57 +03:00
dependabot[bot] f55a534578
Bump com.diffplug.spotless from 6.17.0 to 6.18.0 in /benchmark-overhead (#8239)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:16:35 +03:00
dependabot[bot] daee262ff6
Bump com.diffplug.spotless from 6.17.0 to 6.18.0 in /examples/extension (#8236) 2023-04-06 18:09:14 -07:00
Lauri Tulmin 1cd634b341
Replace deprecated method (#8230) 2023-04-06 14:43:36 -07:00
Lauri Tulmin c9c5aebb0b
Attempt to work around flaky reactor rabbitmq test (#8232) 2023-04-06 13:08:19 -07:00
Dmytro Iaroslavskyi 511f6b7361
ZIO 2.0 instrumentation (#7980)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-06 09:07:46 -07:00
Lauri Tulmin 7c9cf7ab1b
Spring scheduling: run error handler with the same context as task (#8220) 2023-04-06 08:39:33 -07:00
Trask Stalnaker fbdd611ab5
Update squash merge commit message (#8229) 2023-04-06 15:29:29 +00:00
Andrei Chugunov 506ca93699
webflux 5.0 groovy to java tests part 2 (#7776)
@trask @mateuszrzeszutek hello, what do you think about
SingleThreadedSpringWebfluxTest, the test contains dependencies on new
reactor netty classes in testLatestDeps case. I tried use reflection for
rewriting the test to java but it was not trivial and I not reach the
result

---------

Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-05 19:33:23 -07:00
dependabot[bot] 273a2fe235
Bump org.testcontainers:testcontainers from 1.17.6 to 1.18.0 in /examples/extension (#8224) 2023-04-05 16:07:20 -07:00
dependabot[bot] 6a29e43b94
Bump org.testcontainers:testcontainers from 1.17.6 to 1.18.0 in /benchmark-overhead (#8226) 2023-04-05 16:06:28 -07:00
dependabot[bot] cd9d301214
Bump org.testcontainers:testcontainers from 1.17.6 to 1.18.0 in /examples/distro (#8223) 2023-04-05 16:05:53 -07:00
Trask Stalnaker 832549744b
Add comment about active request count attributes (#8221) 2023-04-05 14:40:51 -07:00
Lauri Tulmin 8aeffa5e80
Rename package.json to avoid dependabot alert (#8219)
This `package.json` contains outdated dependences, it is only used in a
test.

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-05 11:00:24 -07:00
Lauri Tulmin 856d521f0a
Update testcontainers and selenium (#8218) 2023-04-05 08:24:53 -07:00
Lauri Tulmin d87f40c9c7
Instrument akka-http bindAndHandle (#8174)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8143
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6081
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/5137
Using the same approach as in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/6243
and as used by DataDog. Unlike in #6243 this pr does not attempt to
prevent leaking scopes into actors but rather instruments the actor to
reset context to get rid of the leaked scopes (DataDog does the same).
2023-04-05 17:11:05 +03:00
Lauri Tulmin 2f0819ae20
Improve compatibility with SecurityManager (#7983)
This pr gives classes defined in agent and extension class loaders all
permissions. Injected helper classes are also defined with all
permissions. Agent startup is altered so that we won't call methods that
require permission before we are able to get those permissions.
This pr does not attempt to address issues where agent code could allow
user code to circumvent security manager e.g.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/InstrumentationHolder.java
gives access to `Instrumentation` that could be used to redefine classes
and remove security checks. Also this pr does not address failed
permission checks that could arise from user code calling agent code.
When user code, that does not have privileges, calls agent code, that
has the privileges, and agent code performs a sensitive operation then
permission check would fail because it is performed for all calling
classes, including the user classes. To fix this agent code should uses
`AccessController.doPrivileged` which basically means that, hey I have
done all the checks, run this call with my privileges and ignore the
privileges of my callers.
2023-04-05 15:41:37 +03:00
Lauri Tulmin e0ecb56e8b
Codeql detects zipslip vulnerability (#8209)
I think that the only way zipslip could happen is when name contains
`..` but codeql isn't able to cope with that. Removing the `..` check
gets rid of the code scanning alert.
2023-04-04 16:14:19 -07:00
dependabot[bot] b52bad1d8d
Bump io.quarkus.platform:quarkus-bom from 2.16.5.Final to 2.16.6.Final (#8213) 2023-04-04 16:12:43 -07:00
dependabot[bot] feb2872132
Bump io.quarkus from 2.16.5.Final to 2.16.6.Final (#8215) 2023-04-04 16:11:58 -07:00
Lauri Tulmin 8fba02e391
Skip spotless and other checks in CI test step (#8142)
Currently we run spotless and other checks for each of the parallel test
steps which seems wasteful. Here is an attempt to run only the tests in
given partition without any extra checks in the `test` step and run all
the checks in the `build` step.
2023-04-04 10:43:12 -07:00
Lauri Tulmin 34bca4ba10
Pulsar batch receive instrumentation (#8173) 2023-04-04 10:19:08 -07:00
Lauri Tulmin 4d21d45f3d
Verify that server span ends after child spans in java tests (#8208)
Currently server span end time verification is only implemented for
groovy tests.
2023-04-04 09:54:10 -07:00
Trask Stalnaker 702b9ae70f
Add breedx-splk as an approver (#8204)
Thanks @breedx-splk for all of your efforts in this repository reviewing
PRs!
2023-04-04 09:37:45 -07:00
jason plumb 32b6bd2a71
Ensure that parsed container ID is 64 chars. (#8206)
Resolves #7437.

A few caveats about this. The TL;DR on #7437 is that a non-containerized
process was reporting a `container.id` attribute. The submitter narrowed
it down and I was able to confirm with the test case in this PR.

I hunted for other means for code to determine if it's containerized
with the idea to not even do the parsing if not containerized, but I
couldn't find anything useful. In fact, most approaches of detecting
containerization at all do involve parsing cgroups. Wacky.

So I attempted to verify that container IDs should always be 64
characters. I found:
* podman - docs
[here](https://docs.podman.io/en/latest/markdown/podman-container-inspect.1.html)
"Container ID (full 64-char hash)"
* docker - UID generator source
[here](634a848b8e/pkg/stringid/stringid.go (L36))
shows 32 bytes (and even guards against fully numeric!)
* lxc [man page
](https://linuxcontainers.org/lxc/manpages/man1/lxc-info.1.html)says
"container identifier format is an alphanumeric string". If this maps
into cgroups (no idea!), it would have already been broken in some cases
because we enforce hex.

I'm a little concerned about this approach because the [otel
spec](94c9c75c4f/specification/resource/semantic_conventions/container.md)
suggests that "The UUID might be abbreviated.", but it's
unclear/non-specific about the circumstances that might cause this.

Open to hearing about why the approach presented here is a bad idea. 🙃
2023-04-04 09:37:23 -07:00
Mateusz Rzeszutek 04f2e3e9e5
Bridge agent logs into application's slf4j logger (#7339)
Related discussion #7257
Resolves #3413
Resolves #5059
Resolves #6258
Resolves #7179

Adds a logging implementation that'll collect agent logs in memory until
slf4j is detected in the instrumented application; and when that happens
will dump all the logs into the application slf4j and log directly to
the application logger from that time on.

It's still in a POC state, unfortunately: while it works fine with an
app that uses & initializes slf4j directly, Spring Boot applications
actually reconfigure the logging implementation (e.g. logback) a while
after slf4j is loaded; which causes all the startup agent logs (debug
included) to be dumped with the default logback pattern.

Future work:
* ~~Make sure all logs produces by the agent are sent to loggers named
`io.opentelemetry...`
(https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7446)~~
DONE
* Make this work on Spring Boot
* Documentation
* Smoke test?
2023-04-04 17:29:43 +02:00