Commit Graph

188 Commits

Author SHA1 Message Date
Trask Stalnaker 83b5121f75
Handle port and IPv6 in forwarded headers (#3651)
* Handle port and IPv6 in forwarded headers

* More IPv6...

* Test proper quoted host:port for Forwarded case
2021-07-23 10:59:55 +03:00
Anuraag Agrawal 04c070ccc1
Add HTTPClientMetrics (#3598)
* Add HTTPClientMetrics

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

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-16 18:22:35 +09:00
HaloFour 256e8f2a64
Move async strategies to annotation support (#3574)
* Move async strategies to annotation support

* Fix dependencies and refactor copypasta

* Move AsyncSpanEndStrategy to annotation support project

* spotless
2021-07-16 10:55:23 +02:00
Mateusz Rzeszutek c1b5c0884d
Move caffeine patching to instrumentation-api-caching (#3559) 2021-07-14 13:59:50 +02:00
Mateusz Rzeszutek 71e7d666ed
Convert OkHttp 3 to Instrumenter API (#3538)
* Convert OkHttp 3 to Instrumenter API

* code review

* Update instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpAttributesExtractor.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-07-13 18:41:19 -07:00
Trask Stalnaker d0cb08a37b
Rename javaagent-api artifact to javaagent-instrumentation-api (#3513)
* part 1

* part 2

* Undo change in examples

* Spotless
2021-07-12 21:53:49 -07:00
HaloFour 3e8d3e88bf
Update OpenTelemetry to version 1.4.0 (#3541)
* Update to OpenTelemetry 1.4.0

* Fix breaking changes with opentelemetry-api-metrics
2021-07-10 15:53:02 +09:00
Trask Stalnaker da75a7a6c6
Style guide section for Nullable annotation usage (#3499)
* Style guide section for Nullable annotation usage

* Set default to non-null

* More doc

* Review feedback
2021-07-08 08:54:26 -07:00
Trask Stalnaker 9e4da754c2
Use consistent logger field name (#3515) 2021-07-07 10:47:46 -07:00
Trask Stalnaker 0299428017
Fix maven packaging for instrumentation-api-caching (#3471)
* Fix maven packaging for instrumentation-api-caching

* Use new shadow pattern
2021-07-05 23:14:48 -07:00
Trask Stalnaker f5d6b39b72
Update Apache HttpAsyncClient to Instrumenter API (#3490) 2021-07-05 14:08:38 -07:00
Mateusz Rzeszutek 15ed01d4fc
Change all instrumentation names to io.opentelemetry.{libName}-{libVersion} (#3411)
* Change all instrumentation names to io.opentelemetry.{libName}-{libVersion}

* minumum supported version
2021-06-30 15:34:36 +02:00
Anuraag Agrawal 93632d3f27
Rename instrumentation-api builds to kotlin (#3446)
* Rename instrumentation-api builds to kotlin

* Migrate

* Small cleanup
2021-06-30 19:20:55 +09:00
Mateusz Rzeszutek c1a0333cdb
Port AsyncSpanEndStrategy to Instrumenter API (#3262)
* Port AsyncSpanEndStrategy to Instrumenter API

* code review comments

* rename to AsyncOperationEndSupport

* weak-ref agent strategy storage; and passing response to Instrumenter if types match

* fix tests
2021-06-29 16:51:17 +02:00
Anuraag Agrawal 153bf1457a
Simplify jflex configuration (#3431) 2021-06-29 20:15:15 +09:00
Anuraag Agrawal 785dc6adf2
Rename build files to build.gradle (#3409)
* Rename build files to build.gradle

* Rename smoke-tests

* Fix already broken
2021-06-25 16:10:31 +09:00
Trask Stalnaker bcb282a220
Conform to google style guide checkstyle (#3399) 2021-06-24 10:53:23 +03:00
Anuraag Agrawal deb0e255cf
Use plugins block everywhere for applying plugins (#3386)
* Use plugins block everywhere for applying plugins

* Actually it's library instrumentation
2021-06-24 11:13:35 +09:00
Mateusz Rzeszutek 0a8907d927
Hide Config#create() method and use builder everywhere (#3338)
* Hide Config#create() method and use builder everywhere

* Deprecate Config#asJavaProperties()
2021-06-17 10:39:39 -07:00
Anuraag Agrawal 91a2c18f30
Migrate jacoco.gradle to plugin (#3330) 2021-06-16 10:09:05 -07:00
Mateusz Rzeszutek 3e28b01e42
Spring Integration javaagent instrumentation (#3295)
* Spring Integration javaagent instrumentation

* codenarc

* inline gradle property

* Conditionally create CONSUMER spans instead of always INTERNAL

* merge fix

* Add attributes assertions to rabbitMq test

* minor fix

* fix javadocs

* Code review follow-up
2021-06-16 14:12:39 +03:00
Anuraag Agrawal a818f14957
Migrate publish.gradle to convention plugin (#3312)
* Migrate publish.gradle to convention plugin

* Migrate usages of publish.gradle

* Remove publish.gradle

* Newline
2021-06-15 22:12:48 +09:00
Anuraag Agrawal 224dc51e93
Migrate java.gradle to conventions plugin (#3289)
* Migrate java.gradle to convention plugin.

* Switch to java-conventions

* Remove old file

* Fix

* Fix merge

* Missing paragraph

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-15 08:10:39 +09:00
Trask Stalnaker 9f31a057b6
Refactor span names class (#3281)
* spanNameForMethod

* spanNameForClass

* Cache simple name using ClassValue
2021-06-14 11:56:40 -07:00
Trask Stalnaker 62f1f49bcd
Intellij cleanup (Java and Groovy) (#3285)
* Intellij cleanup

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/code/CodeAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/DbAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/SqlAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesExtractorTest.java

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

* Update instrumentation/spring/spring-web-3.1/library/src/test/java/io/opentelemetry/instrumentation/spring/httpclients/RestTemplateInterceptorTest.java

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

* Use glassfish version that supports lambdas

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-06-14 10:23:01 -07:00
Mateusz Rzeszutek 1cc893b009
Spring Integration library instrumentation (#3120)
* Spring Integration library instrumentation

* testLatestDeps

* attributesExtractor

* errorprone

* Code review comments

* rename package messaging -> integration

* move package in groovy files too

* thread local map

* Revert "thread local map"

This reverts commit 7c8d614f4c.

* Always extract parent SpanContext from the incoming message

* checkstyle

* codenarc
2021-06-10 14:51:32 +02:00
Trask Stalnaker e9c3df6dac
Static factory method ordering (#3206) 2021-06-07 15:29:30 -07:00
Anuraag Agrawal 2436499a09
Update to Errorprone 2.7 (#3181)
* Update to errorprone 2.7

* ToString

* Finish
2021-06-04 10:40:55 +09:00
Mateusz Rzeszutek 5e4c5684e6
Moved jdbc-datasource instrumentation to Instrumenter API (#3160) 2021-06-02 23:45:11 -07:00
Anuraag Agrawal c3dedbb64e
Enable all errorprone checks (#3155)
* Enable all errorprone checks

* Fixes

* Finish

* Finish

* Add flag to disable error prone
2021-06-01 17:41:08 +09:00
Anuraag Agrawal c3ed9a381b
Add an optimized Attributes implementation for instrumenter (#3136) 2021-05-31 10:42:15 +09:00
dengliming ca5b792f95
Update methods-javaagent to Instrumenter API (#3070)
* Update methods-javaagent to Instrumenter API

Signed-off-by: dengliming <liming.d.pro@gmail.com>

* introduce SpanNames

Signed-off-by: dengliming <liming.d.pro@gmail.com>

* Add test for SpanNames

Signed-off-by: dengliming <liming.d.pro@gmail.com>

* Fix merge

* Codenarc

* Remove unused dep

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 17:23:50 -07:00
Anuraag Agrawal ed88cca533
Migrate from spotbugs to errorprone (#3122)
* Migrate from spotbugs to errorprone

* Fix hashtable

* try-with-resources

* Fix from merge

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 14:23:40 -07:00
Lauri Tulmin 35d6bdb730
Hibernate query span naming (#3106)
* Hibernate query span naming

* remove commented out code

* modify query sanitizer to accept queries that start with from clause

* add sql sanitizer test for queries starting with from

* rename hibernate-4.3 to hibernate-procedure-call-4.3
2021-05-28 11:31:52 -07:00
Anuraag Agrawal c358a35414
Use dependency management pattern for dependency versions (#3113)
* Use dependency management pattern for dependency versions.

* Add groovy bom too

* Update dependencyManagement/dependencyManagement.gradle.kts

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 11:32:08 +09:00
Ago Allikmaa 165bc1e492
Akka propagation fix and concurrency tests (#3099) 2021-05-27 09:43:09 -07:00
Anuraag Agrawal acedbff78d
Migrate gRPC to Instrumenter API (#3073)
* Migrate gRPC to Instrumenter API

* Don't unwrap grpc exception

* Fix merge and cleanup
2021-05-27 15:40:53 +09:00
Trask Stalnaker c8ecd9a619
Add response type parameter to db attributes extractor (#3093)
* Add response type parameter to DbAttributesExtractor

* AutoValue

* ResultSet
2021-05-26 23:13:33 -07:00
Trask Stalnaker a6c3d80b50
Update cassandra-3.0 to Instrumenter API (#3066) 2021-05-25 21:45:03 -07:00
Mateusz Rzeszutek d755654c29
[WIP] Add peer.service to Instrumenter API (#3050)
* [WIP] Add peer.service to Instrumenter API

* Move PeerServiceAttributesExtractor to javaagent-api and use reflection to add it

* Finish PeerServiceAttributesExtractor

* Fix tests

* Add peer.service to apache-httpclient-5.0, jedis-1.4, lettuce-4.0
2021-05-25 15:31:41 +02:00
Trask Stalnaker 1583683aec
Add Nullable to Instrumenter API response args (#3041) 2021-05-24 09:14:48 -07:00
Trask Stalnaker f11bd75710
Don't use singleton for propagator getters/setters (#3054) 2021-05-21 11:48:54 -07:00
Trask Stalnaker 329233e576
Change a couple of Longs to Integers in Instrumenter API (#3043) 2021-05-20 14:33:22 -07:00
Anuraag Agrawal 4b1714c3f4
Update to Gradle 7.0 (#2983)
* Update to Gradle 7.0

* Fix scala

* Restore accidental

* Fix deprecations
2021-05-14 11:52:20 +09:00
Anuraag Agrawal 057d8861fa
Record HTTP server metrics in instrumenter API. (#2877)
* Record HTTP server metrics in instrumenter API.

* Fix

* Response attributes

* Start cleaning

* Docs

* Test

* Finish test

* Cleanups

* Cleanups
2021-05-12 17:49:12 +09:00
Lauri Tulmin d29bf39428
Don't set span status to unset (#2956) 2021-05-11 16:14:19 -07:00
Trask Stalnaker 10db083e77
Update to OTel API/SDK 1.2.0 (#2945)
* Update to OTel API/SDK 1.2.0

* TCP.IP -> tcp_ip

* Fix smoke tests
2021-05-10 10:14:07 -07:00
Hangzhi 60ee981d07
Prevent http.url containing credentials in HttpClientTracer (#2707)
* http.url must not contain credentials

* remove user info from url

* Update HttpClientTracerTest.groovy

fix inconsistency in protocol

* fix httpClient and httpServer

* Update HttpServerTracer.java

* Only scrub userinfo if present

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-05-06 23:31:26 -07:00
Lauri Tulmin 1fba62807f
Resteasy server span naming (#2900)
* Resteasy server span naming
2021-05-06 15:04:56 +03:00
Lauri Tulmin 357140c081
Server span naming for servlet filters (#2887)
* Server span naming for servlet filters

* wildfly default servlet has empty mappings

* jetty11 requires java11

* try a differnt way to disable jetty11 tests on java8

* Update instrumentation/servlet/servlet-5.0/javaagent/src/test/groovy/TomcatServlet5FilterMappingTest.groovy

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

* review fix

* rework to use InstrumentationContext

* remove debugging code

* move MappingResolver to avoid ClassCastException on wildfly

* Update instrumentation/servlet/servlet-3.0/javaagent/src/test/groovy/TomcatServlet3FilterMappingTest.groovy

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

* review fixes

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-05-06 13:25:17 +03:00