Commit Graph

261 Commits

Author SHA1 Message Date
Mateusz Rzeszutek c7fc26188d
Remove instrumentation (and tooling) specific properties from Config (#1286) 2020-09-30 11:27:06 -07:00
Anuraag Agrawal 210c669643
Remove AgentSpecification (#1291) 2020-09-30 17:34:29 +09:00
Mateusz Rzeszutek 9e591bb01a
Refactoring Config into @AutoValue POJO (#1254) 2020-09-28 22:08:45 -07:00
Nikita Salnikov-Tarnovski 2b83c310da
More decorators translated to tracers (#1148) 2020-09-03 07:53:14 +03:00
dengliming 7dd4a6082d
Fix hsqldb jdbc urls parsing (#1087)
* Fix hsqldb jdbc urls parsing

* Fix VertxReactive testcase

* Fix review and remove the useless param declaration.
2020-08-23 18:36:54 +03: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 7159d04b8d
Change groovy import order (#1013)
* Update docs

* Format all groovy code

* Organize imports
2020-08-15 23:19:27 -07: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 f940b2d2de
Use OpenTelemetry.getTracer() shortcut (#965) 2020-08-14 07:11:06 +03:00
Trask Stalnaker 7818e33178
Package renaming (#970) 2020-08-13 20:14:46 -07:00
Trask Stalnaker b5fbf90977
Extract instrumentation api module (#884) 2020-08-09 22:52:33 -07:00
Trask Stalnaker dce9d6db47
Remove ExceptionLogger refs from instrumentation (#883) 2020-08-03 19:04:27 -07:00
Trask Stalnaker 5dc2ca350a
Update config property prefix from ota to otel (#841)
* Update config property prefix from ota to otel

* more

* format

* more
2020-07-31 08:29:29 +03:00
Helen Y b659ee8223
Apply new database semantic attributes (#823) 2020-07-28 17:31:33 -07:00
Helen Y 44fcf8115b
Update database semantic conventions (#785) 2020-07-28 11:55:55 -07:00
Nikita Salnikov-Tarnovski fcf4319aac
Faster tests (#725)
🎉
2020-07-22 10:10:34 -07:00
Helen Y 86c438b154
Remove final from local variables (#732)
* Remove final from local variables
2020-07-20 13:53:34 +09:00
Nikita Salnikov-Tarnovski 9f1ffbe38c
Remove attribute `span.origin.type` (#712) 2020-07-16 10:00:45 -07:00
Nikita Salnikov-Tarnovski 23ae6980d5
Lettuce and Cassandra migrated from deprecated Decarator to new Tracer (#681)
* Lettuce and Cassandra migrated from deprecated Decarator to new Tracer

* Polish

* Polish

* Split a connection specific handling out of Lettuce database client tracers.

This eliminates the need of awkward method override in the common DatabaseClientTracer.

* Muzzle fix

* Format
2020-07-15 13:37:22 +03:00
Sergei Malafeev b78abac82c
#598 Rename "tags" to "attributes" (#645) 2020-07-07 21:03:41 -07: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
Tyler Benson 4a943c8411 Use Spotless for formatting (DataDog/dd-trace-java#1619) 2020-06-30 11:15:48 -07:00
Richard Startin b558c50229 Add missing classloader matchers for expensive matchers (DataDog/dd-trace-java#1617) 2020-06-30 11:13:22 -07:00
Anuraag Agrawal 874b157fe5
Newline between license and package. (#581) 2020-06-25 13:31:16 -07:00
Nikita Salnikov-Tarnovski c1c02ac949
Next attempt to extract common logic from instrumentations. (#523)
* Next attempt to extract common logic from instrumentations.

I tried to reduce code repetition in DB client instrumentations, jdbc and mongo ones. This time I experimented with another approach, different from HttpServerTracer. Namely, I have extracted that common `startSpan` method into `DatabaseClientDecorator` itself. The idea is still the same as before, but I wanted to see if we can migrate by smaller steps, reusing much of the existing code and just incrementally reducing public API.

* Extracted separate Tracer after all

* More explicit call depth handling

* Fix format

* More reusable method overloads
2020-06-17 12:08:52 -07:00
Tyler Benson 1b29184e7c Make rootDir usage consistent (DataDog/dd-trace-java#1518) 2020-06-11 10:14:02 -07:00
Simon Leigh 3a4483a0f5
Add support for jTDS driver connection urls for SQL Server (#396)
The jTDS driver is an open source JDBC driver for connecting to SQL Server databases.
Added support for parsing the url connection string so that spans can be generated for the sql statements using this driver.

Fixes #395
2020-05-09 19:07:31 -07:00
Trask Stalnaker 6d1a58d151 Merge tag 'v0.50.0' into correct-history 2020-05-05 12:41:08 -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
Pontus Rydin 9568ba079b
Use Builder::setAttribute whenever possible (#348) 2020-04-27 13:51:34 -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 a333cfe536
Remove unused getComponentName (#314) 2020-04-14 13:29:33 -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 c82baecb9d
Populate db.url for jdbc spans (#277) 2020-03-23 10:34:50 -07:00
Trask Stalnaker da05fc7e4c
Change jdbc db.type to sql (#274) 2020-03-23 09:50:55 -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 007029b122
Better span names for jdbc (#238) 2020-03-19 19:50:51 -07:00
Trask Stalnaker 2298885678 Merge tag 'v0.46.0' into dd-merge 2020-03-16 11:25:27 -07:00
John Bley f30f5f0779
Fix 3 minor javadoc issues. (#225) 2020-03-11 13:25:39 -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 b2db595430 Merge tag 'v0.45.0' into dd-merge 2020-03-05 21:49:39 -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
Trask Stalnaker 8ee04d54e9 Merge remote-tracking branch 'datadog/master' into dd-merge 2020-02-22 14:35:03 -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 215f611673
Update tracer names (#151) 2020-02-11 12:25:09 -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 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 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
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
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