Trask Stalnaker
c9619c0626
Disable strict context check for elasticsearch 6 tests ( #3917 )
...
* Disable strict context check for elasticsearch 6 tests
* Mongo too
2021-08-23 22:46:04 -07:00
Lauri Tulmin
ff5472a822
Limit number of concurrently running docker tests ( #3664 )
...
* Limit number of concurrently running docker tests
* rename heavy to testcontainers
* use shorter expression
2021-07-27 15:41:39 -07:00
Anuraag Agrawal
e0cb216610
Remove remaining usages of basic span asserts ( #3616 )
2021-07-19 10:09:44 -07:00
Anuraag Agrawal
f5ce4c03f8
Inline basic usages of basicSpan ( #3583 )
...
* Inline basic usages of basicSpan
* spock
2021-07-18 21:15:51 +03:00
Anuraag Agrawal
d3b62de8a5
Replace most uses of TraceUtils with testRunner runWithSpan. ( #3582 )
2021-07-15 10:30:34 -07:00
Anuraag Agrawal
3cfa086ffd
Migrate nullaway config to plugin ( #3462 )
2021-07-01 18:13:16 +09:00
Mateusz Rzeszutek
15ed01d4fc
Change all instrumentation names to io.opentelemetry.{libName}-{libVersion} ( #3411 )
...
* Change all instrumentation names to io.opentelemetry.{libName}-{libVersion}
* minumum supported version
2021-06-30 15:34:36 +02:00
Anuraag Agrawal
761b9c280b
Migrate instrumentation gradle files to kotlin ( #3414 )
...
* Migrate instrumentation gradle files to kotlin
* Convert
* Muzzle
2021-06-28 17:27:12 +09:00
Anuraag Agrawal
785dc6adf2
Rename build files to build.gradle ( #3409 )
...
* Rename build files to build.gradle
* Rename smoke-tests
* Fix already broken
2021-06-25 16:10:31 +09:00
Anuraag Agrawal
deb0e255cf
Use plugins block everywhere for applying plugins ( #3386 )
...
* Use plugins block everywhere for applying plugins
* Actually it's library instrumentation
2021-06-24 11:13:35 +09:00
Anuraag Agrawal
80f43b7a6a
Migrate javaagent-instrumentation to plugin ( #3328 )
...
* Migrate instrumentation.gradle to plugin
* Migrate usages
* Remove old
* Fix
* Revert example
* afterEvaluate
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-17 23:13:14 +09:00
Lauri Tulmin
b3ab474d65
Fix mongo latest dep tests ( #3333 )
2021-06-16 14:06:52 +03:00
Anuraag Agrawal
b7bfbf0cc6
Migrate instrumentation-library / common to plugins ( #3320 )
2021-06-15 11:54:48 -07:00
Anuraag Agrawal
224dc51e93
Migrate java.gradle to conventions plugin ( #3289 )
...
* Migrate java.gradle to convention plugin.
* Switch to java-conventions
* Remove old file
* Fix
* Fix merge
* Missing paragraph
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-06-15 08:10:39 +09:00
Trask Stalnaker
4c80c62ce7
Add unused to remaining advice classes ( #3280 )
...
* Add unused to remaining advice classes
* Add newlines for visual separation
2021-06-14 11:12:02 +09:00
Trask Stalnaker
cefaecab3f
Use more efficient namedOneOf where possible ( #3200 )
...
* Use more efficient namedOneOf where possible
* Fix - hasClassesNamed does and not or
2021-06-07 11:41:34 +09:00
Anuraag Agrawal
c3dedbb64e
Enable all errorprone checks ( #3155 )
...
* Enable all errorprone checks
* Fixes
* Finish
* Finish
* Add flag to disable error prone
2021-06-01 17:41:08 +09:00
Trask Stalnaker
fb0d047fce
Last type instrumentations to top-level classes ( #3123 )
2021-05-30 16:05:31 -07:00
Anuraag Agrawal
ed88cca533
Migrate from spotbugs to errorprone ( #3122 )
...
* Migrate from spotbugs to errorprone
* Fix hashtable
* try-with-resources
* Fix from merge
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 14:23:40 -07:00
Anuraag Agrawal
c358a35414
Use dependency management pattern for dependency versions ( #3113 )
...
* Use dependency management pattern for dependency versions.
* Add groovy bom too
* Update dependencyManagement/dependencyManagement.gradle.kts
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-28 11:32:08 +09:00
Mateusz Rzeszutek
bb8f515083
Refactor TypeInstrumentation#transformers() method ( #3019 )
...
* Refactor TypeInstrumentation#transformers() method part 1
Add TypeInstrumentation and its implementations
* Refactor TypeInstrumentation#transformers() method part 2
Use the new method in all existing TypeInstrumentation implementations
* Drift
* Spotless
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-18 09:50:26 +02:00
Anuraag Agrawal
fe41885ee6
Switch to colon notation for dependencies. ( #2994 )
...
* Switch to colon notation for dependencies.
* Even more cleanup
* Revert mistake
2021-05-15 15:31:06 +09:00
Mateusz Rzeszutek
9c7fae3b04
Extract javaagent-extension-api from tooling & spi ( #2879 )
2021-05-06 23:30:25 -07:00
Anuraag Agrawal
b416ece9c3
Extract Mongo library instrumentation ( #2789 )
...
* Extract mongo library instrumentation
* Finish
* Drift
* Cleanup
* build twice
* Spot
2021-04-14 13:51:21 +09:00
Lauri Tulmin
c49dfd57de
Fix mongo latest test ( #2790 )
2021-04-13 11:49:27 +03:00
Lauri Tulmin
718a5a17a3
Mongo reactive context propagation ( #2758 )
2021-04-12 15:58:25 -07:00
Anuraag Agrawal
826d8ac781
Cleanup mongodb tests ( #2732 )
...
* Cleanup mongodb tests
* Drift
* Cleanup
* Timeout
* Cleanup
2021-04-07 14:02:56 +09:00
Trask Stalnaker
6ea316e22e
Remove timeout annotations ( #2725 )
2021-04-06 16:36:18 +09:00
Lauri Tulmin
4ad9ed5c32
Reimplement finding open ports ( #2629 )
2021-03-25 10:41:20 -07:00
Trask Stalnaker
1a18841fdf
Apply new muzzle feature to mongo instrumentation ( #2608 )
2021-03-20 12:48:34 +09:00
Mateusz Rzeszutek
ae23b97ec4
Move and rename NetPeerUtils ( #2548 )
...
* Move and rename NetPeerUtils
* Rename NetPeerUtils to NetPeerAttributes; inject instance instead of using a global var
* Rename SpanAttributeSetter to AttributeSetter (might be used to set on AttributesBuilder in the future, who knows)
* Deprecate default BaseTracer constructor: library instrumentations are supposed to inject all dependencies, the javaagent should explicitly pass globals
* fix compilation failure
* Remove peer.service customization from library instrumentation
2021-03-16 13:50:19 +01:00
Mateusz Rzeszutek
f3ba2302eb
Remove unnecessary libs from the javaagent shadowJar ( #2566 )
...
* Remove unnecessary libs from the javaagent shadowJar
And make it a bit lighter: 36 MB -> 21 MB
* Apply code review comments
* Remove unnecessary kotlin exclusion
2021-03-16 10:47:05 +01:00
Trask Stalnaker
62f2611486
Update instrumentation names ( #2433 )
2021-03-01 19:34:25 -08:00
Mateusz Rzeszutek
fd55ce226a
Refactor DatabaseClientTracer (in preparation for low-cardinality span names) ( #2398 )
...
* Refactor DatabaseClientTracer (in preparation for low-cardinality span names)
* spotless
2021-02-26 15:36:24 +01:00
Jamal Fanaian
bdcb2d09e8
Implement spanName for MongoClientTracer ( #2307 )
...
* Implement spanName for MongoClientTracer
Adds a basic implementation for spanName in MongoClientTracer that uses the recommended name from the specification.
* Fix mongo4 tests
* Fix typo in test
* Handle missing dbName
* Update test with a command that has no collection as value
* Fix style issues
* Fix formatting
* remove uneeded line
2021-02-18 11:44:21 +09:00
Mateusz Rzeszutek
0adeb85f43
Refactor InMemoryExporter and move some of its methods … ( #2264 )
...
* Refactor InMemoryExporter and move some of its methods to spock base class & junit extension
* codenarc
* spotless
* Apply suggestions from code review
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* fix armeria library tests
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-02-15 17:36:14 +01: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
Mateusz Rzeszutek
93b3a3b289
testing-common refactoring: replace direct AgentTestRunner usage with… ( #2134 )
...
* testing-common refactoring: replace direct AgentTestRunner usage with spock spec
* Updated instrumentation docs
* Fix reactor-core library tests
ReactorCoreTest was getting a tracer from GlobalOpenTelemetry before LibraryTestTrait had a change to initialize the SDK
2021-02-01 11:32:25 +01:00
Trask Stalnaker
23945d97e9
Publish lettuce and mongo common ( #2148 )
2021-02-01 13:26:08 +09:00
Sergei Malafeev
bbcbeb51e3
MongoDB 4 driver instrumentation ( #2046 )
...
* MongoDB 4 driver instrumentation
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* fix getting constructor
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* fix formatting
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* Update instrumentation/mongo/mongo-4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/mongo/v4/MongoClientInstrumentationModule.java
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Update settings.gradle
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Update instrumentation/mongo/mongo-4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/mongo/v4/MongoClientInstrumentationModule.java
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* use mongo-4.0
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* use public api
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* use testImplementation
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* use declaresField(named("commandListeners")) in typeMatcher
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* migrate to mongo-4.0-testing
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-01-25 15:55:03 +02: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
Anuraag Agrawal
3b88bb75ae
Use SemanticAttributes for DbSystem ( #1991 )
2021-01-07 18:59:56 -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
Trask Stalnaker
4cbfb361e1
Use Context more in DatabaseClientTracer ( #1836 )
2020-12-07 09:15:15 +02:00
Trask Stalnaker
a04a0586a5
Fix mongo-common testLatestDeps ( #1818 )
2020-12-01 20:18:17 -08:00
Trask Stalnaker
01b4345742
Move MongoClientTracerTest to same module as MongoClientTracer ( #1804 )
...
* Move MongoClientTracerTest to mongo-common
* Remove multi-version support
* Use library dependency
2020-12-01 14:45:45 -08:00
Trask Stalnaker
26f254b10d
Create javaagent dirs for all instrumentations, part 2 ( #1794 )
2020-11-28 22:26:49 -08:00
Trask Stalnaker
41bd489a77
Format groovy files ( #1793 )
2020-11-28 21:22:14 -08:00
Trask Stalnaker
5f263644da
Create javaagent dirs for all instrumentations ( #1668 )
...
* Create javaagent dirs for all instrumentation
* Add note about kotlin coroutine library instrumentation
* Feedback
2020-11-28 21:04:16 -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
50c8ab499d
Remove no longer needed helperClassNames() methods ( #1755 )
2020-11-24 20:50:32 -08:00
Trask Stalnaker
c3e1a321d2
Fix MongoDB testLatestDeps ( #1703 )
...
* Fix MongoDB testLatestDeps
* Codenarc
2020-11-20 09:34:25 +02:00
Jeff Yemin
d093a561b9
Report only known collection names in MongoClientTracer ( #1625 ) ( #1662 )
...
* Report only known collection names in MongoClientTracer (#1625 )
* Use allow-list of commands that are known to use collection name as the value of the command
* Special-case getMore command, which uses a different field for the collection name
* Add create, drop, and createIndexes to list of commands with collection name as their values
2020-11-19 16:26:27 -08:00
Jeff Yemin
65a6293714
Improve command scrubber in MongoClientTracer ( #1587 ) ( #1663 )
...
* Improve command scrubber in MongoClientTracer (#1587 )
* Don't scrub the command field value at all if it's a string
* Use JsonWriter to improve efficiency of the scrubber
* If available, user JsonWriter.Builder.maxLength to limit size of the query string
2020-11-19 13:21:29 -08:00
Trask Stalnaker
cecdfc2cd0
Update instrumentation names to be consistent ( #1671 )
...
* Update instrumentation names to be consistent
* Remove amqp from rabbitmq package name
2020-11-18 19:53:31 -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
Mateusz Rzeszutek
ef58ec1770
Refactor Instrumenters into InstrumentationModules - K, L, M ( #1563 )
2020-11-09 14:41:55 -08:00
Anuraag Agrawal
d3b60a5e33
Rename TRACER to tracer() ( #1540 )
2020-11-02 20:49:51 -08:00
Anuraag Agrawal
c6eee70660
Update to latest snapshot. ( #1524 )
2020-10-29 18:54:09 -07:00
Anuraag Agrawal
a2dccf2316
Update to latest SDK snapshot. ( #1479 )
2020-10-26 19:29:46 -07:00
Trask Stalnaker
3565775b00
Format groovy ( #1475 )
...
* Apply Intellij format to groovy
* spotless
2020-10-26 11:47:12 +09:00
Mateusz Rzeszutek
50990a7c17
Cassandra instrumentations should store normalised CQL queries as db.statement ( #1427 )
...
* Move `DbSystem` to package `...instrumentation.api.db`
* Move `SqlNormalizer` to `javaagent-api` package ...api.db.normalizer
* Refactor Cassandra tests so that they use testcontainers (and run on Java 11)
* Implement Cassandra statement normalization
2020-10-22 17:56:06 +02:00
Vadim Shaigorodskiy
9e8d663ba4
Remove apache httpclient version ( #1446 )
...
* Remove version from `apache-httpclient` instrumentation
Fixes : #1260
* Remove version from all instrumentation names and add instrumentation name to `spring-web`
Fixes : #1260
2020-10-22 14:22:44 +09:00
Ioannis Mavroukakis
191370657a
capture mongodb database name as mongo-db.name attribute instead of client description ( #1419 )
2020-10-19 10:52:50 -07:00
Jamal Fanaian
69ea2f7491
Add operation and collection attributes for MongoDB spans ( #1398 )
...
* Add mongodb attributes for operation and collection
* Switch to using SemanticAttributes.MONGODB_COLLECTION
* Remove unused imports
* Fix import order
* Fix formatting
* Update tests to keep more readable closure syntax
* Run spotlessApply
2020-10-19 09:20:46 +03:00
Trask Stalnaker
1b51d4a6b1
Rename packages ( #1367 )
2020-10-11 13:54:35 -07:00
Ioannis Mavroukakis
f2de47a150
SpanAssert method names should reflect underlying Span method names ( #1307 )
2020-10-05 16:04:08 +09: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
Nikita Salnikov-Tarnovski
88707c3bb0
Review DB semantic conventions ( #1284 )
2020-10-01 11:17:09 -07:00
Nikita Salnikov-Tarnovski
e74ffe2e52
Remove support for java7 from buildscripts ( #1229 )
...
* Remove support for java7 from buildscripts
* Remove support for java7 from buildscripts
2020-09-23 15:40:21 +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
Anuraag Agrawal
1b9b8b49b6
Separate out testing module for mongo. ( #1041 )
...
* Separate out testing module for mongo.
* Newline
2020-08-18 14:55:56 +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
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
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
Helen Y
86c438b154
Remove final from local variables ( #732 )
...
* Remove final from local variables
2020-07-20 13:53:34 +09:00
Alexey Zhokhov
f3421e91a0
Remove Lombok ( #672 )
...
* Gradle 6.5.1.
* Skip download javadoc and sources automatically in IntelliJ IDEA.
* Added mavenLocal to repositories.
* Removed Lombok usage.
* Removed duplicated idea config.
* Code format.
* Removed useless usage of Objects.requireNonNull.
* Use instanceof to comparing objects.
* Code format.
* Code format.
* Fixes after merge.
* Fixed sneakyThrow exception.
* Code format.
2020-07-18 15:52:55 +03:00
Nikita Salnikov-Tarnovski
9f1ffbe38c
Remove attribute `span.origin.type` ( #712 )
2020-07-16 10:00:45 -07: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
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
Rashmi
cfade733b8
Fixed Mongo client double tracing bug ( #471 )
...
* Fixes #457
* Addressing review comments
1. Added comments in test
2. Fixed latestDepTest failures in MongoAsyncClient by adding `declaresField`
3. Made TracingCommandListener inline in MongoClientAdvice
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-06-04 19:48:05 +03: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
John Bley
55deb722cf
Populate db.url for MongoDB spans. ( #280 )
2020-03-24 15:42:03 -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
4921fecdb1
Update instrumentation package names, K-Z ( #255 )
2020-03-19 22:19:22 -07:00
Trask Stalnaker
d70f4ded94
Better span names for mongo ( #242 )
2020-03-19 14:11:24 -07:00