Commit Graph

222 Commits

Author SHA1 Message Date
Anuraag Agrawal fe41885ee6
Switch to colon notation for dependencies. (#2994)
* Switch to colon notation for dependencies.

* Even more cleanup

* Revert mistake
2021-05-15 15:31:06 +09:00
Trask Stalnaker cd3dd581f9
Fix some remote connection tests (#2933) 2021-05-10 12:19:39 +09:00
Mateusz Rzeszutek 9c7fae3b04
Extract javaagent-extension-api from tooling & spi (#2879) 2021-05-06 23:30:25 -07:00
Lauri Tulmin 9464134ffd
Test failing async http request (#2812) 2021-04-19 14:11:27 -07:00
Trask Stalnaker 3bc058b10b
Don't create duplicate headers (#2727)
* Test infra

* Update examples

* Update instrumentation

* Update tests

* jaxrs-client fixes

* Remove doRequest/doReusedRequest

* Fix muzzle

* some fixes

* fix test

* doc

* not private

* Apply to doRequestWithCallback also

* Update doc

* groovy

* better

* Don't hardcode traceparent

* Reuse request in SpringRestTemplateTest
2021-04-12 12:21:16 +03:00
Anuraag Agrawal d8f6018ba6
Split HttpClientTest execution methods for sync and callback (#2675) 2021-04-06 15:26:01 -07:00
Trask Stalnaker 6ea316e22e
Remove timeout annotations (#2725) 2021-04-06 16:36:18 +09:00
Trask Stalnaker 92f1223aee
Remove unnecessary skipVersions (#2671)
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-04-01 19:02:20 -07:00
Mateusz Rzeszutek ae23b97ec4
Move and rename NetPeerUtils (#2548)
* Move and rename NetPeerUtils

* Rename NetPeerUtils to NetPeerAttributes; inject instance instead of using a global var
* Rename SpanAttributeSetter to AttributeSetter (might be used to set on AttributesBuilder in the future, who knows)
* Deprecate default BaseTracer constructor: library instrumentations are supposed to inject all dependencies, the javaagent should explicitly pass globals

* fix compilation failure

* Remove peer.service customization from library instrumentation
2021-03-16 13:50:19 +01:00
Trask Stalnaker 62f2611486
Update instrumentation names (#2433) 2021-03-01 19:34:25 -08:00
Anuraag Agrawal 000df967ce
Update to SDK 0.17.0 (#2338)
* Update to SDK 0.17.0

* Finish

* ottrace
2021-02-19 15:51:55 +09:00
Lauri Tulmin 50cc8ddc8f
Add support for apache httpclient5 (#2254)
* Add support for apache httpclient5

* review fixes

* copy commnet from httpclient-4 instrumentation

* rebase
2021-02-17 22:03:29 +02:00
Mateusz Rzeszutek ee090aee1e
Support library instrumentations with HttpServerTest & HttpClientTest (#2299) 2021-02-16 09:05:23 -08:00
Trask Stalnaker 1311bd1ed8
Propagate context to apache httpclient async callback (#2276) 2021-02-15 23:33:34 -08:00
Trask Stalnaker fbd55068c8
Remove unnecessary dynamic typing (#2277) 2021-02-16 07:52:07 +02:00
Nikita Salnikov-Tarnovski e9a4b952dd
Add causality test with multiple concurrent requests (#2156)
* Add causality test with multiple concurrent requests

* Include support for Reactor Netty 1.0 into README.md

* Fix muzzle conf

* Fix muzzle and version constraints

* More strict causality check

* Better muzzle config

* Fixing muzzle

* Fixing deps

* Better library

* Better naming
2021-02-05 12:39:42 +02:00
Lauri Tulmin 640a7d624b
Correct some spelling mistakes (#2025) 2021-01-12 11:10:45 -08:00
Pavol Loffay 077d8b64f6
Move common matchers to tooling/bytebuddy/matcher and ignore matchers to tooling/matcher (#1965) 2021-01-10 12:35:53 -08:00
Trask Stalnaker a20986c9d9
HttpClientTracer cleanup: apache-httpclient (#1907) 2020-12-15 08:53:09 +02:00
Trask Stalnaker e2264222ce
HTTP client instrumentation cleanup, part 0 (#1893) 2020-12-14 16:34:06 -08:00
Trask Stalnaker 65f54e450b
Use Context more in HttpClientTracer (#1811)
* Use Context more in HttpClientTracer

* Better http-url-connection response object

* Follow database semantic conv for elasticsearch-rest

* Remove unnecessary CallDepth tracking
2020-12-03 11:47:08 -08:00
Trask Stalnaker 26f254b10d
Create javaagent dirs for all instrumentations, part 2 (#1794) 2020-11-28 22:26:49 -08:00
Trask Stalnaker 5f263644da
Create javaagent dirs for all instrumentations (#1668)
* Create javaagent dirs for all instrumentation

* Add note about kotlin coroutine library instrumentation

* Feedback
2020-11-28 21:04:16 -08:00
Trask Stalnaker b683c2ff05
Convert the last two decorators to tracers and delete BaseDecorator (#1785) 2020-11-28 10:50:41 -08:00
Mateusz Rzeszutek 9a64a628ea
Make instrumentations non final (#1752)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-26 11:22:25 -08:00
Mateusz Rzeszutek 50c8ab499d
Remove no longer needed helperClassNames() methods (#1755) 2020-11-24 20:50:32 -08:00
Mateusz Rzeszutek 45646ff367
Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization() (#1741)
* Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization()

* Removed no longer needed comments & improved JavaDoc

* Improve TypeInstrumentation Javadoc
2020-11-24 14:27:58 +02:00
Trask Stalnaker cecdfc2cd0
Update instrumentation names to be consistent (#1671)
* Update instrumentation names to be consistent

* Remove amqp from rabbitmq package name
2020-11-18 19:53:31 -08:00
Nikita Salnikov-Tarnovski 3c195f3273
Limit latest test version for Apache HttpClient 2.0 (#1676) 2020-11-18 14:57:58 +02:00
Mateusz Rzeszutek 1a23ac3027
Standardize instrumentation names in InstrumentationModules (#1648)
* Standardize instrumentation names in InstrumentationModules

* rename gradle modules:
  * vertx-3.0 to vertx-web-3.0
  * spark-web-framework-2.3 to spark-2.3
* add JavaDoc describing the naming rules to InstrumentationModule
2020-11-17 13:30:28 -08:00
Trask Stalnaker 6d5ec329d6
Enable checkstyle for google style guide (#1641) 2020-11-16 18:46:59 -08:00
Mateusz Rzeszutek d307ffc532
Refactor Instrumenters into InstrumentationModules - A, B, C (#1556)
* Refactor Instrumenters into InstrumentationModules - A, B, C

* Fixed some modules' names to match library/instrumentation gradle module

* Fix couchbase 2.6 muzzle
2020-11-09 15:42:41 +01:00
Anuraag Agrawal d3b60a5e33
Rename TRACER to tracer() (#1540) 2020-11-02 20:49:51 -08:00
Anuraag Agrawal c6eee70660
Update to latest snapshot. (#1524) 2020-10-29 18:54:09 -07:00
Anuraag Agrawal f6ad05b8e3
Update to latest SDK snapshot (#1384)
* Update to latest SDK snapshot

* Use published snapshot

* Fixes

* Cleans

* spotless

* Most

* Clean

* Merge

* Temporarily remove context interop

* WIP

* Prepare for intercepting propagated span

* Bump SDK

* IDE updates

* Lots

* compileJava

* Done?

* bar

* Spot

* drugs

* Groovy--

* green for me

* Spot

* Remove grpc import

* Scrub
2020-10-25 15:14:32 +09:00
Vadim Shaigorodskiy 9e8d663ba4
Remove apache httpclient version (#1446)
* Remove version from `apache-httpclient` instrumentation

Fixes: #1260

* Remove version from all instrumentation names and add instrumentation name to `spring-web`

Fixes: #1260
2020-10-22 14:22:44 +09:00
Trask Stalnaker 1b51d4a6b1
Rename packages (#1367) 2020-10-11 13:54:35 -07:00
Anuraag Agrawal dadaac9a8c
Use 2-line license header to match SDK repo (#1321)
* Use 2-line license header to match SDK repo

* Apply change
2020-10-05 14:29:56 +09:00
Nikita Salnikov-Tarnovski beb1901f5f
Review semantic convention for Http Client spans (#1214)
* Review semantic convention for Http Client spans

* Polish

* Update instrumentation/google-http-client-1.19/src/test/groovy/AbstractGoogleHttpClientTest.groovy

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-18 17:52:08 +03:00
Nikita Salnikov-Tarnovski bc98955176
Update to latest otel-java snapshot (#1057)
* Update to latest otel-java snapshot

* Upgrade to working otel-java snapshot

* Update to latest otel-java snapshot

* Update to latest otel-java snapshot
2020-08-26 22:03:28 +03:00
Trask Stalnaker 5d2ae07797
Use startScope() on all HttpClientTracers (#971) 2020-08-18 16:59:30 -07:00
Anuraag Agrawal bbfdbb39c0
Create abstraction for library dependencies for instrumentation. (#977)
* Create abstraction for library dependencies for instrumentation.

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-08-19 08:57:31 +09:00
Trask Stalnaker 414213f2d1
Remove final from parameters (#1003) 2020-08-15 22:35:51 -07:00
Trask Stalnaker f893ca540b
Scripted package renaming (#988) 2020-08-15 21:55:01 -07:00
Helen Y bb235a0aa3
Update package name for tracers (#991) 2020-08-14 21:07:18 -07:00
Trask Stalnaker 7818e33178
Package renaming (#970) 2020-08-13 20:14:46 -07:00
Helen Y 09c597e8e0
Change the rest of decorators to tracers (#922) 2020-08-13 11:55:08 -07:00
Trask Stalnaker b5fbf90977
Extract instrumentation api module (#884) 2020-08-09 22:52:33 -07:00
Trask Stalnaker f9f6d1f6b3
Change library shading approach (#930) 2020-08-09 11:16:34 -07:00
Helen Y 1fcb807590
Refactor HttpClient typed Decorators to Tracers (#893)
* initial work

* Change OkHttp decorators to tracers

* Change AkkaHttpClient decorator to tracer

* Change ClientDecorator to GrizzlyClientTracer

* Change NettyClientDecorator to Tracer

* Change netty3.8 client decorator to tracer

* Update netty4.1 client decorator to tracer

* Override startScope in child tracers when applicable

* Change KHttpDecorator to tracer

* Change HttpUrlConnectionDecorator to tracer

* Fix muzzle validation failure for grizzly client

* Fix a ratpack client test failure

* Address feedback

* Update delegate for setPeer

* Remove nested try

* Remove unnecessary null check

* Remove asserts

* Add a comment for overriding startSpan(String spanName)

* Remove an irrelevant comment

* Throw an exception when getSetter is null

* Change onPeerConnection to static

* Change getSetter() to be abstract
2020-08-06 17:14:19 -07:00
Helen Y 86c438b154
Remove final from local variables (#732)
* Remove final from local variables
2020-07-20 13:53:34 +09:00
Munir Abdinur 3662cee7ec
Create instrumentation-core apache-httpclient-4.0 (#694) 2020-07-16 20:00:26 -07:00
Trask Stalnaker fedd805a44
Fix response header capture (#649) 2020-07-08 08:29:02 +03:00
Nikita Salnikov-Tarnovski a62801649f
More fixes for Gradle warnings (#643)
* More gradle deprecation warnings fixed

* More gradle deprecation warnings fixed

* More fixes

* More fixes

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2020-07-07 15:02:07 +03:00
Sergei Malafeev 9a5954a8ff
#593 Remove HttpClientTest.READ_TIMEOUT_MS (#635)
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-07-07 08:24:42 +03:00
Anuraag Agrawal 1aae2bd7f0
Add extension point for HTTP client decorators to return headers gene… (#623)
* Add extension point for HTTP client decorators to return headers generically instead of only user agent.
2020-07-02 14:29:21 +09:00
Anuraag Agrawal 874b157fe5
Newline between license and package. (#581) 2020-06-25 13:31:16 -07:00
Anuraag Agrawal 918d3913e3
Populate user-agent in HTTP clients. (#540) 2020-06-22 21:13:12 -07:00
Tyler Benson 1b29184e7c Make rootDir usage consistent (DataDog/dd-trace-java#1518) 2020-06-11 10:14:02 -07:00
Anuraag Agrawal f13a9c4932
Move client span creation to decorator and automatically suppress creation of neste… (#460)
* Move client span creation to decorator and suppress creation of nested client spans.

* Store subtree client span in context.

* Apply new pattern to AWS V1 SDK instrumentation too, cleanup, and javadoc
2020-06-08 12:01:43 -07:00
Trask Stalnaker ce3d764ffa Merge commit '437e0f343dcd66ac344556c03bd340ce791b1fdd' into correct-history 2020-04-21 12:55:51 -07:00
Trask Stalnaker 1f0cd54fd7
Remove copyright year from license header (#322)
* Update template

* Apply template
2020-04-15 11:24:44 -07:00
Trask Stalnaker a333cfe536
Remove unused getComponentName (#314) 2020-04-14 13:29:33 -07:00
Trask Stalnaker d24159c8d2 Merge tag 'v0.48.0' into dd-merge 2020-04-12 15:20:10 -07:00
Trask Stalnaker c545ffa3c2 Merge tag 'v0.47.0' into dd-merge 2020-04-06 13:26:15 -07:00
Trask Stalnaker 4fe685d916
Remove component attribute (#291) 2020-03-29 20:32:19 -07:00
Trask Stalnaker 2e210683fd
Update to OpenTelemetry API/SDK 0.3.0 (#286)
* Update gradle dependencies and module name

* Replace Tracer.withSpan() with currentContextWith()

* Update inject to 0.3.0

* Update extract to 0.3.0

* More updates

* Remove distributedcontext package refs

* Update OpenTelemetry API interoperability

* No need to call setNoParent()

setParent(SpanContext.getInvalid()) should give the same result.
2020-03-28 19:38:51 -07:00
Trask Stalnaker 68bafd6e0c
Update instrumentation package names, A-J (#266) 2020-03-23 11:22:54 -07:00
Trask Stalnaker 396baa69d6
Update OpenTelemetry API/SDK (#257)
* Update dependency version

* Change getTracerFactory to getTracerProvider

* Update some imports

* Change put to set

* Fix up bridge

* Update package names

* Update test SpanProcessor

* Remove null conditionals around setAttribute

* Update shading

* Update span context extraction
2020-03-20 14:13:55 -07:00
Trask Stalnaker 2298885678 Merge tag 'v0.46.0' into dd-merge 2020-03-16 11:25:27 -07:00
Han Zhang 5b1218cdb8
Update instrumentation to be compliant with HTTP semantic conventions (#227)
* Update HTTP client-side span names

* Add query and fragment to  http.url for HTTP client spans

* Add query and fragment to http.url for HTTP server spans

* Update HTTP server span names to be the matched route or resource

* Use net.peer.* instead of peer.* attributes
2020-03-12 18:49:52 -07:00
Trask Stalnaker d3a931384d
Add grouping modules (#220)
* Add mongo grouping module

* Add play and play-ws grouping modules

* Add netty grouping module

* Add jaxrs grouping module

* Add jaxrs-client grouping module

* Add jedis grouping module

* Add log4j grouping module

* Add couchbase grouping module

* Add aws-sdk grouping module

* Add apache-httpclient grouping module
2020-03-10 15:56:41 -07:00