Commit Graph

356 Commits

Author SHA1 Message Date
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
Lauri Tulmin 35d6bdb730
Hibernate query span naming (#3106)
* Hibernate query span naming

* remove commented out code

* modify query sanitizer to accept queries that start with from clause

* add sql sanitizer test for queries starting with from

* rename hibernate-4.3 to hibernate-procedure-call-4.3
2021-05-28 11:31:52 -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
Ago Allikmaa 165bc1e492
Akka propagation fix and concurrency tests (#3099) 2021-05-27 09:43:09 -07:00
Anuraag Agrawal acedbff78d
Migrate gRPC to Instrumenter API (#3073)
* Migrate gRPC to Instrumenter API

* Don't unwrap grpc exception

* Fix merge and cleanup
2021-05-27 15:40:53 +09:00
Trask Stalnaker c8ecd9a619
Add response type parameter to db attributes extractor (#3093)
* Add response type parameter to DbAttributesExtractor

* AutoValue

* ResultSet
2021-05-26 23:13:33 -07:00
Trask Stalnaker a6c3d80b50
Update cassandra-3.0 to Instrumenter API (#3066) 2021-05-25 21:45:03 -07:00
Mateusz Rzeszutek d755654c29
[WIP] Add peer.service to Instrumenter API (#3050)
* [WIP] Add peer.service to Instrumenter API

* Move PeerServiceAttributesExtractor to javaagent-api and use reflection to add it

* Finish PeerServiceAttributesExtractor

* Fix tests

* Add peer.service to apache-httpclient-5.0, jedis-1.4, lettuce-4.0
2021-05-25 15:31:41 +02:00
Trask Stalnaker 1583683aec
Add Nullable to Instrumenter API response args (#3041) 2021-05-24 09:14:48 -07:00
Trask Stalnaker f11bd75710
Don't use singleton for propagator getters/setters (#3054) 2021-05-21 11:48:54 -07:00
Trask Stalnaker 329233e576
Change a couple of Longs to Integers in Instrumenter API (#3043) 2021-05-20 14:33:22 -07:00
Anuraag Agrawal 4b1714c3f4
Update to Gradle 7.0 (#2983)
* Update to Gradle 7.0

* Fix scala

* Restore accidental

* Fix deprecations
2021-05-14 11:52:20 +09:00
Anuraag Agrawal 057d8861fa
Record HTTP server metrics in instrumenter API. (#2877)
* Record HTTP server metrics in instrumenter API.

* Fix

* Response attributes

* Start cleaning

* Docs

* Test

* Finish test

* Cleanups

* Cleanups
2021-05-12 17:49:12 +09:00
Lauri Tulmin d29bf39428
Don't set span status to unset (#2956) 2021-05-11 16:14:19 -07:00
Trask Stalnaker 10db083e77
Update to OTel API/SDK 1.2.0 (#2945)
* Update to OTel API/SDK 1.2.0

* TCP.IP -> tcp_ip

* Fix smoke tests
2021-05-10 10:14:07 -07:00
Hangzhi 60ee981d07
Prevent http.url containing credentials in HttpClientTracer (#2707)
* http.url must not contain credentials

* remove user info from url

* Update HttpClientTracerTest.groovy

fix inconsistency in protocol

* fix httpClient and httpServer

* Update HttpServerTracer.java

* Only scrub userinfo if present

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-05-06 23:31:26 -07:00
Lauri Tulmin 1fba62807f
Resteasy server span naming (#2900)
* Resteasy server span naming
2021-05-06 15:04:56 +03:00
Lauri Tulmin 357140c081
Server span naming for servlet filters (#2887)
* Server span naming for servlet filters

* wildfly default servlet has empty mappings

* jetty11 requires java11

* try a differnt way to disable jetty11 tests on java8

* Update instrumentation/servlet/servlet-5.0/javaagent/src/test/groovy/TomcatServlet5FilterMappingTest.groovy

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

* review fix

* rework to use InstrumentationContext

* remove debugging code

* move MappingResolver to avoid ClassCastException on wildfly

* Update instrumentation/servlet/servlet-3.0/javaagent/src/test/groovy/TomcatServlet3FilterMappingTest.groovy

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

* review fixes

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-05-06 13:25:17 +03:00
Mateusz Rzeszutek c9a3793bf8
Instrumenter API improvements (#2860)
* Instrumenter API improvements

* Move HTTP & net classes to separate packages
* Remove `db` prefix from method names in `DbAttributesExtractor`
* Add request-only net attributes extractor (it'll be needed in spring-sleuth-otel once we decide to use Instrumenters there)

* One NetAttributesExtractor class, javadocs

* add missing @Nullable

* Apply suggestions from code review

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

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-05-06 11:35:38 +02:00
Nikita Salnikov-Tarnovski 9e9fe118fb
Update NamingConvention.java (#2913)
Improved wording.
2021-05-05 09:42:04 -07:00
Mateusz Rzeszutek e00341729f
Use Instrumenter in JMS instrumentation (#2803)
* Use Instrumenter in JMS instrumentation

And introduce messaging semantic conventions

* Code review comments

* Use Instrumenter in JMS instrumentation - code review comments

* remove useless test

* fix missing instrumentation version

* Code review comments

* Do not allow conditional delegation to SDK
2021-05-05 10:35:39 +03:00
Anuraag Agrawal a66a13f938
Only reset server context if there is a leak. (#2876)
* Only reset server context if there is a leak.

* Spot
2021-04-28 15:35:49 +09:00
Trask Stalnaker 1824e36b96
Better server span name for Grails and Wicket (#2814) 2021-04-22 14:16:54 -07:00
Lauri Tulmin 9f8371e77c
Use locale insensitive lower/upper case conversion (#2838) 2021-04-22 11:24:13 +09:00
Mateusz Rzeszutek ce3a88ca8c
Move ContextPropagationDebug to internal package (#2804)
And use it in the Instrumenter API
2021-04-14 10:12:36 -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
Mateusz Rzeszutek 113ef24bef
Use Instrumenter in JDBC instrumentation (#2739)
* Use Instrumenter in JDBC instrumentation

Except jdbc-datasource, that one is going to be in a separate PR

* Use Instrumenter in JDBC instrumentation - code review comments
2021-04-13 16:19:13 +02:00
Mateusz Rzeszutek 42cf3bc077
Record internal metric for SQL cache misses (#2747)
* Record internal metric for SQL cache misses

And use `SupportabilityMetrics` in `Instrumenter`

* Fix broken shouldStart() logic

* Code review comments
2021-04-08 17:50:48 +02:00
Trask Stalnaker 6ea316e22e
Remove timeout annotations (#2725) 2021-04-06 16:36:18 +09:00
Anuraag Agrawal cc47da585b
New Instrumenter API (#2596)
* Instrumenter

* Spotless

* More instrumenter

* More

* Instrumenter API

* New Instrumenter API - InstrumenterBuilder (#20)

* New Instrumenter API - InstrumenterBuilder

* New Instrumenter API - InstrumenterBuilder - code review comments

* Start doccing

* Docs

* Most tests

* Last test

* Stick with current hostName lookup for now

* Update testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpClientTest.groovy

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

* New Instrumenter API - code review comments (#21)

* Doc

* Checkstyle

* Cleanups

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-04-05 15:45:07 +09:00
HaloFour bf8ea885f2
Add AsyncSpanEndStrategy implementation for RxJava 2 instrumentation (#2665) 2021-04-04 22:05:01 -07:00
Lauri Tulmin 949d82fbef
Reset context class loader for new thread (#2691) 2021-04-01 16:29:11 -07:00
HaloFour 9a5c65284f
Rename Jdk8AsyncEndStrategy to Jdk8AsyncSpanEndStrategy (#2664) 2021-03-30 19:09:27 -07:00
HaloFour b0d27405eb
Add asynchronous tracing to Spring Boot Autoconfigure WithSpanAspect (#2618) 2021-03-29 16:35:08 -07:00
Anuraag Agrawal 79d7e88e53
Use Caffeine for weak maps (#2601)
* Caffeine weakmap

* Use Caffeine for weak maps

* Drift

* Drift

* Remove weak-lock-free

* Update licenses

* Fix bug

* Restore weaklockfree

* Clean

* Fixes

* Inline expunction

* Synchronized

* More comment

* Fix shading

* Executor

* computeIfAbsent and delete unused.

* Fix license report
2021-03-24 17:12:26 +09:00
Trask Stalnaker 0ce9ca57d9
Move attributes to span builder for use by samplers (#2587)
* Move attributes to span builder for sampler use

* Fix test

* Remove unnecessary test
2021-03-17 15:02:56 +02: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
Anuraag Agrawal cf6d9deb4e
Extract library instrumentation for lettuce 5.1 (#2533) 2021-03-10 10:03:53 +09:00
Piotr Glazar 92d61b5844
Auto value (#2494)
* SqlStatementInfo as AutoValue

* RequestMeta as AutoValue

* DbInfo as AutoValue

* After merge compilation fix

* CouchbaseQuerySanitizer compilation fix

* JdbcConnectionUrlParserTest compilation fix

* Revert "RequestMeta as AutoValue"

This reverts commit 609b57ee48.
2021-03-09 15:07:03 +02:00
Mateusz Rzeszutek 3dff44874f
Fix RestTemplateInterceptor so that it calls endExceptionally() on exception (#2516) 2021-03-08 09:36:47 -08:00
Mateusz Rzeszutek fe4d95a689
Refactor BaseTracer#onError() method (and unwrapThrowable()) (#2513)
* Refactor BaseTracer#onError() method (and unwrapThrowable())

Also remove the deprecated BaseTracer(Tracer) constructor.

* Update BaseTracer javadoc

* fix tests

* Code review comments
2021-03-08 15:08:26 +02:00
Anuraag Agrawal 94872b1ced
Move DB helpers to instrumentation-api (#2511)
* Move DB helpers to instrumentation-api

* Fix gradle config

* Remove legacy
2021-03-08 12:32:36 +09:00
Trask Stalnaker 5162c023bc
Updates to thread propagation debug property (#2500) 2021-03-05 11:02:36 -08:00
Mateusz Rzeszutek 72ffb3b7c5
Make BaseTracer fields private (#2492)
* Make BaseTracer fields private

By making `tracer` private we're forcing all tracer implementation to use the `spanBuilder()` utility method and pass the parent context manually.
2021-03-05 10:54:00 -08:00
Anuraag Agrawal d7f8967ff6
Add a caching API based on caffeine for use from instrumentation, not just javaagent (#2477)
* Add caching API

* Finish

* javadoc

* Extract dep

* git add

* Drift

* Spotbugs

* checkstyle

* Fix package

* Test Caffeine patch
2021-03-05 17:57:23 +09:00
Lauri Tulmin 29790d8472
Low cardinality name for servlet span (#2417) 2021-03-04 12:39:37 -08:00
Trask Stalnaker 0abc492bc3
Rename more properties (#2486)
* Rename more props to experimental

* Rename more properties

* Rename .internal to .testing

* Revert changes to examples distro

* Move chunk.new-trace to experimental

* Fix unrelated build issue
2021-03-04 11:20:47 -08:00
Mateusz Rzeszutek 8242a01b3a
Clean up and document BaseTracer (#2482) 2021-03-04 11:21:46 +01:00
Mateusz Rzeszutek fbe55e04aa
Use low cardinality span names in Cassandra instrumentation (#2423) 2021-03-03 17:54:44 +01:00
Mateusz Rzeszutek 04d6fb67ff
Move SERVER and CLIENT span context keys out of BaseTracer (#2468)
* Move SERVER and CLIENT span context keys out of BaseTracer

Inspired by https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1726#issuecomment-731890267

* Rename context keys

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-03 16:12:42 +01:00
Mateusz Rzeszutek a139d72014
Initialize Config for library instrumentations (#2467)
* Initialize Config for library instrumentations

Extracted from https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/2434

* Fix tests
2021-03-03 09:55:14 +02:00
Anuraag Agrawal 9f3dfdbc51
Use atomic updaters instead of atomic fields to reduce allocations fo… (#2462)
* Use atomic updaters instead of atomic fields to reduce allocations for commonly created objects.

* Typo
2021-03-03 14:56:37 +09:00
Mateusz Rzeszutek 8f3ea83504
Move some classes out of instrumentation-api (#2466)
* MethodsConfigurationParser is moved to javaagent-tooling - it's only used in some instrumentation modules
* BootstrapPackagePrefixesHolder is moved to javaagent-api - it just needs to be in the bootstrap CL for the classloader instrumentation, so it does not necessarily need to be instrumentation-api
2021-03-02 10:31:53 -08:00
Trask Stalnaker c838498a73
Rename two props to otel.instrumentation.common.* (#2457) 2021-03-02 10:25:36 -08:00
Mateusz Rzeszutek 24486c35b5
Use low cardinality span names in Couchbase instrumentation (#2449)
Also move unit tests to a separate module, previously they passed purely by accident (necessary classes were injected by the javaagent)
2021-03-02 10:25:01 -08:00
Mateusz Rzeszutek c18acb858e
Add BaseTracer#inject() method (#2453)
* Add BaseTracer#inject() method

And avoid using GlobalOpenTelemetry#getPropagators()

* Code review comments
2021-03-02 15:30:04 +01:00
Mateusz Rzeszutek 32a575ca9c
Remove deprecated BaseTracer#extractWithGlobalPropagators() methods (#2452) 2021-03-02 11:05:42 +01:00
Mateusz Rzeszutek 163062d13e
Remove deprecated end() & endExceptionally() methods from BaseTracer (#2424) 2021-03-01 18:14:30 +01:00
John Watson 6fed672dc6
move the SupportabilityMetrics class and make package-private (#2427) 2021-02-26 20:56:09 -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
Mateusz Rzeszutek e87cf37f63
Remove some deprecated BaseTracer#end(Span) usages (part 1) (#2401) 2021-02-25 11:35:37 +01:00
John Watson 57185f5b73
Create a new SupportabilityMetrics class rather than using alpha Metrics (#2353) 2021-02-24 12:34:45 -08:00
Nikita Salnikov-Tarnovski eaa8604e96
Better context passing for Netty 4.1 (#2361)
* Better context passing for Netty 4.1

* Format

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/context/ContextPropagationDebug.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Return test

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-02-23 10:26:41 +02:00
Lauri Tulmin c8ca7e8d07
Make http.flavor spec compliant (#2370) 2021-02-22 13:12:05 -08:00
Anuraag Agrawal 0290761acb
Migrate Armeria to HttpServer/ClientTest (#2345)
* Add HttpServerTest for Armeria

* semicolon
2021-02-20 10:35:54 +09: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
Mateusz Rzeszutek f127a972dc
Add 'trace_flags' to logging MDC (#2312)
* Add 'trace_flags' to logging MDC

* Remove 'sampled' flag
* Rename MDC keys to the current logging spec convention: trace_id instead of traceId

* Fix smoke tests
2021-02-18 16:47:26 +09:00
John Watson 836da8dbfd
Add a metric for counting the number of suppressed spans. (#2135)
* Add debug logging when a span is suppressed.

* cleanup from PR comments

* add a `default` to the switch to make checkstyle happy

* rather than logging, use a counter to keep track of the number of suppressed spans.

* update for latest from upstream

* add a default branch for checkstyle
2021-02-17 09:29:58 +02:00
Anuraag Agrawal c6bb83e653
Don't String.format when determining if instrumentation is enabled. (#2309) 2021-02-17 12:52:40 +09:00
John Watson a0b208fd52
Turn on the logging span exporter if agent debug is enabled. (#2270) 2021-02-16 15:38:37 -08: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
Mateusz Rzeszutek 0fbdcad1dd
Make BaseTracer#startSpan() return Context (#2232)
* Make BaseTracer#startSpan() return Context

* Update instrumentation/apache-camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/CamelEventNotifier.java

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

* spotless

* Add Javadocs to BaseTracer

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-02-12 12:12:40 +01:00
Mateusz Rzeszutek ecf64c25f3
Remove BaseTracer#startScope() method (#2224)
* Remove BaseTracer#startScope() method

* fix compilation failure
2021-02-10 11:39:38 +01:00
ET 42850e3ac2
Add OpenTelemetry parameter constructors to all api Tracer classes (#2233) 2021-02-09 13:35:41 -08: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
John Watson 644ee18666
Add constructors/methods to the base tracers to enable injecting an OpenTelemetry instance (#2197)
* Add constructors/methods to the base tracers to enable injecting propagators.

* formatting

* deprecate old things. convert to non-deprecated where easily possible.

* formatting, always more formatting
2021-02-05 15:50:47 +02:00
Mateusz Rzeszutek 7a3f345c18
Clean up BaseTracer, part 1 (#2159)
* Move context leak debugging to ContextPropagationDebug
* Remove getCurrentSpan()
* Add end(Context, ...) & endExceptionally(Context, ...) methods - they're supposed to replace the ones that accept Spans in the future
2021-02-02 10:12:46 +02:00
汤煜冬 c523fa2eae
add abstract method getRpcSystem() (#2149) 2021-02-01 13:47:27 +02:00
Jakub Wach 77922d4834
SQS propagation for AWS SDK 1.1 (#2114) 2021-01-29 10:21:12 +02:00
Anuraag Agrawal 6b13bcca63
Use X-Ray propagator for aws sdk 1.1 instrumentation (#2117)
* Use X-Ray propagator for aws sdk 1.1 instrumentation

* Cleaner

* Fix

* Copy over doc
2021-01-28 16:01:07 +09:00
John Watson af5719b48c
Consolidate span suppression logic into the BaseTracer (#2106)
* Hide the context keys in the BaseTracer.
Provide the appropriate methods to get access.

* key needs to be static

* put all the span suppression logic in the BaseTracer

* the formatter is our friend

* rename method and add tests

* tests that work!
2021-01-26 09:21:29 +09:00
John Watson 588f8847ed
Hide the context keys in the BaseTracer. (#2105)
* Hide the context keys in the BaseTracer.
Provide the appropriate methods to get access.

* key needs to be static

* fix formatting

* more formatting, sigh

* remove an errant semicolon
2021-01-25 09:49:16 +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
Lauri Tulmin 11ad12289b
Jetty server span handling (#2029) 2021-01-14 09:31:57 -08:00
Lauri Tulmin 79433966fb
Liberty server span handling (#1929)
* Liberty server span handling

* review fixes

* review fixes

* add doc about using compile stubs

* Update instrumentation/liberty/liberty/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/LibertyInstrumentationModule.java

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>

* Update instrumentation/liberty/liberty/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/ThreadLocalContext.java

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>

* add links to advice classes

* add commnet, remove unneeded dependency

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-12-22 15:00:58 +02:00
Vladimir Šor 135ba344cb
Tomcat server handlers (#1902)
* Tomcat server handler with passing integration and smoke tests.

* Update server span name from the servlet integration instead of trying to mimic it from the server handler.

* Cleanup and more javadocs.

* Use Java8BytecodeBridge in advice code.

* Use Java8BytecodeBridge in advice code.

* Use earliest version for compilation and muzzling.

* Use consistent instrumentation name.

* Record throwables only if the context is managed by something else.

* Getting scope handling right. Moved server span renaming logic via AppServerBridge to the ServletHttpServerTracer.

* codenarc

* more PR comments addressed

* Pass Method to startServerSpan
2020-12-16 16:59:54 +02:00
Mateusz Rzeszutek f82e9107d6
Instrument spring-batch (#1843)
* Instrument spring-batch: job & step

* Instrument spring-batch: job & step - code review comments

* Instrument spring-batch: job & step - code review comments

* Instrument spring-batch: job & step - code review comments

* spotless

* Apply suggestions from code review

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

* Instrument spring-batch: job & step - code review comments

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-12-16 13:27:23 +02:00
jason plumb 35005bd508
Update javadocs for generic types in HttpServerTracer (#1891) 2020-12-15 11:56:23 -08:00
Trask Stalnaker e2264222ce
HTTP client instrumentation cleanup, part 0 (#1893) 2020-12-14 16:34:06 -08:00
Trask Stalnaker 4cbfb361e1
Use Context more in DatabaseClientTracer (#1836) 2020-12-07 09:15:15 +02:00
Trask Stalnaker 65f54e450b
Use Context more in HttpClientTracer (#1811)
* Use Context more in HttpClientTracer

* Better http-url-connection response object

* Follow database semantic conv for elasticsearch-rest

* Remove unnecessary CallDepth tracking
2020-12-03 11:47:08 -08: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
Trask Stalnaker 0bd85d7b7f
Pass around context more instead of span (HttpServerTracer) (#1810) 2020-12-01 14:49:01 -08:00
Trask Stalnaker 41bd489a77
Format groovy files (#1793) 2020-11-28 21:22:14 -08:00
Trask Stalnaker b683c2ff05
Convert the last two decorators to tracers and delete BaseDecorator (#1785) 2020-11-28 10:50:41 -08:00
Trask Stalnaker a5a36bd203
Use namespace for attributes put into user classes (#1739)
* Use namespace for attributes put into user classes

* Add dependency to remove duplication
2020-11-24 12:07:10 -08:00
John Watson e9821e9cd1
Directly port the java-runtime-metrics module over from otel-java. (#1720)
* Directly port the java-runtime-metrics module over from otel-java.

* java 8 cleanups

* Make consistent with oshi module

* Bump mockito and assertj versions

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-11-21 10:51:03 -08:00
Anuraag Agrawal 7bfb6b6dbd
Update to SDK 0.11.0 (#1690) 2020-11-19 19:37:49 -08:00
Trask Stalnaker 2738018d9d
Remove typed spans (#1696) 2020-11-19 13:28:36 -08:00
Trask Stalnaker 2e51003900
Enable checkstyle overload method ordering rule for Google Java Style (#1656) 2020-11-17 14:41:14 -08:00
Trask Stalnaker 6d5ec329d6
Enable checkstyle for google style guide (#1641) 2020-11-16 18:46:59 -08:00
Mateusz Rzeszutek 1765839d01
Simplify JDBC span names (#1533) 2020-11-10 13:34:54 -08:00
Mateusz Rzeszutek 402a0a1639
Remove Instrumenter.Default (#1610) 2020-11-10 12:42:29 -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 d3b60a5e33
Rename TRACER to tracer() (#1540) 2020-11-02 20:49:51 -08: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
Anuraag Agrawal dfda406fee
Migrates to using a context when span is started (#1525)
* Return Context when starting span to preserve baggage.

Co-authored-by: Marcin Grzejszczak <marcin.grzejszczak@gmail.com>

* Use bridge

Co-authored-by: Marcin Grzejszczak <marcin.grzejszczak@gmail.com>
2020-10-29 13:50:54 +02:00
Mateusz Rzeszutek 35dc9071ef
Log normalised full statement in Redis instrumentations (#1441)
* Log normalised full statement in Redis instrumentations (jedis, lettuce, redisson)
2020-10-27 14:29:47 -07:00
Trask Stalnaker f046e598c6
Add context root to the front of the route in the span name (#1418)
* Add application root to span name

* Reduce duplicate context lookups

* Use servlet path as route

* Test against jetty instrumentation

* Add JAX-RS context path test

* Fix JAX-RS 1.0 span names
2020-10-27 14:21:10 -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
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
Vadim Shaigorodskiy a0ad3e31c8
Replace `net.*`, `rpc.*`, `enduser.*` with constants (#1459) 2020-10-23 09:55:06 -07:00
Vadim Shaigorodskiy 96eb67de6f
Replace `"messaging.operation"` with the constant (#1457) 2020-10-23 09:54:33 -07:00
Mateusz Rzeszutek f077b23c9f
Lettuce 5.1 instrumentation should log normalised commands as db.statement (#1405) 2020-10-20 14:57:23 -07:00
Trask Stalnaker 9e37231662
Remove MoreAttributes (#1417) 2020-10-19 14:38:26 +09: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 1b51d4a6b1
Rename packages (#1367) 2020-10-11 13:54:35 -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
Anuraag Agrawal 525b3f729d
Split out gRPC library instrumentation. (#1329)
* Split out gRPC library instrumentation.

* Simpler status
2020-10-07 17:57:28 +09: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
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
Nikita Salnikov-Tarnovski 88707c3bb0
Review DB semantic conventions (#1284) 2020-10-01 11:17:09 -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
Nikita Salnikov-Tarnovski 7b1b399a29
Convert more decorators to tracers (#1275)
* More decorators to tracers

* Convert more decorators to tracers

* Fixes
2020-09-29 09:41:09 +03:00
Mateusz Rzeszutek 9e591bb01a
Refactoring Config into @AutoValue POJO (#1254) 2020-09-28 22:08:45 -07:00
Trask Stalnaker b4837d5b41
Remove unused code (#1267) 2020-09-27 12:51:10 -07:00
Trask Stalnaker 8954f222c0
Update to the latest opentelemetry-java 0.9.0-SNAPSHOT (#1266) 2020-09-26 20:44:28 -07:00
Anuraag Agrawal fc47fd56e5
Add instrumentation of SQS. (#1210)
* Add instrumentation of SQS.

* More play

* Finish

* process instead of weird

* Cleanups

* Update instrumentation/aws-lambda-1.0/auto/src/main/java/io/opentelemetry/instrumentation/auto/awslambda/v1_0/AbstractAwsLambdaInstrumentation.java

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-24 11:53:46 +09:00
Nikita Salnikov-Tarnovski 85e2db8d35
Convert all remaining database client decorators to tracers (#1236)
* Geode tracer

* Memcache tracer

* Jedis tracer

* Rediscala tracer

* ElasticsearchTransport tracer

* ElasticsearchRest tracer

* Clean up HibernateDecorator

* Couchbase tracer

* Polish
2020-09-23 20:11:30 +03:00
Nikita Salnikov-Tarnovski b240cf95e7
Review semantic convention for RPC spans (#1219)
* Review gRPC semantic conventions

* Review RMI semantic conventions

* Muzzle fix

* Update compliance table

* Update compliance table
2020-09-20 12:13:47 +03:00
Mateusz Rzeszutek d89ce818ef
Implement MDC auto-instrumentation for log4j2 (#1200)
* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2 2.7

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j2

* Implement MDC auto-instrumentation for log4j1

* Implement MDC auto-instrumentation for log4j2
2020-09-18 17:53:43 +03:00
Nikita Salnikov-Tarnovski beb1901f5f
Review semantic convention for Http Client spans (#1214)
* Review semantic convention for Http Client spans

* Polish

* Update instrumentation/google-http-client-1.19/src/test/groovy/AbstractGoogleHttpClientTest.groovy

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

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2020-09-18 17:52:08 +03:00
Jakub Wach e8b54885c4
Enhance AWS DynamoDB instrumentation (#1191) 2020-09-18 10:48:56 +03:00
Nikita Salnikov-Tarnovski 7e41b516ee
Review semantic convention for Http Server spans (#1207)
* Review semantic convention for Http Server spans

* Polish
2020-09-16 09:52:11 +03:00
Anuraag Agrawal 4c54656f1e
Add configuration for error prone / nullaway to allow opting in packa… (#1203)
* Add configuration for error prone / nullaway to allow opting in package by package.

* Guava annotated too
2020-09-15 18:59:50 +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
Nikita Salnikov-Tarnovski 2b83c310da
More decorators translated to tracers (#1148) 2020-09-03 07:53:14 +03:00
Jakub Wach f033fd451a
mapping redis (jedis) connection net.peer properties (#1158) 2020-09-03 12:55:23 +09:00
Richard Startin 278672595b disable hystrix tags by default, enabled by system property (DataDog/dd-trace-java#1743) 2020-09-01 10:31:24 -07: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
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
Helen Y c4c4558b09
More refactoring (#1040) 2020-08-19 15:43:48 -07:00
Trask Stalnaker 5d2ae07797
Use startScope() on all HttpClientTracers (#971) 2020-08-18 16:59:30 -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
Helen Y bb235a0aa3
Update package name for tracers (#991) 2020-08-14 21:07:18 -07:00
Helen Y 888ebe17a2
Delete HttpClientDecorator (#967) 2020-08-14 13:10:56 -07:00
Trask Stalnaker f46ba88c29
Rename library-api artifact to instrumentation-api (#969) 2020-08-13 22:43:39 -07:00