Commit Graph

199 Commits

Author SHA1 Message Date
Nikita Salnikov-Tarnovski c9cf7ffb61
Make auto-instr work with latest otel-java snapshot (#372)
* Make auto-instr work with latest otel-java snapshot

* Add CircleCI workflow to run nightly test job against otel-java snapshot

* Decrease snapshot versions cache time

* Add comments suggest during review

* Add comments suggest during review

* Add missed helper class

* Use released otel-java 0.4.0

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-05-04 23:18:39 -07:00
Nikita Salnikov-Tarnovski 28eaeb9fed
Allow to disable auto-instrumentation for specified methods (#369)
Add new configuration property, `trace.methods.exclude`, which marks methods which should be excluded from instrumentation. This does not affect any arbitrary auto-instrumentation. Only auto-instrumentation guided by supported annotations (see `trace.annotations` config option and its default value in TraceAnnotationsInstrumentation#DEFAULT_ANNOTATIONS) and by `trace.methods` configuration property can be disabled using this new configuration.
2020-05-04 13:17:44 -07:00
John Bley ca296b92fd
Normalize sql statements to elide literal numbers and strings. (#366)
* Normalize sql statements to elide literal numbers and strings.

* Missed one SlickTest sql normalization.

* Fix muzzle order for helper classes.

* Change name of feature flag

* Upgrade to latest spotless version in an attempt #1 to make the circleci build work.

* Attempt 2 to make circleci build happy - exclude build/generated/** from spotless.

* Attempt 3 to get circleci build working, adding *.java to the exclude line.

* Change exclude of generated files to include of just the src/ directory.
I confirmed that this properly failed the build if I remove a license header from a src/ directory.
2020-05-04 12:17:55 -07:00
Trask Stalnaker fbbccd31a6
Add DataDog trace annotation (#361) 2020-04-28 17:21:55 -07:00
Trask Stalnaker 3c4a6b545c
Fix Ratpack instrumentation for newer versions of Guava. (#360)
Ratpack 1.4 should still work if you increase your guava version to 20+ (instead of 19).

Co-authored-by: Tyler Benson <tyler.benson@datadoghq.com>
2020-04-28 13:42:16 -07:00
Pontus Rydin 9568ba079b
Use Builder::setAttribute whenever possible (#348) 2020-04-27 13:51:34 -07:00
Trask Stalnaker f9e74ac9c6
Fix some sporadic test failures (#354)
* Fix some sporadic test failures

* Improve Jetty test advice

* Fix smore sporadic test failures

* Improve test consistency
2020-04-27 11:40:27 -07:00
Trask Stalnaker ccff07abb8
Prevent instrumentation from applying too broadly (#337) 2020-04-24 15:09:30 -07:00
Nikita Salnikov-Tarnovski f958c2df2d
Add support for SignalFx and AppOptics tracing annotations (#345) 2020-04-23 21:21:25 -07:00
Trask Stalnaker ce3d764ffa Merge commit '437e0f343dcd66ac344556c03bd340ce791b1fdd' into correct-history 2020-04-21 12:55:51 -07:00
Sergei Malafeev 51cb8c6007
Add Cassandra Driver 4 instrumentation (#334) 2020-04-20 18:23:09 -07:00
Trask Stalnaker ecc26226dc Merge tag 'v0.49.0' into dd-merge 2020-04-18 16:00:00 -07:00
Trask Stalnaker 7f76929cd5
Rename resource name to span name (#327) 2020-04-16 12:13:42 -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 e8a451cbce
Remove unused service method (#321) 2020-04-15 10:17:04 -07:00
Trask Stalnaker dc90ea7acb
Simplify Spring WebMVC decorator (#324) 2020-04-15 09:44:03 -07:00
Trask Stalnaker 262ab15fa8
Change aws-sdk span kind to INTERNAL (#323) 2020-04-15 09:16:24 -07:00
Trask Stalnaker a333cfe536
Remove unused getComponentName (#314) 2020-04-14 13:29:33 -07:00
Trask Stalnaker bf5b009ef8
Remove unused code (#319)
* Remove unused/deprecated code

* Remove unused code

* Remove unused return value

* Remove unnecessary throws clauses

* Remove unused code

* Remove default attribute value

* Remove unused code

* Remove unused code

* Remove unused code

* Remove unused constants

* Remove unused constant

* Remove unused parameter

* Remove unused PostMatchHook

* Remove unused constants
2020-04-14 12:29:24 -07:00
Trask Stalnaker d94bf95bcf
Add db.url for jedis-1.4 and jedis-3.0 (#316)
* Add db.url for jedis-1.4

* Add db.url for jedis-3.0
2020-04-14 12:00:09 -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 10d93ac2a0
Fix double log capture (#299) 2020-04-01 10:49:45 -07:00
Trask Stalnaker 64b9585306
Fix gRPC Context shading (#297) 2020-03-31 15:30:42 -07:00
Trask Stalnaker 4fe685d916
Remove component attribute (#291) 2020-03-29 20:32:19 -07:00
Trask Stalnaker 570fa012c0
Remove service.name attribute (#290) 2020-03-29 20:29:15 -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 2a738506a9
Better span names for aws-sdk (#258) 2020-03-25 09:07:33 -07:00
John Bley 55deb722cf
Populate db.url for MongoDB spans. (#280) 2020-03-24 15:42:03 -07:00
Trask Stalnaker 68bafd6e0c
Update instrumentation package names, A-J (#266) 2020-03-23 11:22:54 -07:00
Trask Stalnaker c82baecb9d
Populate db.url for jdbc spans (#277) 2020-03-23 10:34:50 -07:00
Trask Stalnaker 96f89ecc48
Span name should not have http method (#279) 2020-03-23 09:52:20 -07:00
Trask Stalnaker 8fa84cb77b
Remove remaining resource.name attributes (#278)
* Remove resource.name validation from ignored tests

* Remove resource.name from test spans

* Remove unused parameter

* Change servlet dispatcher attribute name
2020-03-23 09:51:57 -07:00
Trask Stalnaker d55a8b37d0
Add Metrics API bridge (#276) 2020-03-23 09:51:18 -07:00
Trask Stalnaker da05fc7e4c
Change jdbc db.type to sql (#274) 2020-03-23 09:50:55 -07:00
Trask Stalnaker 19fa3618d4
Better span names for hystrix, finatra and dropwizard-views (#271)
* Better span names for hystrix

* Better span names for finatra

* Better span names for dropwizard-views

* Span name should be route only when available
2020-03-23 09:50:29 -07:00
Trask Stalnaker f60ff723e3
Remove resource.name attribute in ratpack, jetty, sparkjava and play (#264)
* Remove resource.name attribute in ratpack

* Remove resource.name attribute in jetty

* Remove resource.name attribute in play

* Span name should be route only when available
2020-03-23 09:50:02 -07:00
Trask Stalnaker a731e70810
Better span names for rabbitmq-amqp (#273) 2020-03-23 09:48:58 -07:00
Trask Stalnaker ef88d6f962
Better span names for jsp (#272) 2020-03-23 09:48:38 -07:00
Trask Stalnaker a5e1609325
Better span names couchbase (#270) 2020-03-23 09:48:16 -07:00
Trask Stalnaker 81b89f59db
Better span names for elasticsearch (#269) 2020-03-23 09:47:39 -07:00
Trask Stalnaker ebcf5212a5
Better span names jaxrs (#268) 2020-03-23 09:47:11 -07:00
Trask Stalnaker 9566ee9951
Better span names for hibernate (#267) 2020-03-23 09:46:48 -07:00
Trask Stalnaker d337619be7
Better span names for rmi (#265) 2020-03-23 09:46:21 -07:00
Trask Stalnaker 3233b9bef4
Better span names for spring-data (#263) 2020-03-23 09:45:55 -07:00
Trask Stalnaker a101e3a5de
Better span names for spymemcached (#261) 2020-03-23 09:45:33 -07:00
Trask Stalnaker eecb4eb978
Better span names for trace-annotation (#260) 2020-03-23 09:45:12 -07:00
Trask Stalnaker 3546980439
Better span names for twilio (#259) 2020-03-23 09:44:49 -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 8700b2eb33
Remove span.type attribute (#262) 2020-03-20 13:05:00 -07:00
Trask Stalnaker 4921fecdb1
Update instrumentation package names, K-Z (#255) 2020-03-19 22:19:22 -07:00
Trask Stalnaker a066372ff0
Better span names for spring-webflux (#246) 2020-03-19 21:48:52 -07:00
Trask Stalnaker 5287c4a0f1
Better span names for servlet (#243) 2020-03-19 21:23:52 -07:00
Trask Stalnaker 007029b122
Better span names for jdbc (#238) 2020-03-19 19:50:51 -07:00
Trask Stalnaker 11566b7e5e
Better span names for netty (#247) 2020-03-19 19:01:32 -07:00
Trask Stalnaker 5089a05c44
Better span names for spring-webmvc (#245) 2020-03-19 19:00:38 -07:00
Trask Stalnaker e028ed3f5c
Better span names for jms (#240) 2020-03-19 18:59:35 -07:00
Trask Stalnaker 8544cf7e38
Better span names for redis (#239) 2020-03-19 18:57:52 -07:00
Trask Stalnaker bdf2b8eafd
Fix file formatting (#256) 2020-03-19 18:57:05 -07:00
Trask Stalnaker d70f4ded94
Better span names for mongo (#242) 2020-03-19 14:11:24 -07:00
Trask Stalnaker 6142b7a2a4
Fix tracer names to match others (#249) 2020-03-19 14:10:17 -07:00
Trask Stalnaker a8f86d154f
Follow common childOf verification convention (#251) 2020-03-19 14:09:47 -07:00
Trask Stalnaker 18d74daf34
Remove unused code (#252) 2020-03-19 14:08:55 -07:00
Trask Stalnaker 23d0b63836
Add missing package statement (#253) 2020-03-19 14:08:19 -07:00
Trask Stalnaker d4740894d1
Follow static import convention (#254)
* Follow static import convention

* Follow decorator static field name convention
2020-03-19 13:52:20 -07:00
Trask Stalnaker 07c5923f20
Better span names for cassandra (#237) 2020-03-19 10:33:39 -07:00
Trask Stalnaker 56a1227afe
Better span names for kafka (#241) 2020-03-18 15:55:27 -07:00
Trask Stalnaker f88dabedee
Better span names for spring-scheduling (#244) 2020-03-18 15:17:33 -07:00
Trask Stalnaker 2298885678 Merge tag 'v0.46.0' into dd-merge 2020-03-16 11:25:27 -07:00
Trask Stalnaker cecabe522a
Make tests pass on Windows (#217) 2020-03-12 19:42:21 -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
John Bley 1e1f3b57bb
Fix open-telemetry/opentelemetry-auto-instr-java#226 (#228) 2020-03-12 14:00:05 -07:00
John Bley f30f5f0779
Fix 3 minor javadoc issues. (#225) 2020-03-11 13:25:39 -07:00
Trask Stalnaker 5c4dc47710
Add JBoss logging support (#222) 2020-03-10 17:14:44 -07:00
Trask Stalnaker e5b83218ae
Rename elasticsearch modules (#221) 2020-03-10 16:51:07 -07:00
Trask Stalnaker dec9b95d87
Fix logback instrumentation (#218)
* Fix logback instrumentation

* Remove unnecessary shading
2020-03-10 16:34:09 -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
Trask Stalnaker 08248e4f09
Fix link behavior (#223) 2020-03-10 15:08:22 -07:00
Trask Stalnaker 0ae9ed8a48
Prevent DNS lookup by gRPC instrumentation (#224) 2020-03-10 14:53:04 -07:00
Pontus Rydin e54ab56b3a
Implemented Apache Geode/Gemfire instrumentation (#215) 2020-03-10 11:18:36 -07:00
Trask Stalnaker cba031ddcb
Rename hibernate modules (#205)
* Rename hibernate modules

* Update tracer name

* Change from gradle inheritance to composition

This will make it possible to have empty "grouping" modules, e.g.
instrumentation:hibernate.

* Introduce empty hibernate grouping module
2020-03-09 15:33:21 -07:00
John Bley 00ae1eca3d
Integrate SpotBugs into build (ignoreFailures=true), fix most found issues (#216)
* Integrate SpotBugs (FindBugs) into build.  Set ignoreFailures so spotted bugs do not break the build.

* Fix many SpotBugs-found items, mostly making things final, but also a redundant null check and a reliance on platform character encoding.  2 items remain which will need further work/review, but as ignoreFailures is set, they will not fail the check stage.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-03-09 10:47:49 -07:00
Trask Stalnaker ea74337c10
Redo log capture instrumentation (#212)
Make it clear that this is experimental option, as the specifics of log
capture will definitely change sometime in the future once there is an
agreed on OpenTelemetry spec for this.

Capture logs as spans, to avoid the limitations of current
implementation that captures them as events (no log capture when no
current span, and limited number of events per span).

Change the log instrumentation module names to just reflect the
underlying logger, e.g. "log4j-1.1" instead of "log4j-spans-1.1". This
way we don't end up with an entirely deprecated artifact once the
logging spec is worked out. The spans instrumentation now shares modules
with the MDC instrumentation, which I think is reasonable, as you pick
which one you want via configuration.
2020-03-06 13:05:44 -08:00
Trask Stalnaker b2db595430 Merge tag 'v0.45.0' into dd-merge 2020-03-05 21:49:39 -08:00
Trask Stalnaker 9ff1fca3fd
Rename a few modules (#207)
* Rename classloading module to class-loader

* Rename datastax-cassandra module to cassandra

* Rename reactor-core module to reactor

* Rename cdi module to cdi-testing

* Rename aws-java-sdk module to aws-sdk

* Rename class-loader module to java-class-loader
2020-03-05 20:21:50 -08:00
Trask Stalnaker 2f1b802aad
Rename mongo modules (#206)
* Rename mongo modules

* Update tracer name
2020-03-05 14:18:45 -08:00
Trask Stalnaker 5ecdeba977
Rename jax-rs-* modules (#208) 2020-03-05 13:42:17 -08:00
Trask Stalnaker f91549e799
Simplify some tests by using runUnderTrace (#204) 2020-03-05 09:50:41 -08:00
Pontus Rydin d3246121cc
Made gRPC instrumenter compliant with semantic conventions (#202)
* Added service name and corrected span name

* Support peer address for clients

* Added server peer address resolution

* Added constants for new tag names

* Cosmetic change

* Fixed muzzle issue

* Better handling of addresses

* Addressed PR comments
2020-03-03 10:01:26 -08:00
Trask Stalnaker fa72243966
Change link behavior for consumers (#198) 2020-03-02 16:29:25 -08:00
Trask Stalnaker 9b73e85bef
Fix class loading instrumentation (#197) 2020-03-02 16:08:46 -08:00
Trask Stalnaker 701b282b17 Merge tag 'v0.44.0' into dd-merge 2020-02-29 14:30:12 -08:00
Trask Stalnaker 40e3932358
Add license headers (#188)
* Add spotless gradle plugin

* Add license headers
2020-02-27 13:24:42 -08:00
Pontus Rydin 147b536891
Made couchbase agent compliant to semantic conventions (#189)
* Made couchbase agent compliant to semantic conventions

* Made tests resilient to variations in internally generated queries

* Fixed test function signatures
2020-02-27 12:28:18 -08:00
Trask Stalnaker 3cb25f0b52
Remove conversion from URI to String back to URI (#191) 2020-02-27 12:11:06 -08:00
Trask Stalnaker d60f18f8a1
Add Apache HTTP Client 3 instrumentation (#190) 2020-02-27 11:29:33 -08:00
Trask Stalnaker f4011b63e3
Capture gRPC messages as events instead of child spans (#185)
* Capture gRPC messages as events

* Rename verification method to avoid conflicts

It's common to have a 'name' test parameter/field which then causes
conflicts with verification method of the same name 'name'.
2020-02-27 11:18:30 -08:00
Trask Stalnaker 083988dbe8
Fix comment (#186) 2020-02-27 10:38:29 -08:00
Trask Stalnaker b724151334
Capture Logback events (#183) 2020-02-24 12:19:30 -08:00
Trask Stalnaker da7dc5412e
Capture Log4j 2.x events (#182) 2020-02-24 12:03:34 -08:00