Commit Graph

813 Commits

Author SHA1 Message Date
Jakub Wach e013c381f2
AWS SDK - S3 to SQS propagation test (#2518)
* AWS SDK - S3 to SQS propagation test

* code review changes - got rid of thread.sleep
2021-03-09 18:47:06 +02: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
Lauri Tulmin 1dd1bf2267
Exclude bad couchbase versions from muzzle (#2534) 2021-03-09 20:35:45 +09:00
Lauri Tulmin 7013376030
Add support for Grails (#2512)
* Add support for Grails

* exclude bad version from muzzle

* Review fixes

* review fixes

* rebase

* Trigger Build
2021-03-09 08:56:33 +02:00
Anuraag Agrawal 0dde62b498
Load couchbase otel instrumentation for 3.1 (#2524)
* Load couchbase otel instrumentation for 3.1

* Drift
2021-03-09 09:44:28 +09: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 eff96a2fb3
Use reflection to get request metadata instead of instrumentation. (#2508) 2021-03-08 15:20:38 +09: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
Lauri Tulmin 7df5579768
Add support for elasticsearch7 (#2514)
* Add support for elasticsearch7

* Fix formatting
2021-03-07 13:10:21 +02:00
Anuraag Agrawal 96606711ac
Only set aws header attribute name once. (#2509) 2021-03-05 11:00:07 -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 7111cb793e
Fix GrpcTracing method return types to not expose private classes. (#2510)
* Fix GrpcTracing method return types to not expose private classes.

* javadoc too
2021-03-05 19:07:43 +09:00
Mateusz Rzeszutek ce39c55c0f
Remove tracer name configuration from spring-boot-autoconfigure (#2478)
* Remove tracer name configuration from spring-boot-autoconfigure

* Use OpenTelemetry wherever it makes sense
* Refactor @WithSpan advice since it made no sense before
* Rename @EnableOpenTelemetryTracing to @EnableOpenTelemetry (it won't be just tracing in the future)
* And add a getOpenTelemetry() method to InstrumentationExtension & InstrumentationSpecification

* Update instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/aspects/WithSpanAspectTracer.java

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

* Code review comments

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-03-05 10:50:14 +01:00
Anuraag Agrawal 264e03f6ea
Fix spring-ws test post-merge (#2503) 2021-03-04 18:38:28 -08:00
Anuraag Agrawal 41fec5f610
Extract okhttp3 library instrumentation. (#2489)
* Extract okhttp3 library instrumentation.

* bad spotless
2021-03-05 09:35:35 +09:00
Jakub Wach 9a5bc66329
AWS SDK - SNS to SQS tracing propagation test (#2483) 2021-03-04 13:33:22 -08:00
Lauri Tulmin 29790d8472
Low cardinality name for servlet span (#2417) 2021-03-04 12:39:37 -08:00
Lauri Tulmin 9c55d36efd
Use ClassValue instead of WeakMap to cache span name (#2491) 2021-03-04 12:38:46 -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
Anuraag Agrawal 7efa58d6f0
Use correct value for operation in aws-sdk v1 (#2488) 2021-03-04 19:32:42 +09:00
Anuraag Agrawal 926a1fb621
Migrate AWS SDK v2 to new library API pattern. (#2487) 2021-03-04 19:32:13 +09:00
Mateusz Rzeszutek 8242a01b3a
Clean up and document BaseTracer (#2482) 2021-03-04 11:21:46 +01:00
Anuraag Agrawal e5c712e286
Refactor gRPC library instrumentation to expose minimal API. (#2474) 2021-03-04 14:48:50 +09:00
Trask Stalnaker 47ee860e96
Hide non-specd attributes for aws-sdk-2.2 (#2434) 2021-03-03 20:49:45 -08: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 dc769e3702
Expose only minimal entrypoint for Armeria library instrumentation. (#2463) 2021-03-02 10:39:23 -08: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
Anuraag Agrawal 12baba1adc
Use dynamic resolution of SQS to allow working without it. (#2421) 2021-03-02 10:30:02 -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
Lauri Tulmin de7fdfd8a4
Fix kubernetes client latest deps tests (#2465) 2021-03-02 17:34:37 +02: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
Trask Stalnaker 62f2611486
Update instrumentation names (#2433) 2021-03-01 19:34:25 -08:00
Trask Stalnaker 5c1a432c54
Update old name (#2440) 2021-03-01 15:43:49 -08:00
Mateusz Rzeszutek 163062d13e
Remove deprecated end() & endExceptionally() methods from BaseTracer (#2424) 2021-03-01 18:14:30 +01:00
Mateusz Rzeszutek d8e630a0a8
Rewrite kubernetes-client instrumentation so that it works (#2416)
* Rewrite kubernetes-client instrumentation so that it works

(and add tests)

* spotless

* Make Kubernetes propagation work

* spotless
2021-03-01 17:44:31 +02:00
Lauri Tulmin e39b0b44c9
Fix flaky tomcat access log tests (#2448) 2021-03-01 17:41:44 +02:00
Lauri Tulmin 5a2bd5f15a
Disable server ping (#2450) 2021-03-01 15:43:25 +02:00
Trask Stalnaker 475830789c
Update to otel-java 1.0.0 (#2431)
* Update to otel-java 1.0.0

* Fix test

* Fix another test

* Fix another test

* Fix hibernate tests

* Fix spring-data tests

* Spotless
2021-02-28 11:15:27 -08:00
Mateusz Rzeszutek 5317b7e7f1
Enrich JDBC spans with db.operation and db.sql.table (#2425) 2021-02-27 12:44:20 +02:00
Trask Stalnaker 03bfaee5eb
Move rest of non-specd attributes to experimental (#2402) 2021-02-26 20:50:47 -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 605485b998
Remove some deprecated BaseTracer#end(Span) usages (part 2) (#2418) 2021-02-26 14:09:32 +02:00
Anuraag Agrawal 0f32ed42a4
Instrument log4j to include bugfix of contextdataprovider mechanism. (#2407)
* Instrument log4j to include bugfix of contextdataprovider mechanism.

* Add regression test

* Update smoke test

* Update instrumentation/log4j/log4j-2.13.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_13_2/BugFixingInstrumentation.java

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

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-02-26 09:20:55 +09:00
Mateusz Rzeszutek 68cde08177
Fix netty 4.1 test after adding @Unroll on the base class (#2412) 2021-02-25 15:01:55 +01:00
Mateusz Rzeszutek 0949b7feee
Fix tests that verify experimental span attributes (#2415)
Some of the modules that add experimental span attributes didn't have the flag turned on for tests, which caused them to fail.
2021-02-25 15:01:39 +01:00
Mateusz Rzeszutek e87cf37f63
Remove some deprecated BaseTracer#end(Span) usages (part 1) (#2401) 2021-02-25 11:35:37 +01:00