Commit Graph

71 Commits

Author SHA1 Message Date
Trask Stalnaker 8d18e463ea
Add markdown link check (#5449)
* Add markdown link check

* Fix links

* update workflows

* move comment
2022-02-28 11:30:16 -08:00
Trask Stalnaker 3bee90a69b
Use BatchSpanProcessor (#5275) 2022-01-31 09:14:03 -08:00
Trask Stalnaker d8a392210a
Remove unnecessary destroyMethod (#5179) 2022-01-20 11:39:34 +02:00
Christian Frommeyer d017d5f18a
SdkTracerProvider auto closed as separate Context Bean (#5124) (#5125) 2022-01-19 20:48:49 -08:00
Anuraag Agrawal 52394a2ff9
Remove deprecated tracer API (#5175)
* Remove deprecated tracer API

* Groovy too
2022-01-19 09:52:51 -08:00
Nikita Salnikov-Tarnovski 25550e0a63
Stop using deprecated constructor (#5040)
* Stop using deprecated constructor

* Try to fix the build
2022-01-07 11:47:54 -08:00
Trask Stalnaker ea7588cd15
Update references to master branch (#4706) 2021-11-24 13:11:21 -08:00
Nikita Salnikov-Tarnovski 821a4b870b
Drop instrumentation-api-caching module and move weak cache implementation to instrumentation-api (#4667)
* Drop instrumentation-api-caching module and move weak cache implementation to instrumentation-api

* Some test fixes

* Some cleanup

* Temporary workaround for using weak values in FutureListenerWrappers

* Spotless

* Update ClassNames and SpanNames

* Compilation and comment

* Add bounded cache and clean interface

* Polish

* Add comment

* Vendor ConcurrentLinkedHashMap in

* Let errorprone ignore vendored CLHM for now

* Keep license in java files too

* Convert Netty wrapper cache to VirtualField

* Work around lambda instrumentation failure

Ideally we would ignore instrumenting helper classes...

* Revert "Work around lambda instrumentation failure"

This reverts commit 6d63815b44.

* Revert "Convert Netty wrapper cache to VirtualField"

This reverts commit dac1522a3f.

* Handle cleared weak values

* Fix comment

* Delete instrumentation-api-caching

* Copy in weak-lock-free

* Remove caffeine remnants

* Fix checkstyle

* Rename BoundedCache to MapBackedCached

* Remove duplicate LICENSE

* Remove outdated comment

* Sync with SDK copy of weaklockfree

* Enable checkstyle:off comment

* Re-generate license report

* Move NOTICE file to package-info.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-11-24 09:05:12 -08:00
Anuraag Agrawal bcae1b11d3
Remove gRPC dependency for export (#4674) 2021-11-19 11:21:34 -08:00
Mateusz Rzeszutek 270c4b4e12
Migrate Spring Webflux HTTP client instrumentation to Instrumenter API (#4517)
* Migrate Spring Webflux HTTP client instrumentation to Instrumenter API

* Update instrumentation/spring/spring-webflux-5.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/client/SpringWebfluxHttpAttributesExtractor.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-27 12:52:02 -07:00
Martin d314d76fce
rename `newBuilder()` to `builder()` (#4475)
* rename `newBuilder()` to `builder()`

* rename `newBuilder()` to `builder()`
2021-10-22 20:50:43 -07:00
Martin ac91dc090a
Type annotation placement (#4406)
* switch annotation `org.checkerframework.checker.nullness.qual.Nullable` to `javax.annotation.Nullable`

* code format
2021-10-17 17:38:43 -07:00
Mateusz Rzeszutek 07ca690f8e
Convert Spring Web MVC library instrumentation to Instrumenter API (#4258)
* Convert Spring Web MVC library instrumentation to Instrumenter API

* Apply suggestions from code review

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>

* improve the README a bit

* StatusCodeExtractor

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2021-10-02 11:41:27 -07:00
HyunGook-Kim cf85fbb275
chore typo in gradle implementation package name (#4250)
change ```opentelemetry-exporters``` to ```opentelemetry-exporter```
2021-09-30 10:34:50 +09:00
Christian Frommeyer ae7ad4b7e8
Fix spring context reload issue (open-telemetry#3841) (#4051)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-24 15:59:48 +03:00
Lauri Tulmin de6c9087fc
Remove reference to bintray in spring doc (#4139) 2021-09-16 10:18:20 -07:00
Trask Stalnaker c13eb7932e
Update collector port (#4071) 2021-09-08 18:18:05 -07:00
HaloFour b52fd39d8d
Port Spring Boot WithSpanAspect to Instrumenter API (#3607)
* Start porting WithSpanAspect to use Instrumenter API

* Some cleanup and refactoring

* Switch caching dependency to compile only

* Minor refactors, javadocs

* Fix instrumentation name

* Rename builder methods

* spotless

* Add request type to extract Method and WithSpan annotation, use method references

* Add comment about IntelliJ dependency workaround

* Make cache non-configurable, use AsyncOperationEndSupport directly

* Address PR comments

* Move to static factory method, method-keyed cache
2021-07-30 11:39:09 -07:00
Mateusz Rzeszutek cbd8bb29fd
Spring web instrumenter 2 (#3731)
* Refactor spring-web library instrumentation to Instrumenter API

* errorprone

* fix typo
2021-07-30 09:28:27 -07:00
Trask Stalnaker e2d23cd8c1
Fix bounds check (#3612)
* Fix bounds check

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

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

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2021-07-20 09:29:45 +09:00
Trask Stalnaker 344e205720
Help out Intellij (#3595) 2021-07-16 15:55:30 +09:00
HaloFour 814239c8c0
Adds binding of attributes in methods annotated with @WithSpan (#3188)
* Add binding of span attributes for traced methods

* Spring Aspect support, memoization

* Test with attribute name from ParameterNameDiscoverer

* Refactorings, javadocs and tests

* Refactor out creating AttributeBinding to separate class

* Wrapped attribute bindings for array parameters

* Attribute binding for List and EnumSet

* Attribute binding for subclass of List with reflection helper class

* Fix test failures in JDK 8

* Attribute binding to Set<? extends Enum>

* Move attribute binding to instrumentation-annotation-support project

* Fix copypastaed missing imports in tests

* Simplify ParameterizedClass based on PR feedback and add javadocs

* Remove blank javadoc

* Switch to cache with weak keys for memoizing attribute bindings by method

* Remove binding support for EnumSet<?>

* Clean up javadoc

* Use SpanAttribute annotation from opentelemetry 1.4.0-SNAPSHOT

* Address some PR concerns

* Clean up

* Fix instrumentation dependency in Springboot

* Update documentation

* Switch javaagent dep to compileOnly per PR comment

* spotless

* Kick CI

* Rename annotation support module and packages

* Resolve SpanAttribute annotation at runtime with fallback for older OTel versions

* Remove unnecessary dependency

* Move reflection helper to annotation support module

* Remove unnecessary enum and fields from unit test
2021-07-14 13:32:07 -07:00
Anna Nosek e46ae82e94
Springboot propagators (#3506)
* set propagators in sdk builder

* add test for propagators

* introduce CompositeTextMapPropagator

* simplify composite TextMapPropagator creation, use SDK names for PropagationType

* Update instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/propagators/PropagationAutoConfiguration.java

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

* Update instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/propagators/PropagationAutoConfigurationTest.java

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

* replace enum with string, remove unnecessary noop propagator addition

* add warning and test for unsupported value

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-07-12 21:40:09 -07:00
Anuraag Agrawal f601863d12
Merge Java TraceUtils into extension and switch to Instrumenter API. (#3532)
* Merge Java TraceUtils into extension and switch to Instrumenter API.

* Woah
2021-07-10 13:21:12 +09: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 a818f14957
Migrate publish.gradle to convention plugin (#3312)
* Migrate publish.gradle to convention plugin

* Migrate usages of publish.gradle

* Remove publish.gradle

* Newline
2021-06-15 22:12:48 +09: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 9f31a057b6
Refactor span names class (#3281)
* spanNameForMethod

* spanNameForClass

* Cache simple name using ClassValue
2021-06-14 11:56:40 -07:00
Trask Stalnaker 62f1f49bcd
Intellij cleanup (Java and Groovy) (#3285)
* Intellij cleanup

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/code/CodeAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/DbAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/db/SqlAttributesExtractorTest.java

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

* Update instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesExtractorTest.java

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

* Update instrumentation/spring/spring-web-3.1/library/src/test/java/io/opentelemetry/instrumentation/spring/httpclients/RestTemplateInterceptorTest.java

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

* Use glassfish version that supports lambdas

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-06-14 10:23:01 -07:00
Trask Stalnaker f1beb2397f
Intellij cleanup of markdown and yaml (#3284)
* Intellij cleanup of markdown and yaml

* Revert required yaml param
2021-06-14 13:13:01 +03:00
HaloFour 7ef31a0169
Inject ObjectProvider into BeanPostProcessors to avoid premature initialization of OpenTelemetry (#3171) 2021-06-03 14:14:17 -07: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
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
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
Trask Stalnaker 5719bc30a6
Sync spring-boot-autoconfigure property names with SDK property names (#2770)
* Sync spring-boot-autoconfigure property names

* Change from otel.instrumentation to otel.springboot

* Remove duplicate/outdated doc
2021-04-12 13:21:40 +03:00
Trask Stalnaker b39348d640
Add -Werror flag to the build (#2712)
* Add -Werror to the build

* Add to javadoc also

* Run javadoc

* Change from "check javadoc" to "build"

* Fix javadoc warnings
2021-04-06 10:01:10 +03:00
Trask Stalnaker b062e38117
Pass OpenTelemetry instance to WebFlux lib tracer (#2730) 2021-04-06 08:52:27 +03:00
HaloFour b0d27405eb
Add asynchronous tracing to Spring Boot Autoconfigure WithSpanAspect (#2618) 2021-03-29 16:35:08 -07:00
Mateusz Rzeszutek 3dff44874f
Fix RestTemplateInterceptor so that it calls endExceptionally() on exception (#2516) 2021-03-08 09:36:47 -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
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
Lauri Tulmin c8ca7e8d07
Make http.flavor spec compliant (#2370) 2021-02-22 13:12:05 -08: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
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
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
John Watson df801dc2c3
Clean up some spring-boot auto-configuration to get rid of deprecations (#2115) 2021-01-25 22:00:54 -08: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 640a7d624b
Correct some spelling mistakes (#2025) 2021-01-12 11:10:45 -08:00