Commit Graph

1649 Commits

Author SHA1 Message Date
Trask Stalnaker a57bfcf40e
Capture log4j 1.x events (#181) 2020-02-24 11:37:15 -08:00
Trask Stalnaker 8ee04d54e9 Merge remote-tracking branch 'datadog/master' into dd-merge 2020-02-22 14:35:03 -08:00
Pontus Rydin 239eb53a44
Removed statically loaded exporters and added more tests (#171)
* Classloader done. Still needs shading

* First working version

* Made the dummy exporter slightly less stupid

* Use SPI pattern for loading. Added runtime shader

* Changed to do shading on binary stream instead of loading the class first

* Protected the runtime shader from having its internals shaded

* Cleaned up code and naming

* Cleaned up

* Cleaned up and fixed test issues

* Minor fixes from code review

* Added exporter smoke tests

* Finalized exporter smoke tests

* Reenabled springboot test

* Fixed some copy-paste issues

* Initial work on exporter bridges

* Implemented dynamically loaded exporter adapters

* Added some more files

* Added exporter-adapters for well-known exporters

Moved dummy-exporter to exporter adapters

Removed -Dota.exporter option in favor of ota.exporter.jar

Added basic exporter tests to smoketest

Increased timeout for Finatra server start to help with parallel test execution

* Cleaned up tests, removed dead code and updated README

* Update README.md

* Update README.md

* Removed references to gRPC dependencies needed by Jaeger

* Fixed incorrect use of ServiceLoader in test

* Fixed test dependencies

* Adjusted exporter tests

* Fixed codeNarc issues

* Fixed CircleCI issues

* Added tests to check what CircleCI is doing

* Added missing logging directory

* Removed deadline() from Jaeger factory

* Another attempt to make it pass CircleCI

* Fixed some minor codeNarc issues

* Wrapped test config in doFirst

* Change forEach -> each

* Removed README section about commercial exporters

* Reduced number of changes to Config

* Fixed field reordering issue

* Removed references to dummy exporter

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-02-21 15:12:48 -08:00
Trask Stalnaker ebf3d78274
Remove Glassfish instrumentation (#176) 2020-02-21 11:01:17 -08:00
Trask Stalnaker 23f6e1513d
Capture servlet dispatch as INTERNAL span (#156) 2020-02-21 09:31:48 -08:00
Trask Stalnaker e62d93bb6c
Add instrumentation for OpenTelemetry API itself (#153) 2020-02-21 09:10:01 -08:00
Trask Stalnaker 36eeaa0f3f
Latest tomcat release seems to have some issues (#180)
Instrumentation muzzled: [jsp, jsp-compile] -- datadog.trace.instrumentation.jsp.JasperJSPCompilationContextInstrumentation on jdk.internal.loader.ClassLoaders$AppClassLoader@2c13da15
-- datadog.trace.instrumentation.jsp.JSPDecorator:39 Missing method getServletContext#()Ljavax/servlet/ServletContext;

Co-authored-by: Tyler Benson <tylerbenson@gmail.com>
2020-02-21 08:52:24 -08:00
Trask Stalnaker 4421a84a54
Instrument newer Mongo (sync) API (#174)
* Remove now unnecessary code

* Add instrumentation for newer mongo client api
2020-02-20 14:54:45 -08:00
Trask Stalnaker 0f98f41d1c
Capture java util logging events (#175)
* Remove unused relocation

This relocation is not needed for instrumentation.

* Improve consistency of logs.injection naming

* Fix property based config init

* Capture java.util.logging events

* Fix shading

* Add comment about two part shading
2020-02-20 14:29:36 -08:00
Trask Stalnaker a652e39177
Misc minor cleanups (#178)
* Use singleton map for consistency

* Use singletonMap static import for consistency

* Remove unnecessary attribute
2020-02-20 14:21:25 -08:00
Trask Stalnaker ab8fb882f8
Remove async propagating disable instrumentation (#177) 2020-02-20 14:14:19 -08:00
Trask Stalnaker d54f0cd31f
Make sure call depth thread local is reset (#168)
* Make sure CallDepthThreadLocalMap is always reset

* Re-order just for consistency

* Make call depth pattern more consistent
2020-02-18 13:49:15 -08:00
Trask Stalnaker 0a3afc362f
Fix class loading instrumentation on IBM JVM (#169) 2020-02-18 11:42:00 -08:00
Trask Stalnaker 3632e3bb2d
Change some span kinds to INTERNAL (#167)
* Change handler/controller span kind to INTERNAL

* Change hibernate span kind to INTERNAL

* Change spring-data span kind to INTERNAL
2020-02-18 11:28:32 -08:00
Trask Stalnaker cf1623711e
Use links instead of overriding parent (#158)
Also, message receive span kind should be CLIENT.
2020-02-18 11:12:20 -08:00
Trask Stalnaker e718b3067e
Rename Finatra instrumentation package (#162)
I missed changing this when merging over v0.43.0
2020-02-12 20:38:02 -08:00
Trask Stalnaker 852c00193c Merge commit 'f2d8c8e6b9967b204803a3744942582191266625' into dd-merge 2020-02-12 15:35:23 -08:00
Trask Stalnaker d3f6c87bf1
More general class loading instrumentation (#152) 2020-02-12 12:08:47 -08:00
Trask Stalnaker 6522deac5b
Remove unnecessary code (#157)
This is no longer needed since RabbitCommandInstrumentation now uses
separate ThreadLocal to track rabbitmq span, instead of using current
span.
2020-02-12 11:45:33 -08:00
Trask Stalnaker 4edea7bc32
Add missing null check (#155) 2020-02-11 16:08:05 -08:00
Trask Stalnaker 215f611673
Update tracer names (#151) 2020-02-11 12:25:09 -08:00
Trask Stalnaker ab1de46852
Remove extra dir (#149) 2020-02-11 12:10:54 -08:00
Trask Stalnaker cd4a97546e
Rename boostrap and tooling modules (#146)
* Rename agent-bootstrap module to auto-bootstrap

* Rename agent-tooling module to auto-tooling

* Further renames
2020-02-07 17:01:55 -08:00
Trask Stalnaker efed5ae682
Standardize instrumentation module names (#145)
* Rename vertx module

* Rename glassfish module

* Rename google-http-client module

* Rename jms module

* Rename twilio module

* Move dropwizard-testing to top-level

Since it's not related to dropwizard-views.

* Rename dropwizard-views modules

* Rename aws-java-sdk-1.11.0 module

* Rename apache-httpasyncclient-4 module

* Rename apache-httpclient-4 module

* Rename datastax-cassandra-3 module

* Rename elasticsearch:rest-5 module

* Rename elasticsearch:transport-2 module

* Rename elasticsearch:transport-5 module

* Rename elasticsearch:transport-6 module

* Rename grizzly-2 module

* Rename jax-rs-annotations-1 module

* Rename jax-rs-annotations-2 module

* Rename filter-jersey module

* Rename jetty module

* Rename lettuce-5 module

* Rename okhttp-3 module

* Rename play-ws-1 module

* Rename play-ws-2 module

* Rename rxjava-1 module

* Rename request-2 module

* Rename request-3 module

* Rename spring-webflux-5 module
2020-02-07 16:34:36 -08:00
Trask Stalnaker 979845c7aa
Limit Hibernate latest dependency test to 5.x (#143) 2020-02-07 13:32:46 -08:00
Trask Stalnaker faec4901d2
Set span kind and remove prior "span.kind" attribute (#132)
* Set span kind in instrumentation

* Do not set span kind attribute

* Validate span kind in tests

* Remove unused constants
2020-02-05 15:12:33 -08:00
Trask Stalnaker f6949c1776
Call setNoParent() consistently (#131) 2020-02-05 14:16:09 -08:00
Trask Stalnaker 1440d95fb5
Last instrumentation conversion to OpenTelemetry API and remove prior agent API (#128)
* Convert OkHttp3 to use OpenTelemetry API directly

* Remove Agent API
2020-02-05 13:20:06 -08:00
Trask Stalnaker cb97c26ca4
Minor cleanup of Tracer declarations (#125) 2020-02-04 20:32:29 -08:00
Trask Stalnaker 16ebd812d7
Rename SpanScopePair to SpanWithScope (#124)
* Rename SpanScopePair to SpanWithScope

* Add closeScope() method and remove getScope()

* Rename spanAndScope parameters to spanWithScope

* A few more renames
2020-02-04 18:20:29 -08:00
Trask Stalnaker 5f2846abe7
Minor Hystrix test cleanup (#126) 2020-02-04 18:00:43 -08:00
Trask Stalnaker 8c3ec0cba0
Remove last dd dirs (#123)
* Remove dd dirs

* Simplify a couple of test package names

* Remove outdated comment
2020-02-04 17:43:18 -08:00
Trask Stalnaker 2248eb4871
Simplify hibernate instrumentation (#122)
* Simplify hibernate instrumentation

* Remove SessionState
2020-02-04 12:03:16 -08:00
Trask Stalnaker 54cb6dc538
Bring back Kafka Streams, RabbitMQ, and AWS Java SDK 2.2 instrumentation (#109)
* Bring back Kafka Streams instrumentation

* Bring back AWS Java SDK 2.2 instrumentation

* Bring back RabbitMQ instrumentation

* Make kafka streams instrumentation more future proof
2020-02-04 10:41:39 -08:00
Trask Stalnaker 147b42d1ff Merge tag 'v0.42.0' 2020-02-01 13:28:58 -08:00
Trask Stalnaker 2b11b37d0f
Remove trace-api artifact (#116)
* Remove unused Trace annotations

* Remove Trace annotation from benchmark code

* Remove Trace annotation from instrumentation tests

* Remove Trace annotation from smoke tests

* Remove Trace annotation from agent tests

* Remove Trace annotation from testing tests

* Remove Trace annotation from hystrix tests

* Remove Trace annotation from netty tests

* Remove Trace annotation from webflux tests

* Remove Trace annotation from reactor tests

* Remove unnecessary conditional

* Remove Trace annotation from trace annotation instrumentation

* Remove Trace annotation from akka http tests

* Remove Trace annotation from java concurrent tests

* Delete Trace annotation

* Move classes out of trace-api

* Remove trace-api artifact

* Move trace-api classes to better packages
2020-02-01 13:07:51 -08:00
Pontus Rydin 49e6309cf9
Experimental Jaeger integration (#115)
* Added simple exporter

* Updated config prefix
2020-02-01 12:22:25 -08:00
Pontus Rydin d22f38b320
Changed names of getters and removed instrumentationNames() (#112) 2020-01-31 10:33:24 -08:00
Trask Stalnaker 2d3132e9b8
Convert Trace Annotations and tests to use OpenTelemetry API directly (#110)
* Fix Dropwizard conversion to OpenTelemetry API

* Finish converting JDBC to use OpenTelemetry API directly

* Finish converting Servlet to use OpenTelemetry API directly

* Convert Trace Annotation to use OpenTelemetry API directly

* Convert tests to use OpenTelemetry API directly
2020-01-30 15:51:14 -08:00
Trask Stalnaker 291c974e9c
Change grizzly, mongo, sparkjava, spring-data, jetty, jsp, kafka-clients, lettuce to use OpenTelemetry API directly (#108)
* Convert Grizzly to use OpenTelemetry API directly

* Convert Mongo to use OpenTelemetry API directly

* Convert SparkJava to use OpenTelemetry API directly

* Convert Spring Data to use OpenTelemetry API directly

* Convert Jetty to use OpenTelemetry API directly

* Convert JSP to use OpenTelemetry API directly

* Convert Kafka Clients to use OpenTelemetry API directly

* Convert Lettuce to use OpenTelemetry API directly
2020-01-30 14:37:23 -08:00
Pontus Rydin feb21ab295
Refactored jedis-* (#113) 2020-01-30 11:31:32 -08:00
Trask Stalnaker e4b8c579b2
Change netty-*, play-*, rabbitmq, ratpack, rmi, jms instrumentation to use OpenTelemetry API directly (#102)
* Fix gRPC conversion to OpenTelemetry API

* Fix Akka conversion to OpenTelemetry API

* Convert JMS to use OpenTelemetry API directly

* Convert Netty 4.0 to use OpenTelemetry API directly

* Convert Netty 4.1 to use OpenTelemetry API directly

* Convert Play 2.4 to use OpenTelemetry API directly

* Convert Play 2.6 to use OpenTelemetry API directly

* Convert Play WS 1 to use OpenTelemetry API directly

* Convert Play WS 2 to use OpenTelemetry API directly

* Convert Play WS 2.1 to use OpenTelemetry API directly

* Convert RabbitMQ to use OpenTelemetry API directly

* Convert Ratpack to use OpenTelemetry API directly

* Convert RMI to use OpenTelemetry API directly
2020-01-29 11:19:23 -08:00
Trask Stalnaker 068823c55e
Set SpanKind for servlet requests (#88) 2020-01-27 11:49:09 -08:00
Trask Stalnaker 26355485d9
Move OpenTelemetry SDK out of the bootstrap loader (#86)
* Move OpenTelemetry SDK out of bootstrap loader

* Improve shading

After this change, the shaded opentelemetry-sdk is only used by test
modules, so it doesn't need to be published.
2020-01-27 11:11:05 -08:00
Pontus Rydin 80379fb50b Refactored jax-rs-client-* and jdbc instrumentation (#94)
* jax-rs-client refactor WIP

* Refactored jax-rs-client-1.1

* Refactored jax-rs-client-* and jdbc
2020-01-24 15:45:02 -08:00
Pontus Rydin 88957e9ab6 Refactored http-url-connection, java-concurrent, jax-rs-annotation-* (#87)
* Refactor of twilio (WIP)

* Refactored http-url-connection

* Refactored java-concurrent

* Refactored jax-rs-annotation-1

* Refactored jax-rs-annotations-2 instrumentation
2020-01-23 13:08:49 -08:00
Trask Stalnaker ee58416dae
Fix sporadic test failures (#82)
* Fix sporadic test failure

* Remove RetryOnFailure from Elasticsearch tests

* Remove retry from Hystrix tests

* Improve test verification

* Fix sporadic span order not found failures

* Add RetryOnFailure to tests with sporadic failures
2020-01-23 11:37:38 -08:00
Pontus Rydin f53167063e Refactored Twilio and Hibernate instrumentation (#81)
* Refactor of twilio (WIP)

* Refactored hibernate instrumentation

* Finished refactoring hibernate instrumentation

* Minor changes

* Minor change

* Moved files after upstream restructuring

* Fixed typo and Twilio test issues

* Refactored hibernate tests

* Fixed formatting

* Moved span auto close functionality to SessionState
2020-01-22 21:01:49 -08:00
Trask Stalnaker 819ca7c256
Simplify directory/module structure (#77)
* Move things up a directory

* Scripted mass update

find -type f -name "*.gradle" | xargs sed -i 's/:java-agent:/:/g'

* Remove plugin version now that it's in root module

* Update java-agent and instrumentation configs

* Misc
2020-01-22 13:55:47 -08:00