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
Mateusz Rzeszutek
5b271c4917
Switch from http.flavor to net.protocol.* in HTTP server instrumentat… ( #8244 )
2023-04-09 08:47:33 -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
Ago Allikmaa
079e0faa2d
Add HttpServerResponseCustomizer support for Netty ( #8094 )
...
Add `HttpServerResponseCustomizer` support for Netty 3.8, 4.0 and 4.1
instrumentations and enable testing for it in their respective
`HttpServerTest` tests.
2023-03-23 11:11:24 +01:00
Mateusz Rzeszutek
d9b0eee503
Remove deprecated instrumentation-api-semconv code ( #7838 )
2023-02-16 13:16:52 -08:00
Mateusz Rzeszutek
ea237e3a80
Update HTTP span name extractors ( #7730 )
...
Implements
https://github.com/open-telemetry/opentelemetry-specification/issues/2998
---------
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-14 07:40:05 -08:00
Trask Stalnaker
e7820f8e9e
Use super to make netty instrumentation clearer ( #7736 )
...
I think it makes it clearer that these classes are decorating the super
methods.
2023-02-06 08:15:53 -08:00
Mateusz Rzeszutek
245a9f7cf7
Rewrite netty 3.8 tests to Java ( #7666 )
...
Part of #7195
2023-01-30 08:46:05 +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
jason plumb
c5e384fe9f
Http testing refactor prework ( #7623 )
...
As part of discussions #7616 , the idea of trying to do a more piecemeal
approach came up. A reasonable ask.
This is the first step in refactoring the http client tests. It factors
out the `HttpClientResult` inner class of the `AbstractHttpClientTest`
so that this can be reused by new test framework later. It also factors
the relevant abstract methods in the abstract class to a new type
adapter, which will also be reused.
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-20 18:20:42 +00:00
Mateusz Rzeszutek
95ec4a8c1f
HTTP semconv: filter out default peer/host ports ( #7258 )
...
After a loooong break, the next part of the HTTP semconv implementation:
filtering out default HTTP ports, client and server.
> [5]: If not default (80 for http scheme, 443 for https).
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client
2022-11-22 17:14:20 +00: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
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
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
714ba9189e
Remove deprecated `http.host` and `http.server_name` attributes ( #6709 )
...
... and make sure the `TemporaryMetricsView` follows the current spec
2022-09-24 11:02:21 -07:00
Mateusz Rzeszutek
f50f1fed3b
Fix instrumentation-api-semconv packages ( #6590 )
...
* Fix instrumentation-api-semconv packages
* Move test
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-09-12 14:51:27 -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
6cd79b2a94
Deprecate the 2-arg variant of HttpCommonAttributesGeter#statusCode() ( #6466 )
...
* Deprecate the 2-arg variant of HttpCommonAttributesGeter#statusCode()
* fix liberty
2022-08-12 17:11:11 -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
b2c90c79b5
Extract HTTP request & response content length from headers ( #6415 )
...
* Extract HTTP request & response content length from headers
* remove unused method
* fix camel tests
* fix google http client tests
* fix HttpUrlConnection tests
* fix k8s and jaxrs tests
* fix aws tests
* actually fix aws tests 🤞
* fix elasticsearch tests
* fix ratpack tests
* fix spring webflux tests
* fix vertx tests
* fix reactor netty tests
2022-08-05 10:55:47 -07:00
Mateusz Rzeszutek
5a152cd289
Deprecate uncompressed content length HTTP attributes ( #6383 )
2022-07-29 06:17:38 +02:00
Mateusz Rzeszutek
82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` ( #6363 )
...
* Rename newInstrumenter() into buildInstrumenter()
* spotless
2022-07-25 12:02:46 -07:00
Mateusz Rzeszutek
3af56e7d22
InstrumentationConfig part 3: HTTP headers and peer service mappings ( #6302 )
2022-07-15 14:52:52 -07:00
Lauri Tulmin
91dcad68bd
Run tests with play 2.4 ( #6145 )
...
* Run tests with play 2.4
* restore comment
2022-06-14 12:10:53 +03: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
6a0ca530b7
Instrumentation API changes: VirtualField ( #6017 )
...
* Instrumentation API changes: VirtualField
* change class name in string constant
2022-05-12 11:17:24 -07:00
Mateusz Rzeszutek
87b412fb40
Instrumentation API changes: OperationMetrics, OperationListener ( #6016 )
...
* Instrumentation API changes: OperationMetrics, OperationListener
* errorprone
2022-05-12 11:16:46 -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
Lauri Tulmin
5267462b06
Fix http concurrency test with large responses ( #5648 )
...
* Debug http client concurrency test failures
* debugging
* context porpagation to callbacks isn't really implemented
* verify that request succeeds in single connection concurrency test
* spotless
* verify request status in http client concurrency test
* update comment
* remove large response
* Trigger Build
* Update instrumentation/netty/netty-3.8/javaagent/src/test/groovy/Netty38ClientTest.groovy
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-03-25 10:03:22 -07:00
Lauri Tulmin
b3496381f1
Write http server tests in java ( #5501 )
...
* Write http server tests in java
* typo
* Apply suggestions from code review
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* add comments
* address review comments
* use Predicate
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-03-08 14:21:59 -08:00
Trask Stalnaker
53a8b85f4c
Updates to http.server_name ( #5369 )
...
* Updates to http.server_name
* Tests
* fix
* armeria
* fix
* fix
* codenarc
2022-02-18 09:38:21 -08:00
Lauri Tulmin
cc60ffb6e0
Fix netty38 latest deps test ( #5392 )
2022-02-17 07:29:24 -08:00
Lauri Tulmin
9f98a0953a
Disable connection pooling in netty38 tests ( #5384 )
2022-02-17 11:02:43 +02:00
Trask Stalnaker
022914139e
test latest deps cleanup ( #5269 )
...
* test latest deps cleanup
* Revert currently irrelevant change
* Update instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2022-02-01 09:49:07 -08:00
Mateusz Rzeszutek
8b767ac435
Refactor HTTP attributes extractors to use composition over inheritance ( #5267 )
...
* Refactor HTTP attributes extractors to use composition over inheritance
* Rename remaining variables: *Extractor to *Getter
2022-01-31 09:25:27 -08:00
Mateusz Rzeszutek
edc185b133
Rename ServerSpanNaming to HttpRouteHolder ( #5211 )
...
* Rename ServerSpanNaming to HttpRouteHolder
* HttpRouteBiGetter
2022-01-25 09:44:15 -08:00
Mateusz Rzeszutek
9381d5a264
Expected server span name for null route should be HTTP GET ( #5197 )
2022-01-21 19:35:48 -08:00
jason plumb
fe8a132ee9
Factor out NetServerAttributesGetter ( #5194 )
...
* factor out NetServerAttributesGetter and favor composition over inheritance.
* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* errorprone and spotless
* spotless
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-01-21 17:01:30 -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
Mateusz Rzeszutek
540e4cfafb
Remove HttpServerTest#extraAttributes() method ( #5176 )
...
* Remove HttpServerTest#extraAttributes() method
* fix ktor tests
* fix ratpack and restlet tests
* fix servlet2 tests
* Fix webflux and vertx tests
2022-01-20 10:41:41 -08:00
Mateusz Rzeszutek
872c6c7d80
Add `http.route` to the server span when `ServerSpanNaming` is updated ( #5086 )
...
* Add `http.route` to the server span when `ServerSpanNaming` is updated
* fix camel tests
* fix test compilation failure
* assert route in camel instrumentation
2022-01-14 13:52:06 -08:00
Nikita Salnikov-Tarnovski
1a9c633b4b
Rename some packages, move some classes ( #5043 )
...
* Rename some packages, move some classes
2022-01-09 13:26:51 +02:00
Mateusz Rzeszutek
a65e9633ba
Refactor `ServerSpanNaming` (in preparation for `http.route`) ( #4852 )
...
* Refactor ServerSpanNaming (in preparation for http.route)
* fix tests
* Add ServerSpanNaming to all HTTP server instrumentations
* fix tests
2021-12-14 10:11:20 +01:00
Lauri Tulmin
313979a467
Fix http.url handing in vert.x 3 http client ( #4739 )
...
* Fix http.url handing in vert.x 3 http client
* correct version
* fix build
* if https test is disabled use http for non routable aadress test
* if https test is disabled use http for non routable aadress test
* use StringBuilder
2021-12-01 10:51:53 -08:00
Trask Stalnaker
f7efe07b06
Merge start and end time extractors ( #4692 )
2021-11-29 22:07:49 -08:00
Lauri Tulmin
d53c276b96
Ensure that netty 4.0 instrumentation is not applied to 4.1 ( #4626 )
...
* Enusre that netty 4.0 instrumentation is not applied to 4.1
* formatting
* cross test netty instrumentation
2021-11-11 08:38:56 -08:00
Nikita Salnikov-Tarnovski
e7b8cca107
Convert TextMapSetters and TextMapGetters to enums ( #4522 )
...
* Convert TextMapSetters to enums
* Convert TextMapGetters to enums
2021-11-08 22:01:40 +02:00
Mateusz Rzeszutek
958f1c039c
Trace DNS resolution in Netty 4.1 ( #4587 )
...
* Trace DNS resolution in Netty 4.1
* Fix reactor-netty 0.9 tests
* Update instrumentation/netty/netty-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/v4_1/client/InstrumentedAddressResolverGroup.java
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-11-05 11:37:54 -07:00
Mateusz Rzeszutek
8f73c43866
Consistently set http.scheme in all netty instrumentations ( #4576 )
2021-11-03 09:51:11 -07:00
Mateusz Rzeszutek
e9ba87d6b3
Migrate Netty 3.8 CONNECT instrumentation to Instrumenter API ( #4492 )
...
* Migrate Netty 3.8 CONNECT instrumentation to Instrumenter API
* Move shouldStart()
2021-10-26 17:28:31 +02:00