Commit Graph

544 Commits

Author SHA1 Message Date
jason plumb 413b2aee5d
precompile pattern and use char replacement. (#2374)
* precompile pattern and use char replacement.

* expand description for the narc.

* use endsWith and substring vs. regex.

* make .class a string constant
2021-02-24 10:08:55 +09:00
Lauri Tulmin 4c49932d8b
Add instrumentation for jax-ws frameworks (#2314)
* Add instrumentation for jax-ws frameworks

* remvoe commneted out code

* Update instrumentation/jaxws/jaxws-2.0-axis2-1.6/library/src/main/java/io/opentelemetry/instrumentation/axis2/Axis2JaxWsTracer.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* review fixes

* review fix

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-02-22 16:46:33 +02:00
Anuraag Agrawal 2244377dd4
Remove trivial uses of Guava from agent. (#2360)
* Remove trivial uses of Guava from agent.

* Extract

* Clean
2021-02-22 12:31:02 +09:00
Trask Stalnaker 79fa9e0816
Fix debug logging (#2351)
* Fix debug logging

* Fix test

* Fix another test
2021-02-20 10:06:50 +02:00
Anuraag Agrawal 000df967ce
Update to SDK 0.17.0 (#2338)
* Update to SDK 0.17.0

* Finish

* ottrace
2021-02-19 15:51:55 +09:00
Trask Stalnaker 427bd5fbb0
Move slf4j-simple initialization from bootstrap into tooling (#2305)
* Move more init out of bootstrap

* spotLESS
2021-02-17 14:51:45 +02:00
John Watson a0b208fd52
Turn on the logging span exporter if agent debug is enabled. (#2270) 2021-02-16 15:38:37 -08:00
Trask Stalnaker 9d58ac864c
Reduce debug logging (#2296) 2021-02-16 16:08:59 +09:00
Trask Stalnaker 59c9b544d1
Bring back debug logging under class file transform (#2236)
* Bring back debug logging under class file transform

* spotless

* Feedback

* Rename to TransformSafeLogger
2021-02-16 12:37:17 +09:00
Trask Stalnaker adc24352cb
Updates to dependencies included in license report (#2278) 2021-02-15 15:16:01 +02:00
Trask Stalnaker f5b2a9a085
Remove unnecessary shutdown hook (#2283) 2021-02-15 15:11:38 +02:00
Lauri Tulmin eaa973c208
Test jax-rs on wildfly (#2242) 2021-02-12 16:19:10 -08:00
Anuraag Agrawal 5e2d1933b5
Add prometheus http lib to agent. (#2259) 2021-02-12 21:18:50 +09:00
Mateusz Rzeszutek a74f60b3f8
Add JUnit 5 extensions for instrumentation testing (#2241)
* Add JUnit 5 extensions for instrumentation testing

* Fix kafka tests

* RepeatedTest
2021-02-12 12:57:08 +01:00
Anuraag Agrawal 1d4c150111
Add task to generate license report into licenses folder. (#2239) 2021-02-12 17:20:08 +09:00
Trask Stalnaker 3f8cacfcb4
Fix build deadlock (#2234)
* Fix build deadlock

* spotless
2021-02-10 13:09:14 +09:00
Anuraag Agrawal fc410706d0
Update to Sdk 0.16.0 (#2221)
* Update to 0.16.0-SNAPSHOT

* Finish

* Finish

* Update to 0.16.0

* Finish
2021-02-09 18:00:54 +09:00
YuDong Tang a6527c2fa0
add support 4 Apache Dubbo (#2108) 2021-02-06 21:56:24 -08:00
Trask Stalnaker 79dfe10ab3
Remove kotlin core libs from javaagent distro (#2206) 2021-02-06 16:44:18 +09:00
Vladimir Šor a0d66784d1
Auto-instrumentation for JaxWS (#2176)
* Initial JaxWS support with only manual tests and no async support.

* Add support for soap provider and tests.

* Initial JaxWS support with only manual tests and no async support.

* Add support for soap provider and tests.

* Rename jws 1.0 to 1.1 everywhere.

* Rename jws 1.0 to 1.1 everywhere.
2021-02-04 14:49:58 +09:00
Anuraag Agrawal 1ebb58a596
Update to SDK 0.15.0 (#2137)
* Update to SDK 0.15.0

* Fix lightstep test
2021-01-29 21:30:22 +09:00
Mateusz Rzeszutek 328c6832a2
Publish agent-for-testing and testing-common (#2133) 2021-01-29 08:39:30 +01:00
jason plumb 782a646d89
Cache sql sanitized extraction (#2094) 2021-01-27 10:04:58 -08:00
Nikita Salnikov-Tarnovski 2d683d4289
No more gradle warnings (#2103) 2021-01-26 08:24:18 +02:00
Anuraag Agrawal 8b470bf378
Add Netty instrumentation handlers after matched handler rather than at end of pipeline. (#2100)
* Support latest webflux version.

* Add Netty instrumentation handlers after matched handler rather than at end of pipeline.

* Drift

* Fix

* Raise smoke tests timeout
2021-01-25 16:06:57 +09:00
Vladimir Šor a2cde4132d
Smoke tests declare shadowJar as an input to be rebuilt (#2085)
* Smoke tests declare shadowJar as an input to be rebuilt. Fix some gradle deprecation warnings.

* Try files as inputs.
2021-01-20 16:30:45 +02:00
Lauri Tulmin 9825ab0afa
Instrument jsf action calls (#2018) 2021-01-19 21:34:41 -08:00
Anuraag Agrawal c6cc263c6e
Use SDK Autoconfigure module (#2077)
* Use sdk autoconfigure

* Finish

* Finish

* Group exporters

* Update smoke-tests/src/test/groovy/io/opentelemetry/smoketest/SpringBootWithSamplingSmokeTest.groovy

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-01-20 14:31:49 +09:00
Anuraag Agrawal afdde0355b
Update to OTel 0.14.1 (#2059)
* Update SDK dependency to 0.14.1

* WIP

* Finish

* Cleanup
2021-01-18 13:02:04 +09:00
Pavol Loffay 8addc67eba
Make global ignore matchers configurable (#2035) 2021-01-14 09:33:21 -08:00
Mateusz Rzeszutek 822e18675d
Make the agent log its version anymore when starting (#2026)
* Make the agent not log its version anymore when starting

* Version logger smoke test

* Version logger smoke test
2021-01-14 14:06:36 +09:00
jason plumb 0bf6904a07
Don't override preconfigured propagators. (#2004)
* don't override preconfigured propagators.

* add tests around duplicates, and deduplicate

* spotless life for clean living.

* move a few reused vars to fields.

* simplify list creation.
2021-01-14 10:08:56 +09:00
Lauri Tulmin 640a7d624b
Correct some spelling mistakes (#2025) 2021-01-12 11:10:45 -08:00
Pavol Loffay 077d8b64f6
Move common matchers to tooling/bytebuddy/matcher and ignore matchers to tooling/matcher (#1965) 2021-01-10 12:35:53 -08:00
Lauri Tulmin cc9c0f90ce
Close JarFile (#1970) 2021-01-04 18:26:34 -08:00
Anuraag Agrawal 8d74baa2e4
Run tests with javaagent. (#1643)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-01-04 13:13:24 -08:00
Lauri Tulmin ad82c30ec2
Skip attempting to retransform our agent classes (#1919) 2020-12-18 12:29:53 -08:00
Pavol Loffay f69217e2a4
Add ComponentInstaller SPI and use it for OpenTelemetry SDK (#1848)
* Add component installer SPI

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Move more code to agent installer

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-12-18 08:55:24 +02:00
Anuraag Agrawal f0a6c6d772
Update SDK dependency to 0.13.0-SNAPSHOT. (#1924)
* Update SDK dependency to 0.13.0-SNAPSHOT.

* Update smoke tests

* Fix formatting

* Spot
2020-12-17 18:20:59 +09:00
Mateusz Rzeszutek cd58ac816e
Muzzle should add SPI classes defined in helperResourceNames as references (#1918) 2020-12-16 21:54:04 -08:00
Trask Stalnaker 0200081007
Use new SemanticAttribute constants (#1896)
* Use new SemanticAttribute constants

* Spotless
2020-12-14 18:16:33 +09:00
Anuraag Agrawal c741eaa501
Shade trace propagators so they can be injected in instrumentation th… (#1892)
* Shade trace propagators so they can be injected in instrumentation that benefits from a hard-coded propagation format

* Runtime shade too
2020-12-14 07:52:21 +02:00
Pavol Loffay d197748bd9
Add package prefix to classloader ignore matcher (#1813)
* Add package prefix to classloader ignore matcher

OTEL agent already ignores other agent's classes by package prefix.
However agets also use non-shaded classes (usually present in agent classloader),
these classes are not excluded by package prefix and have to be excluded
by classloader. One example is Okhttp client used by DataDog agent.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* fix review comments

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix checkstyle

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-12-09 23:12:20 +02:00
Pavol Loffay 4e52b3e741
Add newrelic and datadog package prefixes to global ignore matcher (#1812)
* Add nerelic and datadog package prefixes to global ignore matcher

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* add dot

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Scope down newrelic agent

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-12-09 21:07:38 +02:00
Anuraag Agrawal 3b8827b8ab
Update to SDK 0.12.0 (#1830)
* Update to SDK 0.12.0

* Update error message to the current world.

* Bump referenced smoke test versions

* fixes

* dependency hell

* Suppress unused call

* Bump missed smoke tests

* Bump image, bump smoke tests gRPC version
2020-12-07 17:16:47 +09:00
Nikita Salnikov-Tarnovski ef02da9090
Bootstrap prefix fix (#1833)
* Proper classloading test for WildFly and GlassFish

* Fix using BootstrapPackagePrefixesHolder

* Polish

* Format
2020-12-05 10:41:00 +02:00
Trask Stalnaker a2770c311e
Don't use ConfigUtils outside of AgentTestRunner tests (#1796)
* NetPeerUtilsTest

* RedisCommandNormalizerTest

* InstrumentationModuleTest

* HttpClientTracerTest

* Normalize test config properties

* Create ConfigBuilder in instrumentation-api

* Keep config properties compatible with SDK
2020-12-01 16:52:08 -08:00
Mateusz Rzeszutek 3c1a09109f
Use sdk-extensions/resources in the agent (#1809)
* Use sdk-extensions/resources in the agent

* Add smoke test, fix dropwizard test
2020-12-01 16:03:51 -08:00
Trask Stalnaker 0c8d7fe73f
Miscellaneous cleanup (#1805)
* Remove outdated doc

* Remove unnecessary dependencies

* Formatting

* Rename TRACER to tracer

* Move WrappedFuture to top-level class

* Add missing shadow config

* Use simpler type

* Use simpler base class
2020-11-29 21:05:53 -08:00
Trask Stalnaker 2b2ffa87ed
Rename defaultEnabled property to default-enabled (#1788) 2020-11-28 10:50:59 -08:00
Trask Stalnaker 083651acef
Update more config property names (#1786) 2020-11-28 10:50:51 -08:00
Mateusz Rzeszutek 9a64a628ea
Make instrumentations non final (#1752)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-26 11:22:25 -08:00
Mateusz Rzeszutek 90ecff512a
Muzzle mismatch logs should be warnings in tests (#1754) 2020-11-26 11:21:17 -08:00
Ago Allikmaa d42dccb9bd
Make ByteBuddy task deterministic by using linked sets/maps. (#1770)
* Make ByteBuddy task deterministic by using linked sets/maps.

* Add class-level comments explaining the use of Linked maps/sets.
2020-11-26 11:07:07 +02:00
Trask Stalnaker 325238f128
Rename otel.trace.classes.excludes to otel.javaagent.exclude-classes (#1747)
* Rename otel.trace.classes.excludes

* Spotless
2020-11-25 16:53:49 +02:00
Ago Allikmaa d03c3d0d7e
Fix ByteBuddy tasks failing on daemon reuse. (#1762) 2020-11-25 15:01:32 +02:00
Mateusz Rzeszutek 50c8ab499d
Remove no longer needed helperClassNames() methods (#1755) 2020-11-24 20:50:32 -08:00
Mateusz Rzeszutek 13c405c174
Make muzzle generate helperClassNames() method (#1714) 2020-11-24 10:07:22 -08:00
Mateusz Rzeszutek 45646ff367
Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization() (#1741)
* Rename TypeInstrumentation#classLoaderMatcher() to classLoaderOptimization()

* Removed no longer needed comments & improved JavaDoc

* Improve TypeInstrumentation Javadoc
2020-11-24 14:27:58 +02:00
Trask Stalnaker 0c5c4caaa4
Rename java-concurrent and java-classloader instrumentation modules (#1733)
* Rename java-concurrent instrumentation to executors

* Rename java-classloader to classloaders
2020-11-23 17:49:10 -08:00
Trask Stalnaker 3b480f5e50
Rename otel trace properties (#1740)
* Rename otel.trace.enabled

* Rename otel.trace.debug

* Rename otel.trace.config

* Rename otel.trace.runtime.context.field.injection

* Rename otel.instrumentations.enabled

* Document otel.javaagent.enabled
2020-11-23 14:53:18 -08:00
Trask Stalnaker d2f064dcd4
Add static keyword to make groovy inner classes nested (#1734)
* Add static keyword to make groovy inner classes nested

* Too much

* A bit less

* Spotless
2020-11-23 15:43:42 +02:00
Trask Stalnaker 79f76c78ad
Move java files to java source folder and groovy files to groovy source folder (#1735)
* Move java files to java source folder

* Move groovy files to groovy source folder

* Too much

* Move another one back

* Codenarc

* Move test resource to where test is

* Spotless
2020-11-23 15:42:04 +02:00
Trask Stalnaker 308a8f9b0f
Consistent equals implementations (#1736)
* Consistent equals implementations

* Use direct equals where previous behavior
2020-11-23 15:41:31 +02:00
Trask Stalnaker 19e85bbca7
Fix for no propagators being installed (#1730) 2020-11-22 09:56:18 -08:00
Trask Stalnaker e18a4d1038
Fix spring-webmvc testLatestDeps (#1723) 2020-11-21 09:21:14 +02:00
Sergei Malafeev 4b3bbf6612
add baggage propagator to default propagators (#1545) 2020-11-20 09:56:01 -08:00
Trask Stalnaker 80b068b459
Instrument java.servlet.Filter directly (#1606)
* Instrument filter directly

* Remove some additional ignores

* Fix OncePerRequestFilter not being instrumented itself
2020-11-18 19:59:28 -08:00
Sergei Malafeev da9502ce84
add b3multi propagator (#1647)
* revert support for b3_single and b3 (multi) propagator

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* add b3multi, default for b3 is single

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-11-18 09:47:43 +02:00
Trask Stalnaker 2e51003900
Enable checkstyle overload method ordering rule for Google Java Style (#1656) 2020-11-17 14:41:14 -08:00
Mateusz Rzeszutek 1a23ac3027
Standardize instrumentation names in InstrumentationModules (#1648)
* Standardize instrumentation names in InstrumentationModules

* rename gradle modules:
  * vertx-3.0 to vertx-web-3.0
  * spark-web-framework-2.3 to spark-2.3
* add JavaDoc describing the naming rules to InstrumentationModule
2020-11-17 13:30:28 -08:00
Trask Stalnaker 6d5ec329d6
Enable checkstyle for google style guide (#1641) 2020-11-16 18:46:59 -08:00
Pavol Loffay b4326d91ac
Add Bytebuddy agent builder customizer SPI (#1613) 2020-11-13 11:21:40 -08:00
Ago Allikmaa 995e2caee0
Update ByteBuddy to 1.10.18, adjust to new ByteBuddy gradle plugin (#1596)
* Adjust for use with ByteBuddy 1.10.18

* Fix language choices for ByteBuddy transformation.

* Remove no longer used MuzzleCodeGenerationPlugin$NoOp
2020-11-12 12:34:06 +02:00
Mateusz Rzeszutek 402a0a1639
Remove Instrumenter.Default (#1610) 2020-11-10 12:42:29 -08:00
Nikita Salnikov-Tarnovski d6c2de4389
Small cleanup (#1603)
* Small cleanup

* Format
2020-11-10 14:55:53 +02:00
Mateusz Rzeszutek aa3ba8d165
Refactor Instrumenters into InstrumentationModules - D, E, F, G, H (#1557) 2020-11-09 14:41:12 -08:00
Mateusz Rzeszutek d307ffc532
Refactor Instrumenters into InstrumentationModules - A, B, C (#1556)
* Refactor Instrumenters into InstrumentationModules - A, B, C

* Fixed some modules' names to match library/instrumentation gradle module

* Fix couchbase 2.6 muzzle
2020-11-09 15:42:41 +01:00
Trask Stalnaker 71f91877ab
Fix muzzle and add missing helper classes (#1585)
* Fix muzzle

* Fix jdbc instrumentation

* Fix jms instrumentation

* Fix couchbase instrumentation

* Fix servlet instrumentation
2020-11-08 13:54:00 -08:00
Anuraag Agrawal 3d21c26632
Update to SDK 0.10.0 (#1564) 2020-11-05 13:17:47 -08:00
Anuraag Agrawal e1c7baab42
Upgrade to latest SDK snapshot (#1549) 2020-11-05 17:45:59 +09:00
Mateusz Rzeszutek 8629edd346
Run muzzle once per instrumented library - introducing InstrumentationModule (#1528)
* Run muzzle once per instrumented library - introducing InstrumentationModule

* spotless

* Fix muzzle

* Apply code review comments
2020-11-04 15:39:12 +01:00
Anuraag Agrawal 5d2cb459df
Update to latest SDK snapshot (#1539) 2020-11-02 16:07:53 +09:00
Anuraag Agrawal c6eee70660
Update to latest snapshot. (#1524) 2020-10-29 18:54:09 -07:00
Pavol Loffay c931b1b85a
Add explicit names to metrics/trace SPI factories (#1513)
* Add explicit names to metrics/trace SPI factories

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix tests

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-10-29 12:14:41 +02:00
Pavol Loffay bdf2a91290
Rename printReferences gradle task to printMuzzleReferences (#1517)
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-10-29 15:37:38 +09:00
Bogdan Drutu 21a1c65128
Remove inner class imports; avoid future imports by disabling in editorconfig (#1489)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-26 19:30:51 -07:00
Anuraag Agrawal a2dccf2316
Update to latest SDK snapshot. (#1479) 2020-10-26 19:29:46 -07:00
Anuraag Agrawal f6ad05b8e3
Update to latest SDK snapshot (#1384)
* Update to latest SDK snapshot

* Use published snapshot

* Fixes

* Cleans

* spotless

* Most

* Clean

* Merge

* Temporarily remove context interop

* WIP

* Prepare for intercepting propagated span

* Bump SDK

* IDE updates

* Lots

* compileJava

* Done?

* bar

* Spot

* drugs

* Groovy--

* green for me

* Spot

* Remove grpc import

* Scrub
2020-10-25 15:14:32 +09:00
Sergei Malafeev 1674b46d4a
fix finding SpanExporterFactory by exporterName with underscore e.g. "otlp_span" (#1404)
* #1401 fix finding SpanExporterFactory by exporterName with underscore e.g. "otlp_span"

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* #1401 change exporterName of "otlp_span" and "otlp_metric" only

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-10-20 14:51:07 +03:00
Trask Stalnaker 57301e3fe7
Rename "integration" to "instrumentation" (#1412)
* Rename integration to instrumentation

* Revert doc changes, need to wait for release

* spotless
2020-10-19 14:36:30 +09:00
Pavol Loffay f29763d6ef
Add SPI to configure additional bootstrap package prefixes (#1380)
This feature is useful when a large set of custom instrumentations is
using common classes from a custom package.
2020-10-16 10:27:14 -07:00
Nikita Salnikov-Tarnovski 15e0b2ff32
Run build without warnings (#1387) 2020-10-15 16:10:22 -07:00
Mateusz Rzeszutek ee0e0a9697
Muzzle improvements: docs, javadocs, renamings and minor refactoring (#1379) 2020-10-14 16:49:51 -07:00
Trask Stalnaker 7ecc9bb37b
Rename "auto" to "javaagent" in modules (#1370) 2020-10-13 12:32:13 -07:00
Trask Stalnaker 1b51d4a6b1
Rename packages (#1367) 2020-10-11 13:54:35 -07:00
Mateusz Rzeszutek 59784a5b77
Muzzle should recognise mismatch on unimplemented abstract methods at runtime (#1357) 2020-10-09 15:03:32 -07:00
Pavol Loffay 3f5c644885
Add Prometheus metric exporter (#1262) 2020-10-09 12:06:51 -07:00
Mateusz Rzeszutek 409530629f
Refactor all tests that use Config so that they don't fail locally (#1310)
* Refactor all tests that use Config so that they don't fail locally

* Use ConfigUtils in tests for all config-related things

* Fix spotless and codenarc

* Fix spotless

* PR comments: remove unnecessary config
2020-10-08 20:01:31 +03:00
Ioannis Mavroukakis 9523f9ffe6
fix and/or ignore spotbugs errors (#1325) 2020-10-06 19:39:17 -07:00
Pavol Loffay 3952290511
Sort instrumentations before adding them to ByteBuddy (#1326)
* Control order of adding instrumentations to ByteBuddy

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2020-10-06 11:14:13 -07:00
Anuraag Agrawal 5bba5d8482
Update to latest snapshot (#1331)
* Update to latest snapshot

* Update to latest snapshot

* instrumentation-api

* spotless
2020-10-06 17:47:41 +09:00
Nikita Salnikov-Tarnovski aa79224f32
Ported JMS 1.x tests to testcontainers (#1327)
* Ported JMS 1.x tests to testcontainers

* Polish

* Debug

* Fix test

* spotless

* Remove otel.trace.classes.exclude properties

* codenarc

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-10-06 09:05:51 +03:00
Anuraag Agrawal dadaac9a8c
Use 2-line license header to match SDK repo (#1321)
* Use 2-line license header to match SDK repo

* Apply change
2020-10-05 14:29:56 +09:00
Anuraag Agrawal f2194a928c
Update to latest snapshot. (#1304) 2020-10-04 19:41:10 -07:00
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 08f34d00b3
Allow vendor distribution to provide default configuration (#1243) 2020-09-29 15:02:16 -07:00
Mateusz Rzeszutek 9e591bb01a
Refactoring Config into @AutoValue POJO (#1254) 2020-09-28 22:08:45 -07:00
Trask Stalnaker 8954f222c0
Update to the latest opentelemetry-java 0.9.0-SNAPSHOT (#1266) 2020-09-26 20:44:28 -07:00
Pavol Loffay 8ed4ef55c8
Support otlp_span and otelp_metric exporter config names (#1253)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-09-25 09:14:56 +09:00
Pavol Loffay a2fac7fdc1
Support multiple exporters via OTLP_EXPORTER config (#1242)
* Support multiple exporters via OTLP_EXPORTER config

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-09-23 15:17:52 -07:00
Pavol Loffay bb50fe7883
Fix package name in javaagent-tooling tests (#1244)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-09-23 15:35:47 +03:00
Mateusz Rzeszutek 3d030288d2
Muzzle should fail on unimplemented abstract methods (#1193)
* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Muzzle should fail on unimplemented abstract methods

* Update javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/Reference.java

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

* Muzzle should fail on unimplemented abstract methods

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-23 07:38:58 +03:00
Anuraag Agrawal 9635a5e84f
Force flush after finishing lambda function. (#1204)
* Force span flush after lambda invocation.

* Force flush after finishing lambda function.

* bleh

* Better revert

* Accessor

* OpenTelemetrySdkAccess
2020-09-17 14:26:24 +09:00
Mateusz Rzeszutek d95235476e
Logback MDC auto-instrumentation gets muzzled and does not work (#1208)
* Logback MDC auto-instrumentation gets muzzled and does not work

* Update instrumentation/logback/logback-1.0.0/auto/src/main/java/io/opentelemetry/instrumentation/auto/logback/v1_0_0/LoggingEventInstrumentation.java

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

* Logback MDC auto-instrumentation gets muzzled and does not work

Moved UnionMap to internal package

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-16 14:31:47 +03:00
Anuraag Agrawal 912a159c19
Update to latest SDK snapshot. (#1202) 2020-09-15 17:49:10 +09:00
Anuraag Agrawal a9f0e21bfe
Support injecting resources into classloader and use it in aws-sdk-2.… (#1172)
* Support injecting resources into classloader and use it in aws-sdk-2.2 instrumentation.

* Use URL for duplication check instead of reading content and inject URLs directly instead of reading to byte array first.

* Remove getResource
2020-09-15 17:38:20 +09:00
Trask Stalnaker 221deb1f98
Fix test logging (#1194) 2020-09-13 21:13:11 -07:00
Anuraag Agrawal 266b8b927d
Split out artifact for javaagent SPI. (#1187)
* Split out artifact for javaagent SPI.

* Fix test - exporters are loaded by test and should not be on the classpath

* Fix
2020-09-11 07:09:04 +03:00
Sergei Malafeev f0eaa5f0fa
JDK 11 HttpClient instrumentation (#1121)
* JDK 11 HttpClient instrumentation

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* trace sync request

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of unnecessary gradle options

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* wip

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* end span when future completed

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove unneeded check

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of repeated test code

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* get rid of unneeded code

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* implement review comments

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* Update instrumentation/httpclient/src/main/java/io/opentelemetry/instrumentation/auto/httpclient/HttpClientInstrumentation.java

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

* Update instrumentation/httpclient/src/main/java/io/opentelemetry/instrumentation/auto/httpclient/HttpClientInstrumentation.java

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

* Update instrumentation/httpclient/src/test/groovy/JdkHttpClientTest.groovy

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

* rename to java-httpclient

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove unused

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* follow redirects

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* remove semicolon

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-10 16:04:52 +09:00
Anuraag Agrawal 16b7f5b345
Move AgentClassLoader out of public API. (#1182)
* Move AgentClassLoader out of public API.

* Move tests too

* Keep auto-api on bootstrap classpath.
2020-09-10 14:56:20 +09:00
Jakub Wach 7080bdb9a4
spring mvc3 - proper span name in case of sec fail (#718) (#1122) 2020-09-09 10:08:28 +03:00
Anuraag Agrawal 5289520203
Fix groups / base name for javaagent artifacts (#1173) 2020-09-09 09:38:29 +03:00
John Bley 030e9fe107
Properly track causality of kotlin suspend functions (#1168)
* Initial work on kotlin suspend functions.

Introduce new instrumentation to capture kotlin suspended coroutines
and track/update Context appropriately.  Add high-concurrency test
showing the issue and that it is solved.

* spotlessApply

* Fix spelling of continuation.

* Fix kotlin style

* Add kotlin dependencies to muzzle

* Fix muzzle in another package that pulls in java-concurrent.

* Use runBlocking instead of a sleep to finish test

* Clarify and improve comments on how/why

* Move kotlin coroutines instrumentation to top-level instrumentation module

* Properly build muzzle check for kotlin-coroutines

* Merge kotlin-testing into regular src/test rather than separate module

* Clean up attach/detach logic

* Tighten bounds and skipVersions on kotlin muzzle

* Rename fields and clean up attach logic

* Clean up types/side-effect code

* spotlessApply

* Enhance muzzle testing to properly test latest kotlin.
Required updating a few kotlin-y things to latest version to properly resolve the jvm
variant of their new multiplatform stuff.
2020-09-09 14:11:00 +09:00
Mateusz Rzeszutek 70a06ef086
Fix a bug when FieldBackedProvider uses a map and value is set to null (#1177) 2020-09-09 14:10:17 +09:00
Anuraag Agrawal 5c86bcc20d
Update SDK dependency to released 0.8.0 (#1162)
* Update SDK dependency to released 0.8.0

* Update exporter

* Fix fake-backend proto reference
2020-09-03 17:09:51 +09:00
Richard Startin a012143ac0 don't cache classloaders which can be skipped by name (DataDog/dd-trace-java#1732) 2020-09-01 10:31:24 -07:00
Tyler Benson e2aca0f378 Add muzzle reference detection for invokedynamic calls. (DataDog/dd-trace-java#1712) 2020-09-01 10:31:24 -07:00
Tyler Benson d7d46b2ef9 Add instrumentation for Guava ListenableFutures context propagation (DataDog/dd-trace-java#1665) 2020-09-01 10:31:23 -07:00
Anuraag Agrawal 770502eed9
Merge exporter auto config into javaagent-tooling. (#1120)
* Merge exporter auto config into javaagent-tooling.

* Update javadoc
2020-08-30 11:07:48 +09:00
Nikita Salnikov-Tarnovski e20cba57c2
Telemetry auto version (#1112)
* Provide telemetry.auto.version

* Report instrumentation library version

* Rename class

* Format
2020-08-27 23:16:17 +03:00
Mateusz Rzeszutek 2203a37771
Log current thread id and name as span attribute (#1093) 2020-08-27 10:12:51 -07:00
Ying cfd111981b
create metricexporterfactory by default (#1098) 2020-08-26 19:59:20 -07:00
Nikita Salnikov-Tarnovski bc98955176
Update to latest otel-java snapshot (#1057)
* Update to latest otel-java snapshot

* Upgrade to working otel-java snapshot

* Update to latest otel-java snapshot

* Update to latest otel-java snapshot
2020-08-26 22:03:28 +03:00
Trask Stalnaker 14ff14f2b1
Remove thread utils module (#1017)
* Remove thread-utils module

* No need for extra thread pool
2020-08-17 11:10:48 +03:00
Trask Stalnaker 88eef8934e
Small ReferenceCreator cleanup (#972) 2020-08-16 10:13:10 -07: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
Trask Stalnaker f46ba88c29
Rename library-api artifact to instrumentation-api (#969) 2020-08-13 22:43:39 -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 bf9c160570
Rename javaagent modules (#952) 2020-08-12 22:50:14 -07:00