Commit Graph

2305 Commits

Author SHA1 Message Date
jack-berg fce5a5f881
Add readme for runtime-metrics (#7012)
In the 10/27 java sig we discussed that it would be valuable to
enumerate the attributes reported for memory pool and gc metrics when
different gcs are used.

I've went ahead and added a readme for the runtime metrics which
includes detailed information on the attributes reported. Note that I
also have the same data for gc metrics added in #6964 and #6963, but
will wait to add until those PRs are merged.
2022-11-02 14:46:07 -07:00
Trask Stalnaker e5040f10e2
Update c3p0 muzzle config (#7017) 2022-11-01 11:25:29 -07: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
Lauri Tulmin b0012b083b
okhttp: run our interceptor before other interceptors (#6997)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6909
If our interceptor runs before other interceptors then other
interceptors replacing the request won't affect our interceptor.
2022-10-27 12:45:02 -07:00
Aaron Ai d266a604ed
Add docs for gRPC library instrumentation (#6981)
Fixes #6980
2022-10-27 15:31:28 +02: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
Trask Stalnaker 71b3e3e027
Library doc cleanup (#6948)
Related to #6947, but just cleans up the library module doc that already
existed (mostly for uniformity). Does not introduce any new doc.
2022-10-24 10:26:21 -07:00
Aaron Ai 3911cacfdc
Fix typos (#6961) 2022-10-24 09:06:01 -07:00
Trask Stalnaker 93175522d4
Rename kafka propagation setting and clarify behavior (#6957) 2022-10-24 08:49:48 -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
Lauri Tulmin 5c2c86c65d
Run aws-sdk tests against 2.18.x (#6956)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6945
2022-10-23 10:33:48 -07:00
Trask Stalnaker 94e2248940
Use new semantic attribute constants (#6946) 2022-10-23 09:32:03 -07:00
Lauri Tulmin 9b4d490e81
Fix metric unit in BufferPoolsTest (#6953) 2022-10-23 09:13:55 -07:00
Trask Stalnaker b2a4cf171f
Cap aws-sdk versions to fix testLatestDeps (#6944)
Opened issue #6945 to track removing the cap.

Resolves #6941 
Resolves #6943
2022-10-23 12:32:37 +03:00
Mateusz Rzeszutek 33b06889fa
Auto-detect service name based on the jar name (#6817)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-22 18:10:21 -07:00
jack-berg 015dbf90b0
Add meter version to runtime metrics (#6874)
Runtime metrics doesn't include the meter version. This adds it from the
utility method in the instrumentation-api
`EmbeddedInstrumentationProperties.findVersion`. I know I can read the
properties file for this module, but its repetitive to implement that in
many places.
2022-10-22 18:09:44 -07:00
Trask Stalnaker 9ce68fb937
Fix metric units (#6931)
Follow-up to #6930
2022-10-22 10:00:48 -07:00
王展城 397a5a89b5
fix spring-webflux cast to PathPattern throws ClassCastException (#6872)
when
ServerWebExchange.getAttributes().put(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE,
"path string type").
opentelemetry javaagent will throw exception.

[企业微信截图_76344afd-4541-482c-a90f-0606ad720351](https://user-images.githubusercontent.com/15957476/195615160-45559fb5-5e0c-4c25-8678-7d8aa603f346.png)
2022-10-21 10:35:33 +02:00
Peter Findeisen 598ee82659
6929 - fixing unit for runtime.jvm.gc.count (#6930) 2022-10-20 17:43:01 -07:00
Trask Stalnaker c18bea3b79
Revert "Temporary fix for testLatestDeps (#6904)" (#6922)
This reverts commit ceb6975d17.

Looks like this got sorted.
2022-10-20 13:06:58 +03:00
Trask Stalnaker f488d94403
Capture net.host.name for netty (#6892)
This may be a regression in 1.19.0 because you can no longer reconstruct
the original url for netty server spans (previously `http.host` was
captured which could be used).
2022-10-19 09:21:50 -07:00
Etienne Dysli Metref 6fb1f00241
Refactor `io.opentelemetry.instrumentation.resources.ContainerResource` to avoid using null (#6889)
While I was looking at issues
open-telemetry/opentelemetry-java-instrumentation#6694 and
open-telemetry/opentelemetry-java#2337, I saw that the code in
`io.opentelemetry.instrumentation.resources.ContainerResource` used
`null` several times as return value which isn't safe. Nowadays,
`Optional` is better suited to signal the absence of a result, so I
refactored `ContainerResource` to use `Optional`s instead of null.

On the way, I also refactored this class's unit tests into parameterised
tests to reduce test code duplication. These improvements should help
implementing a solution to
open-telemetry/opentelemetry-java-instrumentation#6694.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-19 03:00:43 +00:00
Trask Stalnaker ceb6975d17
Temporary fix for testLatestDeps (#6904)
Resolves #6903
2022-10-18 16:28:30 +02:00
Trask Stalnaker 895880b121
Fix akka testLatestDeps (#6900)
Resolves #6901
2022-10-17 17:45:05 -07:00
Mateusz Rzeszutek b6ded1f9a0
End reactor-netty HTTP client span properly on `Mono#timeout()` (#6891)
Calling `Mono#timeout()` with a timeout value smaller than the HTTP
client timeout caused the on request/response end callbacks to be simply
discarded; and the HTTP span was never finished.
2022-10-17 13:29:02 -07:00
Trask Stalnaker c1cdadab5d
Fix testLatestDeps (#6880) 2022-10-14 12:03:48 +03:00
Lauri Tulmin 279ab34ba9
Fix regression in webflux http client concurrency test (#6858)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6857
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6856
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6854
Looks like a regression from
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/6836
2022-10-12 09:21:49 -07:00
jack-berg aeac361816
Upgrade to otel java 1.19.0 (#6757)
Working PR to capture all the changes required to update to otel java
1.19.0. The new log API force allows
`:instrumentation-appender-api-internal` and
`:instrumentation-appender-sdk-internal`, but necessitates a decent
amount of refactoring as a result.

The PR points at the `1.19.0-SNAPSHOT`, which I'll update upon
publication.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-10-12 09:19:37 -07:00
jack-berg fcd5876e1a
Add HTTP client and server tests (#6836)
Resolves #6835.
2022-10-11 20:12:48 +00:00
jack-berg d5aadbab04
Split out :instrumentation:netty:netty-4.1 library (#6820)
Resolves #6734. Builds on #6811.
2022-10-10 16:01:14 -07:00
Mateusz Rzeszutek 77035fc88c
Extract `net.peer.{name,port}` on start for CLIENT spans (#6828)
The [HTTP
spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client)
says these two attributes must be provided at span creation time - I
think it makes sense to extend it over to all `net`-related
instrumentations, cause these are supposed to be the logical peer
name/port, which are supposed to be known before the connection is
started/exchange is made.
2022-10-10 16:00:19 -07:00
Lauri Tulmin 418c414de9
Remove vaadin latest deps restriction (#6829)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6551
2022-10-07 12:14:06 -07:00
Trask Stalnaker 5184a523b6
Add test for null httpcontext (#6823)
follow-up to #6792
2022-10-07 12:39:50 +03:00
Lauri Tulmin 5daf453e1d
Remove latest dep restriction from vertx-http-client-4.0 (#6827)
Should have been part of
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/6809,
forgot to add this file.
2022-10-07 11:31:57 +02:00
jason plumb d9b25d34df
Guard against null HttpContext (#6792)
Resolves #6787

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-06 16:03:03 -07:00
jack-berg 1fcea2017b
Publish :instrumentation:netty:netty-4-common as library instrumentation (#6811)
Related to #6734. Builds on #6805.

I'll follow it up by splitting out `:instrumentation:netty:netty-4.1` in
a separate PR.
2022-10-06 08:50:25 -07:00
Mateusz Rzeszutek 891ec8c491
Rename restlet-1.0 to restlet-1.1 (#6814) 2022-10-06 08:49:55 -07:00
Mateusz Rzeszutek ab0c875015
Link RabbitMQ receive span with the producer span (#6808)
Similar to #6804, but for RabbitMQ.
Also changed the span kind of the receive span to `CONSUMER`, to match
the spec.
2022-10-06 12:20:19 +03:00
Trask Stalnaker 6f6af66c04
Update to slf4j 2.0.2 (#6774)
~testLatestDeps is failing, see #6791~
2022-10-06 01:28:53 +00:00
Mateusz Rzeszutek 0e84d10e58
Fix Restlet v2 `Message#getAttributes` calls (#6796)
Fixes #6563
2022-10-05 13:29:05 -07:00
Lauri Tulmin d9eff461d8
Fix instrumentation for vert.x 4.3.4 (#6809)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6790
2022-10-05 09:26:48 -07:00
jack-berg 4c91ec9f42
Publish :instrumentation:netty:netty-common as library instrumentation (#6805)
Related to #6734.

This first stage splits out the shared utilities in
`:instrumentation:netty:netty-common`. I'll follow it up by splitting
out `:instrumentation:netty:netty-4-common`,
`:instrumentation:netty:netty-4.1` in separate PRs. If there is
appetite, I can also split out library instrumentation for
`:instrumentation:netty:netty-4.0` and
`:instrumentation:netty:netty-3.8`, though I have no need for these.
2022-10-05 09:24:44 -07:00
Mateusz Rzeszutek f195ec0624
Link JMS receive span with the producer span (#6804)
Resolves #6779

In JMS you can have either the consumer receive span or the consumer
process span (unlike Kafka, where the process span is always there and
the receive span is just an addition) - in scenarios where polling
(receive) is used, I think it makes sense to add links to the producer
span to preserve the producer-consumer connection. Current messaging
semantic conventions don't really describe a situation like this one,
but the https://github.com/open-telemetry/oteps/pull/220 OTEP mentions
that links might be used in a scenario like this one - which makes me
think that adding links here might be a not that bad idea.
2022-10-05 09:11:28 -07:00
Trask Stalnaker dc7e072a56
Fix testLatestDeps (#6791) 2022-09-30 15:43:07 -07:00
Trask Stalnaker 0d32150059
Assert on instrumentation version (#6773)
To catch issues like #6770
2022-09-29 10:53:10 +03:00
Aaron Ai 4e59f10687
Rearrange the file structure of RocketMQ instrumentation (#6762)
Fixes #6761
2022-09-28 13:45:59 -07:00
Lauri Tulmin 73cadd38fe
Correct instrumentation name for jaxrs-2.0-annotations (#6770)
Related to
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6733
2022-09-28 12:47:45 -07:00
Trask Stalnaker 0e0bbf6564
Small daemon threads implementation clean up (#6740) 2022-09-28 12:05:39 +03:00
Lauri Tulmin e526338fc3
Fix akka-http and tomcat10 latest dep tests (#6766)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6760
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6759
2022-09-27 15:45:04 -07:00