Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop instrumentation-api-caching module and move weak cache implementation to instrumentation-api #4667

Merged
merged 33 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
99b42e1
Drop instrumentation-api-caching module and move weak cache implement…
iNikem Nov 18, 2021
f08d4f5
Some test fixes
iNikem Nov 18, 2021
e651e80
Some cleanup
iNikem Nov 19, 2021
c63d3fe
Temporary workaround for using weak values in FutureListenerWrappers
iNikem Nov 19, 2021
f61ea3a
Merge remote-tracking branch 'upstream/main' into remove-cache-from-api
trask Nov 21, 2021
830e1d2
Spotless
trask Nov 21, 2021
4abddb3
Update ClassNames and SpanNames
trask Nov 21, 2021
7bdf3e0
Compilation and comment
trask Nov 21, 2021
cde78fb
Add bounded cache and clean interface
iNikem Nov 21, 2021
437da21
Polish
iNikem Nov 21, 2021
fdc64bb
Add comment
trask Nov 21, 2021
f7385d4
Vendor ConcurrentLinkedHashMap in
iNikem Nov 22, 2021
5e595e0
Let errorprone ignore vendored CLHM for now
iNikem Nov 22, 2021
0e04a04
Merge remote-tracking branch 'upstream/main' into remove-cache-from-api
trask Nov 22, 2021
257a6ec
Keep license in java files too
trask Nov 22, 2021
2f57a21
Merge remote-tracking branch 'upstream/main' into remove-cache-from-api
trask Nov 23, 2021
dac1522
Convert Netty wrapper cache to VirtualField
trask Nov 23, 2021
6d63815
Work around lambda instrumentation failure
trask Nov 24, 2021
7448cde
Revert "Work around lambda instrumentation failure"
trask Nov 24, 2021
fad0967
Revert "Convert Netty wrapper cache to VirtualField"
trask Nov 24, 2021
9ab70f4
Handle cleared weak values
trask Nov 23, 2021
3f36678
Fix comment
trask Nov 24, 2021
6ebb98b
Delete instrumentation-api-caching
trask Nov 24, 2021
37569ca
Copy in weak-lock-free
trask Nov 24, 2021
fe8ff0b
Remove caffeine remnants
trask Nov 24, 2021
d4d02da
Fix checkstyle
trask Nov 24, 2021
55f8292
Rename BoundedCache to MapBackedCached
trask Nov 24, 2021
ce93d40
Remove duplicate LICENSE
trask Nov 24, 2021
03824a4
Remove outdated comment
trask Nov 24, 2021
a8805fb
Sync with SDK copy of weaklockfree
trask Nov 24, 2021
7ad1a12
Enable checkstyle:off comment
trask Nov 24, 2021
7ae3ab2
Re-generate license report
trask Nov 24, 2021
11bee8a
Move NOTICE file to package-info.java
trask Nov 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
jmh(project(":javaagent-tooling"))
jmh(project(":javaagent-extension-api"))

jmh("com.github.ben-manes.caffeine:caffeine:$caffeine2Version")
jmh("com.github.ben-manes.caffeine:caffeine:2.9.2")

jmh("javax.servlet:javax.servlet-api:4.0.1")
jmh("com.google.http-client:google-http-client:1.19.0")
Expand Down
2 changes: 2 additions & 0 deletions buildscripts/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@
</module>
<!-- this enables @SuppressWarnings("checkstyle:...") annotations -->
<module name="SuppressWarningsHolder"/>
<!-- this enables CHECKSTYLE:OFF and CHECKSTYLE:ON comments -->
<module name="SuppressionCommentFilter"/>
</module>
<!-- this enables @SuppressWarnings("checkstyle:...") annotations -->
<module name="SuppressWarningsFilter"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ tasks.withType<ShadowJar>().configureEach {
mergeServiceFiles()

exclude("**/module-info.class")
exclude("META-INF/jandex.idx") // from caffeine

// Prevents conflict with other SLF4J instances. Important for premain.
relocate("org.slf4j", "io.opentelemetry.javaagent.slf4j")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks {
disableWarningsInGeneratedCode.set(true)
allDisabledChecksAsWarnings.set(true)

excludedPaths.set(".*/build/generated/.*")
excludedPaths.set(".*/build/generated/.*|.*/concurrentlinkedhashmap/.*")

if (System.getenv("CI") == null) {
disable("SystemOut")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ dependencies {
compileOnly("io.opentelemetry:opentelemetry-api")
compileOnly(project(":instrumentation-api"))
compileOnly(project(":javaagent-instrumentation-api"))

// this only exists to make Intellij happy since it doesn't (currently at least) understand our
// inclusion of this artifact inside of :instrumentation-api
compileOnly(project(":instrumentation-api-caching"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,4 @@ plugins {

extra["mavenGroupId"] = "io.opentelemetry.javaagent.instrumentation"

base.archivesName.set(projectDir.parentFile.name)

dependencies {
// this only exists to make Intellij happy since it doesn't (currently at least) understand our
// inclusion of this artifact inside of :instrumentation-api
compileOnly(project(":instrumentation-api-caching"))
}
base.archivesName.set(projectDir.parentFile.name)
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,4 @@ plugins {

extra["mavenGroupId"] = "io.opentelemetry.instrumentation"

base.archivesName.set(projectDir.parentFile.name)

dependencies {
// this only exists to make Intellij happy since it doesn't (currently at least) understand our
// inclusion of this artifact inside of :instrumentation-api
compileOnly(project(":instrumentation-api-caching"))
}
base.archivesName.set(projectDir.parentFile.name)
4 changes: 0 additions & 4 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ rootProject.extra["otelVersion"] = otelVersion
// Need both BOM and -all
val groovyVersion = "2.5.14"

rootProject.extra["caffeine2Version"] = "2.9.2"
rootProject.extra["caffeine3Version"] = "3.0.4"

// We don't force libraries we instrument to new versions since we compile and test against specific
// old baseline versions
// but we do try to force those libraries' transitive dependencies to new versions where possible
Expand Down Expand Up @@ -87,7 +84,6 @@ val DEPENDENCY_SETS = listOf(

val DEPENDENCIES = listOf(
"ch.qos.logback:logback-classic:1.2.3",
"com.blogspot.mydailyjava:weak-lock-free:0.18",
"com.github.stefanbirkner:system-lambda:1.2.0",
"com.github.stefanbirkner:system-rules:1.19.0",
"com.google.auto.service:auto-service:1.0",
Expand Down
5 changes: 0 additions & 5 deletions instrumentation-api-annotation-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ group = "io.opentelemetry.instrumentation"
dependencies {
implementation(project(":instrumentation-api"))

// this only exists to make Intellij happy since it doesn't (currently at least) understand our
// inclusion of this artifact inside of :instrumentation-api
compileOnly(project(":instrumentation-api-caching"))
testCompileOnly(project(":instrumentation-api-caching"))

api("io.opentelemetry:opentelemetry-api")
api("io.opentelemetry:opentelemetry-semconv")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package io.opentelemetry.instrumentation.api.annotation.support;

import io.opentelemetry.instrumentation.api.caching.Cache;
import io.opentelemetry.instrumentation.api.cache.Cache;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package io.opentelemetry.instrumentation.api.annotation.support;

import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.instrumentation.api.caching.Cache;
import io.opentelemetry.instrumentation.api.cache.Cache;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import io.opentelemetry.instrumentation.api.tracer.AttributeSetter;
import java.lang.reflect.Method;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package io.opentelemetry.instrumentation.api.annotation.support

import io.opentelemetry.api.common.AttributesBuilder
import io.opentelemetry.instrumentation.api.caching.Cache
import io.opentelemetry.instrumentation.api.cache.Cache
import spock.lang.Specification

import java.lang.reflect.Method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

import io.opentelemetry.instrumentation.api.caching.Cache;
import io.opentelemetry.instrumentation.api.cache.Cache;
import java.lang.reflect.Method;
import java.util.function.Function;
import org.junit.jupiter.api.Test;
Expand Down
44 changes: 0 additions & 44 deletions instrumentation-api-caching/build.gradle.kts

This file was deleted.

58 changes: 0 additions & 58 deletions instrumentation-api-caching/caffeine2/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

41 changes: 0 additions & 41 deletions instrumentation-api-caching/caffeine3/build.gradle.kts

This file was deleted.

Loading