Commit Graph

96 Commits

Author SHA1 Message Date
Jonas Kunz 18155581b2
Move Akka and Armeria virtual fields to helpers (#13604)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2025-04-01 15:35:08 +03:00
HikariLan 2c6cc61b0f
Fix typo (#13616) 2025-03-31 09:39:36 +03:00
Lauri Tulmin 4ce03e424a
Delete deprecated library instrumentation methods (#13575) 2025-03-27 08:13:21 +00:00
Luke Sterkowicz ffecc2c0e8
Fixes and options for gRPC instrumentation (#13443) 2025-03-13 09:12:09 -07:00
Lauri Tulmin 7dc73f00f4
Remove usage of grpc internal api (#13510) 2025-03-13 07:54:15 -07:00
xiepuhuan ae3f6ac481
Implementing `ExtendedTextMapGetter` in grpc-1.6 instrumentation (#13011)
Signed-off-by: xiepuhuan <puhuanxie@gmail.com>
2025-01-08 07:28:14 -08:00
Trask Stalnaker 2ea27b29e2
End span after closing scope (#12952) 2024-12-27 09:22:26 -08:00
Trask Stalnaker 4cc4e1c0b2
Consistent naming of addAttributesExtractor (#12860) 2024-12-10 12:45:20 -08:00
Gregor Zeitlinger 749fafaea8
enforce static imports (#12009) 2024-08-21 10:40:50 -07:00
wgy035 a47c406e57
fix grpc set metadata multi-value (#11308)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2024-06-04 14:27:22 -07:00
Lauri Tulmin 7a06507f80
Allow library instrumentations to override span name (#11355)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-05-17 12:10:32 +03:00
Lauri Tulmin 66e4c5ac39
Add instrumentation for armeria gRPC (#11351)
Co-authored-by: Steve Rao <raozihao.rzh@alibaba-inc.com>
2024-05-15 13:31:02 -07:00
Lauri Tulmin 3a9972b16f
Remove incubating semconv dependency from library instrumentation (#11324) 2024-05-15 11:44:21 -07:00
Lauri Tulmin c92955fa2f
End grpc server span in onComplete instead of close (#11170) 2024-04-30 19:15:12 +03:00
Lauri Tulmin 79d50d1f11
Run grpc tests with ipv4 (#11087)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-04-11 09:16:27 +03: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
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
renovate[bot] 27ee816a26
fix(deps): update dependency io.netty:netty-bom to v4.1.101.final (#9833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-12-06 10:20:54 -08:00
Mateusz Rzeszutek 65ee9510f5
Rename the `instrumentation-api-semconv` module into `instrumentation-api-incubator` (#9985) 2023-12-04 08:28:10 +01:00
Mateusz Rzeszutek dc81aae72f
Move HTTP classes to instrumentation-api (#9977) 2023-12-01 12:04:06 +01:00
Mateusz Rzeszutek 7cd705b555
Remove old HTTP semconv code (#9968) 2023-11-29 08:04:31 -08:00
Trask Stalnaker 5ba402fd2f
opentelemetry -> openTelemetry (#9858) 2023-11-14 12:31:42 +02:00
Mateusz Rzeszutek 9cb157492c
Replace `(client|server).socket.(address|port)` attributes with `network.(peer|local).(address|port)` (#9676) 2023-10-18 10:36:32 +00:00
Lauri Tulmin 13585c6d95
Implement spec changes for grpc server span error status (#9641) 2023-10-10 16:37:02 +03:00
Lauri Tulmin 432dc54de8
Use constants from semconv (#9626) 2023-10-09 13:31:48 +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
Mateusz Rzeszutek 65451b6529
Deprecate `NetClientAttributesExtractor` (#9165) 2023-08-16 11:21:10 +02:00
Mateusz Rzeszutek 42f07eedd8
Deprecate `NetServerAttributesExtractor` (#9156) 2023-08-11 15:04:52 +02:00
Lauri Tulmin d749ac0091
Rework grpc cancelation propagation (#8957) 2023-08-08 11:00:10 +03:00
Mateusz Rzeszutek 4f12fba9c3
Implement new stable client semantic conventions (#8704) 2023-06-13 17:00:27 -07:00
Mateusz Rzeszutek cde2e70148
Implement new stable server semantic conventions (#8663) 2023-06-13 11:07:59 +02:00
Mateusz Rzeszutek 506ccb6b7d
Implement new stable network semantic conventions (#8616) 2023-06-12 16:51:47 +02:00
Mateusz Rzeszutek eeb6ffd6e3
Deprecate InetSocketAddressNetClientAttributesGetter and move its met… (#8591) 2023-05-31 08:30:56 +02:00
Mateusz Rzeszutek c4ee60dad4
Deprecate InetSocketAddressNetServerAttributesGetter and move its met… (#8341) 2023-05-29 10:04:32 +02:00
Mateusz Rzeszutek e3944a53a5
Make net.transport an optional attribute (#8279) 2023-04-20 08:14:03 -07:00
Lauri Tulmin 4023a59068
Grpc client instrumentation net.sock.peer.addr (#7742)
Currently grpc client instrumentation unreliably fills
`net.sock.peer.addr` which makes tests flaky
https://ge.opentelemetry.io/s/nni57d5zryafk/tests/:instrumentation:grpc-1.6:javaagent:test/io.opentelemetry.javaagent.instrumentation.grpc.v1_6.GrpcStreamingTest/conversation(int,%20int)%5B8%5D?expanded-stacktrace=WyIwIl0&top-execution=1
This pr moves capturing `net.sock.peer.addr` to a later point where it
seems to work reliably.
2023-02-14 12:04:53 -08: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
Tav Herzlich b9c10c9607
Add gRPC request metadata instrumentation (#7011)
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>
2023-01-17 21:18:37 -08:00
Anurag Agarwal 390803d3e7
GRPC: Adds peer socket address when the client call is ready (#7451)
Closes
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7445
2023-01-02 11:01:37 +01:00
Trask Stalnaker f9c2c80ef7
Avoid constructing URI (#7293)
Resolves #6568 (Reactor Netty optimization was already implemented in
#6600)
2022-11-24 10:14:10 +01:00
Aaron Ai 2d7395c44b
Introduce markdown lint check (#7175)
Fixes #7129
2022-11-16 20:48:42 -08:00
Arik Sher deebf6d06c
Enhancement/add additionalServerExtractors (#7155)
fixes issue #7153

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-15 08:52:43 +01:00
Aaron Ai d266a604ed
Add docs for gRPC library instrumentation (#6981)
Fixes #6980
2022-10-27 15:31:28 +02: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
Trask Stalnaker 429ecfc713
Update error prone (#6646)
(note that change from BDDMockito is due to
https://github.com/google/error-prone/issues/3396)
2022-09-23 11:24:40 -07:00
Mateusz Rzeszutek cfdbe758f2
Net attributes getters changes (in preparation for HTTP spec impl) (#6503)
* Net attributes getters changes: instrumentation-api-semconv changes

* Net attributes getters changes: getter implementations

* Net attributes getters changes: test fixes

* Remove net.sock.host.name

* code review comments

* default getter methods & getPeerSocketAddress() method name

* set authority in grpc earlier
2022-09-12 09:20:27 -07:00
Mateusz Rzeszutek 82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` (#6363)
* Rename newInstrumenter() into buildInstrumenter()

* spotless
2022-07-25 12:02:46 -07:00
Sam Xie fcda760ad5
Add shouldStart() call to gRPC instrumentation (#6356) 2022-07-22 10:38:53 +02:00
Mateusz Rzeszutek 3af56e7d22
InstrumentationConfig part 3: HTTP headers and peer service mappings (#6302) 2022-07-15 14:52:52 -07:00
Trask Stalnaker 11dd0797f6
Make rpc.grpc.status_code required (#6184) 2022-06-17 13:50:57 -07:00