Commit Graph

108 Commits

Author SHA1 Message Date
Lauri Tulmin 6ce3bd8c14
Add network attributes to rabbitmq process spans (#10210) 2024-01-11 07:49:03 -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
Mateusz Rzeszutek 280c1ea4c1
Enable stable HTTP semconv by default (#9925) 2023-11-28 10:43:51 -08:00
Lauri Tulmin 70e3962a87
Always set messaging operation (#9791) 2023-11-06 12:30:27 +02:00
Mateusz Rzeszutek e9026cd591
Deprecate old server/client socket getter methods (#9716) 2023-10-19 17:36:57 +02:00
Ken Finnigan ce6ec4e2c7
Convert RabbitMQ 2.7 tests from groovy to java (#9562)
Signed-off-by: Ken Finnigan <ken@kenfinnigan.me>
2023-09-28 08:35:32 -07: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
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
Mateusz Rzeszutek cde2e70148
Implement new stable server semantic conventions (#8663) 2023-06-13 11:07:59 +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
Mateusz Rzeszutek e3944a53a5
Make net.transport an optional attribute (#8279) 2023-04-20 08:14:03 -07:00
Lauri Tulmin e03aaed32c
Disable connection recovery in rabbitmq test (#8261) 2023-04-10 19:18:21 -07:00
Lauri Tulmin 1b6d25e519
Disable automatic connection recovery in reactor rabbit test (#8243) 2023-04-07 06:41:40 -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
Mateusz Rzeszutek 46e5219f19
Remove some Optional usages (#8190)
I applied [this
comment](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/8131#discussion_r1151076724)
to the whole codebase and removed some `Optional`s that were used in the
hot path
2023-04-03 09:13:59 +02:00
Lauri Tulmin 5a14788fc1
Use .service instead of .getService() to get testcontainersBuildService (#8188) 2023-03-31 08:32:24 +00: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 0dccc3ad56
Fix NPE in the RabbitMQ instrumentation (#8021)
Fixes #8020
2023-03-09 17:15:27 +00: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
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
Trask Stalnaker 5345c87680
End groovy files with newline (#7127) 2022-11-10 12:21:55 +01:00
Trask Stalnaker 94e2248940
Use new semantic attribute constants (#6946) 2022-10-23 09:32:03 -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
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
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
Trask Stalnaker f1774cabe2
Update net semantic convention changes (#6268)
* New net conventions: option a

* Feedback + sock.family + sock.peer.name

* peer.service + tests

* server net attributes attempt 1

* server net attributes attempt 2

* Javadoc

* Revisions

* Apply to instrumentations

* Feedback

* One more default method

* Spotless

* Fix javadoc
2022-08-18 09:02:23 -07:00
Lauri Tulmin 07d7cfd551
Capture messaging header value as span attribute (#6454)
* Capture messaging header value as span attribute

* add comment
2022-08-11 17:28:04 -07:00
Trask Stalnaker 68a9f20eb3
Enable PrivateConstructorForUtilityClass errorprone check (#6427)
* PrivateConstructorForUtilityClass

* Advice

* More advice

* More

* More advice

* More

* Spotless

* Fix

* Fix

* Fix

* A better solution

* Revert

* More

* Fix

* Spotless

* Fix
2022-08-10 11:30:22 +03:00
Mateusz Rzeszutek 82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` (#6363)
* Rename newInstrumenter() into buildInstrumenter()

* spotless
2022-07-25 12:02:46 -07:00
Mateusz Rzeszutek e7887ac929
Idea: deprecate `Config`, add agent-only `InstrumentationConfig` (#6264)
* Idea: deprecate Config, add agent-only InstrumentationConfig

* fix

* fix camel test

* fix external-annotation tests
2022-07-08 16:20:49 +02:00
Mateusz Rzeszutek 512a040025
Remove TimeExtractor and use internal API for setting start/end timestamps (#6051)
* Remove TimeExtractor and use internal API for setting start/end timestamps

* code review comments
2022-05-19 09:03:11 -07:00
Mateusz Rzeszutek d919f84cf8
Merge javaagent-instrumentation-api into javaagent-extension-api (#5936)
* Merge javaagent-instrumentation-api into javaagent-extension-api

* remove some leftover references to javaagent-instrumentation-api

* add missing instrumentation-api to distro example
2022-04-28 20:11:15 -07:00
Mateusz Rzeszutek 50f91e6dee
Deprecate AttributesExtractor#set() method (#5749)
* Deprecate AttributesExtractor#set() method

* code review comments
2022-04-05 20:20:02 -07:00
Mateusz Rzeszutek f0bdce973e
Split out MessagingAttributesGetter (#5626) 2022-03-18 11:52:23 -07:00
Mateusz Rzeszutek 551418c283
Refactor AttributesExtractor so that it extracts route from Context (#5288)
* Refactor AttributesExtractor so that it extracts route from Context

* typo

* fix tests

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpRouteHolder.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* fix all AttributesExtractors

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-02-08 10:38:41 +01:00
Trask Stalnaker 186c657b4e
Avoid potential for reverse name lookup (#5305) 2022-02-07 17:39:16 -08:00
Trask Stalnaker 23b33adb0a
Auto-format groovy files in Intellij (#5260)
* Auto-format groovy files in Intellij

* A bit of clean up
2022-01-28 09:29:46 -08:00
jason plumb c5c0a2bcdf
NetClientAttributesAdapter - favor composition over inheritance (#5030)
* first pass at separating NetAttributesAdapter interface and make NetClientAttributesExtractor concrete

* rename the implementations extractor -> adapter

* hide constructor and make factory method

* rename to client and add javadoc

* spotless

* finish javadoc thought

* rebase

* renamed NetClientAttributesAdapter to NetClientAttributesGetter

* fix lettuce

* code review comments

* code review comments -- renaming for consistency

* adapter -> getter

* fix ratpack

* adapter -> getter
2022-01-20 10:51:13 -08:00
Trask Stalnaker 6884d66c09
Reduce top level instrumentation directories (#4965)
* akka

* dropwizard

* kafka

* reactor

* vertx
2021-12-22 10:16:13 -08:00
Asaf Ben Aharon 5869df80e5
Fix RabbitMQ instrumentation consumption on empty headers (#4903)
* Handle null on headers getters

* early returns
2021-12-14 12:01:16 -08:00
Lauri Tulmin d6e69c746e
Fix typo in method name (#4855) 2021-12-09 10:16:59 -08:00
Lauri Tulmin 3188350f7f
Improve rabbitmq startup check (#4813) 2021-12-06 17:26:49 +02:00
Trask Stalnaker ce4cef76f9
Clean up groovy assertions (#4805) 2021-12-05 23:23:58 -08:00