Commit Graph

47 Commits

Author SHA1 Message Date
Nikita Salnikov-Tarnovski 67766fd13b
Add documentation about java agent structure and related classloaders (#380) 2020-05-06 10:28:35 -07:00
Trask Stalnaker 4f94303e5f
Redirect internal j.u.l.Logger to slf4j (#371) 2020-05-05 15:27:21 -07:00
Trask Stalnaker 6d1a58d151 Merge tag 'v0.50.0' into correct-history 2020-05-05 12:41:08 -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
Nikita Salnikov-Tarnovski 62426c8158
Allows `./gradlew clean build` to run successfully. (#355)
* CI job `check` will run `build` gradle task
2020-04-29 08:08:14 -07:00
Trask Stalnaker 3561ccdfa2
Accept lowercase logging threshold config values (#332) 2020-04-20 17:52:06 -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 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 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 b127673610
Reduce unnecessarily verbose debug logging (#318) 2020-04-14 10:30:21 -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 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 9566ee9951
Better span names for hibernate (#267) 2020-03-23 09:46:48 -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 bdf2b8eafd
Fix file formatting (#256) 2020-03-19 18:57:05 -07:00
Trask Stalnaker 2298885678 Merge tag 'v0.46.0' into dd-merge 2020-03-16 11:25:27 -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 7370202340
Properly close() the FileReader for Config (#210)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-03-05 16:03:43 -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 40e3932358
Add license headers (#188)
* Add spotless gradle plugin

* Add license headers
2020-02-27 13:24:42 -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 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 e039998192
Remove a couple remaining dd prefixes (#170) 2020-02-18 11:55:56 -08:00
Pontus Rydin 8235f7bd04
Third-party exporter loading framework (#159) 2020-02-13 14:22:22 -08:00
Trask Stalnaker c43f3229c6 Merge commit '25534b2641ff57e0de36fb359a412612ef349ee9' into dd-merge-part-2 2020-02-12 17:59:03 -08:00
Trask Stalnaker 852c00193c Merge commit 'f2d8c8e6b9967b204803a3744942582191266625' into dd-merge 2020-02-12 15:35:23 -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 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 ae15d717ad
Change prefix in couple of other places (#127) 2020-02-05 13:45:26 -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 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 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
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 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 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 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