Commit Graph

63 Commits

Author SHA1 Message Date
Richard Startin badfbb8b18 Change error bound so test should almost never fail (DataDog/dd-trace-java#1525) 2020-06-11 10:14:07 -07:00
Brian Devins-Suresh f200b4cbed Ignore proxool proxy classes (DataDog/dd-trace-java#1524) 2020-06-11 10:14:07 -07:00
Tyler Benson 1b29184e7c Make rootDir usage consistent (DataDog/dd-trace-java#1518) 2020-06-11 10:14:02 -07:00
Nikita Salnikov-Tarnovski 9f44348217
Embed exporters into agent jar (#491)
* Embed all exporters into agent jar

* Publish agent with exporters and without

* Polish
2020-06-11 09:41:11 +03:00
Trask Stalnaker f0c7deb1a9
Use published MetricExporterFactory (#493) 2020-06-11 08:31:58 +03:00
Rashmi 109d684152
Configured trace config to read from env vars/sys props (#479)
* Configured trace config to read from env vars/sys props

* Fixed the codenarc violation

* Addressing review comments

1. Updated span count target to num_tries in the test since SpanCounter stops counting spans as soon as it hits the targets

* Extracted the configure method outside of installExportersFromJar

* Addressing comments
2020-06-08 09:54:18 +03:00
Nikita Salnikov-Tarnovski 1c59062aae
0.5.0 (#476)
* Update to otel-java 0.5.0-SNAPSHOT (#462)

* Update to otel-java 0.5.0-SNAPSHOT

* Tests pass

* Check fix

* Switch to otel-java 0.5.0

* Add TODOs
2020-06-05 20:11:49 +03:00
Trask Stalnaker 96fa7b8c31
Merge changes from dd-trace-java 0.53.0 (#456)
* Add time in queue (DataDog/dd-trace-java#1481)

* Minor upgrades (DataDog/dd-trace-java#1495)

* Allow user to disable kafka time in queue tag (DataDog/dd-trace-java#1487)

* Replace Set<Integer> with BitSet for HTTP statuses (DataDog/dd-trace-java#1496)

* Register WeakMapProvider earlier in AgentInstaller (DataDog/dd-trace-java#1480)

* Update codenarc (DataDog/dd-trace-java#1500)

Co-authored-by: Tyler Benson <tyler.benson@datadoghq.com>
Co-authored-by: Nikolay Martynov <mar.kolya@gmail.com>
Co-authored-by: Richard Startin <richard.startin@datadoghq.com>
2020-06-02 18:20:54 +03:00
Sergei Malafeev c86a2af78c
#425 allow only one propagator per concern (#451) 2020-05-28 15:08:31 -07:00
Tyler Benson ebebbc7dae Wrap log statements using varargs to avoid object allocation (DataDog/dd-trace-java#1466) 2020-05-26 11:54:57 -07:00
Trask Stalnaker f50a410fb4
Define packages in exporter class loader (#409) 2020-05-18 13:42:41 -07:00
Rashmi 29a18bdf20
Used BatchSpansProcessor instead of SimpleSpansProcessor (#393)
BatchSpansProcessor won't get blocked by the exporter.

Fixes #368
2020-05-16 13:18:43 -07:00
Carlos Alberto Cortez 009cc6ad1e
Initial Propagators support. (#389) 2020-05-14 16:57:52 -07:00
Nikita Salnikov-Tarnovski 6cfe2256ef
Use java 11 for compilation (#390)
* Allow compiling of everything with java 11

* Instruct CircleCI to use java 11 be default

* Forbid running some tests on java11

* Muzzle uses ClassLoader.platformClassLoader as parent for user-space classloader
2020-05-14 15:13:30 -07:00
Richard Startin 95cac497d2 Replace collection.size() > 0 with not collection.isEmpty() (DataDog/dd-trace-java#1420) 2020-05-14 11:50:30 -07:00
Tyler Benson ca27485a5c Upgrade Byte Buddy to 1.10.10 (DataDog/dd-trace-java#1409) 2020-05-14 11:50:30 -07:00
Trask Stalnaker 86748e3f8d
Shade j.u.l.Logger and slf4j in exporters (#381) 2020-05-06 11:48:41 -07:00
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
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 79865a8472
Update code coverage config to be more clear (#365) 2020-04-29 16:53:21 -07:00
Trask Stalnaker 62e43d3e54
Bring back code coverage verification (#357) 2020-04-28 15:27:44 -07:00
Trask Stalnaker ecc26226dc Merge tag 'v0.49.0' into dd-merge 2020-04-18 16:00:00 -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 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 aa5bc22bcd
Remove no longer needed exclusion (#315) 2020-04-14 09:32:03 -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 e0589e18fe
Do not instrument exporter class loader (#306) 2020-04-04 09:29:36 -07:00
Trask Stalnaker f0354033b2
Add OTLP exporter (#289) 2020-03-29 20:33:07 -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
Pontus Rydin ff47bf04cd
Use sdk_contrib exporter glue (#285) 2020-03-27 11:23:14 -07:00
John Bley 5c5a114349
Fix confusing log message about exporters. (#275) 2020-03-22 14:00:22 -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
John Bley d759f846bb
Rename a temp directory from datadog- to opentelemetry-. (#236) 2020-03-18 09:17:52 -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
Tyler Benson f5c5e57020
Proof of Concept of "Typed Spans" (#195)
Primary goal is to maintain a simple and semantic interface for the code using it. See `HttpClientTracerDemonstration` for example usage.

* Add additional startSpan methods and restructure to allow tracer.extract at build time.

* Move classes into a different package structure to enable less visibility.

And move setter method to tracer.

* Add deprecation warnings to unused end methods
2020-03-12 18:33:49 -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 9715ed5d90
Fix the build (#219) 2020-03-09 14:45:57 -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 725cebcd6b
Remove non-delegating class loader check (#203)
This is not needed anymore now that loadClass() is being instrumented to
deal with non-delegating class loaders.
2020-03-04 10:42:05 -08:00
Trask Stalnaker 81cd6dbb23
Remove unneeded dependencies (#199) 2020-03-02 17:08:38 -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 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
Pontus Rydin 8235f7bd04
Third-party exporter loading framework (#159) 2020-02-13 14:22:22 -08:00
Trask Stalnaker 75d807add9
Fix race condition on loading SDK (#165)
This broke during last merge from DataDog repo because context class
loader is no longer set to the agent's class loader.
2020-02-13 12:46:49 -08:00