Commit Graph

173 Commits

Author SHA1 Message Date
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
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
jack-berg 94ba33e395
Use contrib AwsXrayPropagator (#7234)
Reflects move of `AwsXrayPropagator` to
[opentelemetry-java-contrib/aws-xray-propagator](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-xray-propagator).
2022-11-21 11:31:17 -08:00
Trask Stalnaker 61ed2d14db
Update SDK version (#7223)
Resolves #7221 
Resolves #7222
2022-11-18 18:13:39 +00:00
Trask Stalnaker 5345c87680
End groovy files with newline (#7127) 2022-11-10 12:21:55 +01: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
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
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 f46ca5dfe0
Fix test latest deps (#6429) 2022-08-06 09:02:16 +02: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 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 4e3f19d469
Enable span suppression by SpanKey by default (#5779)
* Enable span suppression by SpanKey by default

* fix HTTP tests (probably)

* add exception for camel

* remove suppression tests from @WithSpan instrumentations

* remove suppression tests from @WithSpan instrumentation; spring boot autoconfigure

* fix twilio tests

* fix netty-based HTTP clients, remove AWS SDK 1.11 unit test

* fix elasticsearch tests

* codenarc

* spotless

* fix AWS SDK 1.11 tests

* remove a TODO

* code review comments

* fix merge conflict

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-04-19 14:13:09 -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
Anuraag Agrawal 14372adb68
Migrate Guava tests to Java (#5668)
* Migrate Guava tests to Java

* Update instrumentation/guava-10.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/guava/ListenableFutureTest.java

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>

* Workaround inline mock issue

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-03-24 14:14:09 +09:00
Anuraag Agrawal cd528e98fb
Rename library entrypoints to Telemetry (#5624)
* Rename library entrypoints to Telemetry

* Renames
2022-03-22 14:39:23 +09:00
Anuraag Agrawal 213057d057
Run check during testing and assemble during building (#5619) 2022-03-18 13:48:51 +09:00
Mateusz Rzeszutek 1ee60aa6e6
Split out RpcAttributesGetter (#5548)
* Split out RpcAttributesGetter

* code review comments

* go back to RpcAttributesGetter
2022-03-17 11:14:19 +01:00
Lauri Tulmin e9c1efece2
Update to Groovy 4 (#5532)
* Update to Groovy 4

* exclude spock from grails tests, update comment

* Update instrumentation/grails-3.0/javaagent/build.gradle.kts

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-03-09 15:07:41 -08:00
Lauri Tulmin 12e1134f57
Increase delay in attempt to fix flaky test in AbstractAws1ClientTest (#5441) 2022-02-24 08:38:16 -08: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
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
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
Anuraag Agrawal d79c26f23d
Support AWS SDK v1 request object subclasses. (#5231) 2022-01-26 13:47:34 +09: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
Anuraag Agrawal e6e2190f68
Fix most lint warnings. (#5180)
* Fix most lint warnings.

* Fix test
2022-01-20 18:28:45 +09:00
Amir Blum e28235ffd6
fix(aws-sdk): use RPC attributes from spec (#5166)
* style: rename AwsSdkAttributes to AwsSdkHttpAttributes

* feat(aws-sdk-1.11): use rpc attributes from spec

* feat(aws-sdk-2.2): use rpc attributes from spec

* fix: update apache-camel test with aws-sdk rpc attributes

* chore: lint fix

* Update instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkRpcAttributesExtractor.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRpcAttributesExtractor.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-01-19 09:51:20 -08:00
Anuraag Agrawal 6b6b22de96
Update Armeria for testing (#4730)
* Update Armeria for testing

* Fix aws sdk and netty tests for armeria update (#4841)

* Fix aws sdk tests for armeria update

* fix flaky aws11 test

* send path instread of full uri

* send path instread of full uri

* fix flaky aws11 test

* fix netty tests

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2021-12-09 08:53:56 +09:00
Trask Stalnaker ce4cef76f9
Clean up groovy assertions (#4805) 2021-12-05 23:23:58 -08:00
Steven Aerts e01422736b
Automatic AWS library instrumentor (#4607)
Like AWS X-Ray, provide an instrumentor which automatically registers
opentelemetry instrumentation in the AWS SDK without any code changes.
Those instrumentors are separate libraries published as
opentelemetry-aws-sdk-1.11-instrumentor and opentelemetry-aws-sdk-2.2-instrumentor
2021-11-22 11:15:44 -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
Lauri Tulmin bc7b125718
Fix IndexOutOfBounds in apache http clients (#4575)
* Fix IndexOutOfBounds in apache http clients

* aws test has an extra span now that http client instrumentation doesn't fail with execption
2021-11-03 09:36:41 -07:00
Lauri Tulmin 077dac8c5f
Enable ignored aws tests (#4569)
* Enable ignored aws tests

* remove unused import
2021-11-02 14:25:45 -07:00
Nikita Salnikov-Tarnovski 8ea59f0846
Rename all InjectAdapters to Setters (#4489)
* Rename all InjectAdapters to Setters

* Errorprone fixes

* Make setter public
2021-10-25 12:36:59 -07:00
Martin d314d76fce
rename `newBuilder()` to `builder()` (#4475)
* rename `newBuilder()` to `builder()`

* rename `newBuilder()` to `builder()`
2021-10-22 20:50:43 -07:00
Lauri Tulmin 9b8ab5eeec
Migrate to spock 2 (#4458)
* Migrate to spock 2

* Fix smoke test suites

* address review comments

* review comment

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-22 08:40:58 -07:00
Martin ac91dc090a
Type annotation placement (#4406)
* switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable`

* code format
2021-10-17 17:38:43 -07:00
Lauri Tulmin 745637cadd
AWS 1.11 strict context check (#4366) 2021-10-15 12:31:37 -07:00
Nikita Salnikov-Tarnovski efddb72cef
Convert AttributesExtractor to interface (#4363) 2021-10-14 08:36:47 +03:00
Nikita Salnikov-Tarnovski 99f6bcde92
Convert AwsSdk1 to Instrumenter API (#4315)
* Convert AwsSdk1 to Instrumenter API

* Apply suggestions from code review

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Polish

* Polish and tests

* Polish

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-10-08 10:48:41 -07:00
Trask Stalnaker dafc97f96e
Simplify gradle files (#4292) 2021-10-04 21:53:35 -07:00
Mateusz Rzeszutek 085066edb3
Add some testcontainers dependencies to dependencyManagement dep set (#4185) 2021-09-22 14:53:45 -07:00
Matthew Ho 6967484a97
Update groovy import order to match default IntelliJ (#1708) (#4047)
* Update groovy import order to match default IntelliJ (#1708)

* organized imports for .groovy files to follow default IntelliJ import settings

* updated intellij-setup.md

* Spotless

* drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-11 11:53:08 -07:00
Trask Stalnaker 20c72f3e98
Format kotlin gradle files (#3942)
* Add ktlint for kotlinGradle

* ktlint fails on wildcard imports

* Auto-format kotlin gradle files
2021-08-25 13:43:57 +09:00
Trask Stalnaker 3525733ea8
Enable strict context check in tests by default (#3822) 2021-08-23 17:40:02 -07:00
Mateusz Rzeszutek 5c71d28ed7
Remove deprecated Config methods (#3908) 2021-08-23 16:44:54 -07:00
Lauri Tulmin 77dc1ecf27
Fix warning in build scripts (#3739) 2021-08-02 19:37:35 +03:00
Anuraag Agrawal f601863d12
Merge Java TraceUtils into extension and switch to Instrumenter API. (#3532)
* Merge Java TraceUtils into extension and switch to Instrumenter API.

* Woah
2021-07-10 13:21:12 +09:00