Commit Graph

17 Commits

Author SHA1 Message Date
jack-berg aeac361816
Upgrade to otel java 1.19.0 (#6757)
Working PR to capture all the changes required to update to otel java
1.19.0. The new log API force allows
`:instrumentation-appender-api-internal` and
`:instrumentation-appender-sdk-internal`, but necessitates a decent
amount of refactoring as a result.

The PR points at the `1.19.0-SNAPSHOT`, which I'll update upon
publication.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-10-12 09:19:37 -07:00
Mateusz Rzeszutek 8b2b3281fe
Encapsulate logging (#6543)
* Encapsulate actual logging implementation better

* Apply suggestions from code review

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

* code review comments

* revert to the old slf4j package name

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-09-12 13:22:26 -07:00
Mateusz Rzeszutek 0d6f0b15d0
Update dependencies (#6499)
* Update dependencies

* Strictly pin slf4j and logback versions

* logback 1.3

* Only use slf4j 2.0.0 internally in the javaagent

* Pre-initialize slf4j provider

* Bump jackson version

* licenses
2022-09-06 13:04:30 -07:00
Mateusz Rzeszutek 08f013f9d6
Update gradle to 7.5.1 (#6359)
* Update gradle to 7.5

* Bump to 7.5.1

* gradle 7.5.1 with jdk17

* spotless

* one more --add-opens

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-08-12 12:03:43 +02:00
Mateusz Rzeszutek 7c760acea6
Move some classes out of `javaagent-instrumentation-api` (#5841)
* Move concurrent instrumentation utils out from javaagent-instrumentation-api

* Move AgentLogEmitterProvider, InstrumentedTaskClasses and OpenTelemetrySdkAccess out of javaagent-instrumentation-api
2022-04-15 12:09:28 -07:00
Mateusz Rzeszutek b668e73e13
Convert all logging statements from slf4j to jul (#5674)
* Convert all logging statements from slf4j to jul

* code review comments

* fix tests

* Fix randomly failing test
2022-03-25 10:02:51 -07:00
Anuraag Agrawal 14372adb68
Migrate Guava tests to Java (#5668)
* Migrate Guava tests to Java

* Update instrumentation/guava-10.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/guava/ListenableFutureTest.java

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

* Workaround inline mock issue

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2022-03-24 14:14:09 +09: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
Trask Stalnaker e9022da102
Remove unshaded javax.annotation classes from bootstrap class loader (#4454)
* Fix shading

* Revert "Fix shading"

This reverts commit 2aad3cfe21.

* Make javax.annotations compileOnly

* Replace checker GuardedBy with otel api internal GuardedBy

* Fix build

* Fix errorprone failures

* Remove extra newline

* Move internal GuardedBy to instrumentation-api

* empty commit

* empty commit
2021-10-21 14:47:50 -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
Trask Stalnaker 344e205720
Help out Intellij (#3595) 2021-07-16 15:55:30 +09:00
Mateusz Rzeszutek 9a3734f8ed
Clean up bootstrap dependencies and build scripts (#3570)
* Clean up bootstrap dependencies and build scripts

* add evaluationDependsOn()

* Resolve configuration later

* remove the javaagentLibs config

* Fix muzzle bootstrap classpath

* Fix after rebase

* Try javaagentLibs once again
2021-07-15 18:56:36 +02: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
Mateusz Rzeszutek c1b5c0884d
Move caffeine patching to instrumentation-api-caching (#3559) 2021-07-14 13:59:50 +02:00
Trask Stalnaker d0cb08a37b
Rename javaagent-api artifact to javaagent-instrumentation-api (#3513)
* part 1

* part 2

* Undo change in examples

* Spotless
2021-07-12 21:53:49 -07:00
Anuraag Agrawal 8eb24f9886
Split up build logic to plugins that can eventually be published and … (#3474)
* Split up build logic to plugins that can eventually be published and this-repo-specific stuff.

* Muzzle

* compileOnly

* Typo
2021-07-05 16:18:45 +09:00
Anuraag Agrawal c46761b8a9
Migrate javaagent-* to kotlin dsl (#3434) 2021-06-29 23:56:01 +09:00