Commit Graph

2603 Commits

Author SHA1 Message Date
siyuniu-ms e87584fac6
change endpoint from enum to regular class (#8325)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-24 16:31:32 +00:00
sfriberg d1b7356ffe
AddingSpanAttributes annotation (#7787)
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-04-24 08:58:28 -07:00
Lauri Tulmin 0f258c669a
Use hasAttributesSatisfyingExactly instead of hasAttributesSatisfying (#8336) 2023-04-24 11:57:45 +02:00
Lauri Tulmin 2280b3fd80
Correct logback mdc appender class name (#8335) 2023-04-21 15:04:06 +02:00
kc fd9ef741a0
Migrate rxjava3 unit tests to Java (#7924) 2023-04-21 12:41:20 +02:00
Helen ffb63d68eb
Fix nested http.route (#8282)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-21 09:27:28 +02:00
Mateusz Rzeszutek e3944a53a5
Make net.transport an optional attribute (#8279) 2023-04-20 08:14:03 -07:00
Lauri Tulmin 04097b3093
Add instrumentation for vertx-sql-client (#8311) 2023-04-20 08:11:24 -07:00
Tyler Benson afc327e14d
Populate `process.command_args` for Java 9+ and improve `process.command_line` for Java 8 (#8130) 2023-04-13 09:23:14 -07:00
Lauri Tulmin 9b9cf9692e
Fix javaagent armeria server instrumentation (#8281) 2023-04-13 07:00:20 -07:00
Mateusz Rzeszutek 1990b06a82
Implement HttpServerResponseCustomizer support for Restlet (#8272) 2023-04-12 08:26:32 -07:00
Mateusz Rzeszutek 17702d6e98
Application logger bridge: Spring Boot support (#8228) 2023-04-12 08:25:28 -07:00
Lauri Tulmin 300267fe11
Implement HttpServerResponseCustomizer support for Armeria (#8274) 2023-04-12 14:44:48 +03:00
Ryan Dens e17feb4ea6
Remove Scala conventions from project that does not compile Scala (#8275) 2023-04-12 11:44:44 +02:00
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
Lauri Tulmin 53fc6b6d9f
Update armeria-junit5 (#8259) 2023-04-09 14:12:41 -07: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
Mateusz Rzeszutek f501569106
Switch from http.flavor to net.protocol.* in HTTP client instrumentat… (#8131) 2023-04-07 13:39:42 +02: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
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
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 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
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
Lauri Tulmin 402635bb64
Remove aws-sdk-2.2 latest dep restriction (#8207) 2023-04-04 10:03:19 +03:00
Lauri Tulmin 00dfd99519
Alternative fix for flaky jfr telemetry test (#8203)
Reverts
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/8183
Perhaps the problem is that the gc happens before reading jfr events is
started.
2023-04-03 13:09:37 -07:00
Lauri Tulmin 08236a710f
Add library instrumentation for java http client (#8138)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8069
The javaagent instrumentation also supports propagating context into
[BodyHandler](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.BodyHandler.html)
implemented in
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/java-http-client/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpclient/BodyHandlerWrapper.java
I think the initial idea behind it was that this allowed propagating
context into callbacks. Because this didn't work for
`connectionErrorUnopenedPortWithCallback` test later we also added
wrapping completable future to take care of propagating context into
callbacks. Should I also implement context propagation for `BodyHandler`
in library instrumentation or should I just delete it? I guess it could
come handy if someone builds a custom `BodyHandler` and wants to emit
spans from there, though this doesn't feel too likely. I'd like deleting
it more.

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-03 13:08:29 -07:00
Nitesh S f7d74f5daa
convert gwt tests from groovy to java (#8201)
Related to #7195
2023-04-03 11:30:33 -07:00
Lauri Tulmin 1393604118
Add option to capture logback key value pairs (#8074)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8059
2023-04-03 11:30:04 -07:00
Trask Stalnaker b01996e12f
Rename apache-pulsar to pulsar and apache-camel to camel (#8195)
Closes #8004
2023-04-03 11:26:23 -07:00
Nitesh S 8704510619
convert spark tests from groovy to java (#8200)
Related to #7195
2023-04-03 13:38:02 +02:00