Commit Graph

83 Commits

Author SHA1 Message Date
Laplie Anderson de1aa4bf9b Remove noisy logging in InternalJarURLHandler (DataDog/dd-trace-java#1609) 2020-06-30 11:13:21 -07:00
Richard Startin dfa000d92c Do not eagerly load classfiles at startup (DataDog/dd-trace-java#1606) 2020-06-30 11:13:20 -07:00
Richard Startin abd9744acc Route classloads to classloader by package (DataDog/dd-trace-java#1598) 2020-06-30 11:13:20 -07:00
Richard Startin 6d04a48ca1 Shorten jar names (prefixes of runtime classnames) (DataDog/dd-trace-java#1592) 2020-06-30 11:13:20 -07:00
Anuraag Agrawal 77654a44bc
Always translate HTTP status code to Status (#606)
* Translate HTTP status code to Status
2020-06-30 08:27:52 +09:00
Anuraag Agrawal ca0d6767ae
Add endpoint.peer.service.mapping property to allow a user to specify… (#562)
* Add endpoint.peer.service.mapping property to allow a user to specify mappings from an endpoint to a service name.

* Map endpoints to peer.service based on user mapping.

* Move to decorator

* Remove unnused

* WIP

* Groovy...

* Unused import

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-06-29 10:34:54 +09:00
Anuraag Agrawal b0237a8981
Don't set IP address for net.peer.name and set name for failed DNS lo… (#584)
* Don't set IP address for net.peer.name and set name for failed DNS lookup

* Private

* Don't require IPv6 to run unit test

* PR suggestion (#1)

* PR suggestion

* Make test pass on Windows

* final

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-06-28 12:32:40 +09:00
Nikita Salnikov-Tarnovski bfd7f4428d
Propagate full Context while processing http server requests (#573)
* Propagate full Context while processing http server requests
2020-06-26 20:13:12 +03:00
Nikita Salnikov-Tarnovski fc2d679259
Propagate context (#572)
* First cut on propagating full Context instead of just Span

* First cut on propagating full Context instead of just Span

* Polish

* Polish

* Format
2020-06-26 08:18:14 +03:00
Anuraag Agrawal 874b157fe5
Newline between license and package. (#581) 2020-06-25 13:31:16 -07:00
Nikita Salnikov-Tarnovski 9a52f6708e
Gradle dependencies cleanup (#556)
* Bootstrap fixed

* Tooling fixed

* Testing fixed

* All instrumentation tests pass

* All tests pass

* Fix test

* Muzzle workaround

* Muzzle fix

* Update instrumentation/trace-annotation/trace-annotation.gradle

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-06-24 12:01:14 +03:00
Anuraag Agrawal 6f5f67327f
Provide an SPI that an agent distribution or intiializer can use to c… (#561) 2020-06-23 20:21:00 -07:00
Richard Startin 2af04f792f BaseDecorator shouldn't rely on $ in class names (DataDog/dd-trace-java#1585) 2020-06-23 14:08:45 -07:00
Richard Startin c072bcd1fa Avoid creating new strings prior to jar lookup (DataDog/dd-trace-java#1580) 2020-06-23 14:08:45 -07:00
Richard Startin a252985562 Cache span names derived from class and method names (DataDog/dd-trace-java#1562) 2020-06-23 14:08:44 -07:00
Anuraag Agrawal 918d3913e3
Populate user-agent in HTTP clients. (#540) 2020-06-22 21:13:12 -07:00
Trask Stalnaker 9cf0cb6b1e
Fix duplicate log capture (#544) 2020-06-19 08:45:34 +03: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
Trask Stalnaker 4b665dcbe2
Changed instrumentation tracer" TRACER.startSpan() to never return `null` (#499) 2020-06-12 16:15:38 -07:00
Richard Startin 57c0aed1fa Use ClassValue to store ThreadLocal call depth (DataDog/dd-trace-java#1528) 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
Anuraag Agrawal f13a9c4932
Move client span creation to decorator and automatically suppress creation of neste… (#460)
* Move client span creation to decorator and suppress creation of nested client spans.

* Store subtree client span in context.

* Apply new pattern to AWS V1 SDK instrumentation too, cleanup, and javadoc
2020-06-08 12:01:43 -07:00
Anuraag Agrawal 5792ec3ada
Allow specifying a JAR to control OTel SDK SPI. (#449)
* Allow specifying a JAR to control OTel SDK SPI.

* Update README.md

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-06-08 19:33:27 +03:00
Nikita Salnikov-Tarnovski 357fb6e989
Deduplicate servlets (#469)
* Servlet instrumentations unified

* Grizzly migrated

* Fix tests after merge

* Polish and fix tests

* Polish and fix tests

* Muzzle fixes

* Muzzle fixes

* Muzzle fixes

* Test fixes

* One more check fixed

* Stop using SpanWithScope

* Test fix

* Compilation fix

* Apply suggestions from code review

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* Update agent-bootstrap/src/main/java/io/opentelemetry/auto/bootstrap/instrumentation/decorator/HttpServerTracer.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* Polish

* Tracer does not manage scope anymore

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-06-08 10:49:58 +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
Richard Startin d8c9639fbb Grizzly-http and grizzly-client instrumentation (DataDog/dd-trace-java#1365) 2020-05-26 11:54:59 -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
Tyler Benson dbe1c00ac1 Adding an option to manually disable Kafka headers (DataDog/dd-trace-java#1448) 2020-05-26 11:54:56 -07:00
Trask Stalnaker 49a077065b
Remove unused config (#424) 2020-05-24 18:16:21 +03:00
Trask Stalnaker 2d60dc2c45
Fix sqlNormalizerEnabled initialization (#432) 2020-05-24 18:15:31 +03: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
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
Nikita Salnikov-Tarnovski e54f316b27
Add support for new @WithSpan annotation (#379) 2020-05-06 13:05:11 -07:00
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