Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// fails on them, which blocks unrelated patch updates
matchDepNames: [
'org.jetbrains.kotlin.jvm',
'org.jetbrains.kotlin:kotlin-gradle-plugin',
],
schedule: [
'* 0-7 * * 2', // weekly, before 8am on Tuesday
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repositories {
}

dependencies {
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.2.3")
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.3.0")
implementation(enforcedPlatform("com.squareup.wire:wire-bom:6.4.0"))
implementation("com.google.auto.value:auto-value-annotations:1.11.1")
// When updating, update above in plugins too
Expand All @@ -47,7 +47,7 @@ dependencies {
implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.6")
implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.3")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:5.1.0")
implementation("net.ltgt.gradle:gradle-nullaway-plugin:3.0.0")
implementation("net.ltgt.gradle:gradle-nullaway-plugin:3.1.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.21")
implementation("org.sonatype.gradle.plugins:scan-gradle-plugin:3.1.5")
implementation("ru.vyarus:gradle-animalsniffer-plugin:2.0.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

jacoco {
toolVersion = "0.8.14"
toolVersion = "0.8.15"
}

// https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ java {

checkstyle {
configDirectory.set(file("$rootDir/buildscripts/"))
toolVersion = "13.4.2"
toolVersion = "13.5.0"
isIgnoreFailures = false
configProperties["rootDir"] = rootDir
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ContextStorageOverride extends Context.Storage {
private static final ContextKey<Context> GRPC_CONTEXT = ContextKey.named("grpc-context");
private static final Context.Key<Scope> OTEL_SCOPE = Context.key("otel-scope");

@SuppressWarnings("MustBeClosedChecker")
@SuppressWarnings({"MustBeClosedChecker", "ReferenceEquality"})
@Override
public Context doAttach(Context toAttach) {
io.opentelemetry.context.Context otelContext = io.opentelemetry.context.Context.current();
Expand All @@ -39,6 +39,7 @@ public Context doAttach(Context toAttach) {
}

@Override
@SuppressWarnings("ReferenceEquality")
public void detach(Context toDetach, Context toRestore) {
if (current() != toDetach) {
// Log a severe message instead of throwing an exception as the context to attach is assumed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private ArrayBasedContext(Object[] entries) {

@Override
@Nullable
@SuppressWarnings("ReferenceEquality")
public <V> V get(ContextKey<V> key) {
for (int i = 0; i < entries.length; i += 2) {
if (entries[i] == key) {
Expand All @@ -65,6 +66,7 @@ public <V> V get(ContextKey<V> key) {
}

@Override
@SuppressWarnings("ReferenceEquality")
public <V> Context with(ContextKey<V> key, V value) {
for (int i = 0; i < entries.length; i += 2) {
if (entries[i] == key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum ThreadLocalContextStorage implements ContextStorage {
private static final ThreadLocal<Context> THREAD_LOCAL_STORAGE = new ThreadLocal<>();

@Override
@SuppressWarnings("ReferenceEquality")
public Scope attach(Context toAttach) {
if (toAttach == null) {
// Null context not allowed so ignore it.
Expand Down Expand Up @@ -44,6 +45,7 @@ private ScopeImpl(@Nullable Context beforeAttach, Context toAttach) {
}

@Override
@SuppressWarnings("ReferenceEquality")
public void close() {
if (!closed && current() == toAttach) {
closed = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private static class BraveContextValues {
this.values = values;
}

@SuppressWarnings("ReferenceEquality")
Object getValue(Object key) {
for (int i = 0; i < values.length; i += 2) {
if (values[i] == key) {
Expand All @@ -72,6 +73,7 @@ Object getValue(Object key) {
return null;
}

@SuppressWarnings("ReferenceEquality")
BraveContextValues with(Object key, Object value) {
Object[] copy;
for (int i = 0; i < values.length; i += 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ static final class BraveContextWrapper implements Context {
this.delegate = delegate;
}

@SuppressWarnings("ReferenceEquality")
TraceContext toBraveContext() {
if (fromBraveContext(baseBraveContext) == delegate) {
return baseBraveContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ private enum GrpcContextStorage implements ContextStorage {
INSTANCE;

@Override
@SuppressWarnings("ReferenceEquality")
public Scope attach(Context toAttach) {
io.grpc.Context grpcContext = io.grpc.Context.current();
Context current = OTEL_CONTEXT.get(grpcContext);
Expand Down Expand Up @@ -71,6 +72,7 @@ private static GrpcContextWrapper wrapperFromGrpc(io.grpc.Context grpcContext) {
return new GrpcContextWrapper(grpcContext, OTEL_CONTEXT.get(grpcContext));
}

@SuppressWarnings("ReferenceEquality")
private io.grpc.Context toGrpcContext() {
if (OTEL_CONTEXT.get(baseGrpcContext) == context) {
// No changes to the wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class OtelPrivateConstructorForUtilityClass extends BugChecker
@Override
public Description matchClass(ClassTree tree, VisitorState state) {
Description description = delegate.matchClass(tree, state);
if (description == NO_MATCH) {
if (description.equals(NO_MATCH)) {
return description;
}
return describeMatch(tree);
Expand Down
16 changes: 8 additions & 8 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ rootProject.extra["versions"] = dependencyVersions


val autoValueVersion = "1.11.1"
val errorProneVersion = "2.49.0"
val errorProneVersion = "2.50.0"
val jmhVersion = "1.37"
// Mockito 5.x.x requires Java 11 https://github.com/mockito/mockito/releases/tag/v5.0.0
val mockitoVersion = "4.11.0"
val slf4jVersion = "2.0.18"
val opencensusVersion = "0.31.1"
val prometheusServerVersion = "1.5.1"
val armeriaVersion = "1.39.0"
val armeriaVersion = "1.39.1"
val junitVersion = "5.14.4"
val junitPlatformVersion = "1.14.4"
val okhttpVersion = "5.3.2"
val okhttpVersion = "5.4.0"

val DEPENDENCY_BOMS = listOf(
// for some reason boms show up as runtime dependencies in license and vulnerability scans
// even if they are only used by test dependencies, so not using junit bom here
// (which is EPL licensed) or armeria bom (which is Apache licensed but is getting flagged
// by FOSSA for containing EPL-licensed)

"com.fasterxml.jackson:jackson-bom:2.21.3",
"com.fasterxml.jackson:jackson-bom:2.22.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something weird is going on with this release:

🤷 better let the dust settle

"com.google.guava:guava-bom:33.6.0-jre",
"com.google.protobuf:protobuf-bom:4.35.0",
"com.squareup.okhttp3:okhttp-bom:$okhttpVersion",
"com.squareup.okio:okio-bom:3.17.0", // applies to transitive dependencies of okhttp
"io.grpc:grpc-bom:1.81.0",
"io.netty:netty-bom:4.2.14.Final",
"io.grpc:grpc-bom:1.82.0",
"io.netty:netty-bom:4.2.15.Final",
"io.zipkin.brave:brave-bom:6.3.1",
"io.zipkin.reporter2:zipkin-reporter-bom:3.5.3",
"org.assertj:assertj-bom:3.27.7",
Expand Down Expand Up @@ -74,13 +74,13 @@ val DEPENDENCIES = listOf(
"io.prometheus:prometheus-metrics-exposition-formats-no-protobuf:${prometheusServerVersion}",
"javax.annotation:javax.annotation-api:1.3.2",
"com.github.stefanbirkner:system-rules:1.19.0",
"com.google.api.grpc:proto-google-common-protos:2.71.0",
"com.google.api.grpc:proto-google-common-protos:2.72.0",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.guava:guava-beta-checker:1.0",
"com.sun.net.httpserver:http:20070405",
"com.squareup.okhttp3:okhttp:$okhttpVersion",
"com.tngtech.archunit:archunit-junit5:1.4.2",
"com.uber.nullaway:nullaway:0.13.4",
"com.uber.nullaway:nullaway:0.13.6",
"edu.berkeley.cs.jqf:jqf-fuzz:1.7", // jqf-fuzz version 1.8+ requires Java 11+
"eu.rekawek.toxiproxy:toxiproxy-java:2.1.11",
"io.github.crac:org-crac:0.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public CompletableResultCode flush() {
}
}

@SuppressWarnings("SystemOut")
@SuppressWarnings({"SystemOut", "ReferenceEquality"})
@Override
public CompletableResultCode close() {
if (outputStream == System.out || outputStream == System.err) {
Expand All @@ -81,7 +81,7 @@ public String toString() {
return "StreamJsonWriter{" + "outputStream=" + getName(outputStream) + '}';
}

@SuppressWarnings("SystemOut")
@SuppressWarnings({"SystemOut", "ReferenceEquality"})
private static String getName(OutputStream outputStream) {
if (outputStream == System.out) {
return "stdout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ private ExemplarMarshaler(
}

@Override
@SuppressWarnings("ReferenceEquality")
public void writeTo(Serializer output) throws IOException {
output.serializeFixed64(Exemplar.TIME_UNIX_NANO, timeUnixNano);
if (valueField == Exemplar.AS_INT) {
Expand All @@ -80,6 +81,7 @@ public void writeTo(Serializer output) throws IOException {
output.serializeRepeatedMessage(Exemplar.FILTERED_ATTRIBUTES, filteredAttributeMarshalers);
}

@SuppressWarnings("ReferenceEquality")
private static int calculateSize(
long timeUnixNano,
ProtoFieldInfo valueField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final class ExemplarStatelessMarshaler implements StatelessMarshaler<ExemplarDat
private ExemplarStatelessMarshaler() {}

@Override
@SuppressWarnings("ReferenceEquality")
public void writeTo(Serializer output, ExemplarData exemplar, MarshalerContext context)
throws IOException {
output.serializeFixed64(Exemplar.TIME_UNIX_NANO, exemplar.getEpochNanos());
Expand All @@ -50,6 +51,7 @@ public void writeTo(Serializer output, ExemplarData exemplar, MarshalerContext c
}

@Override
@SuppressWarnings("ReferenceEquality")
public int getBinarySerializedSize(ExemplarData exemplar, MarshalerContext context) {
int size = 0;
size += MarshalerUtil.sizeFixed64(Exemplar.TIME_UNIX_NANO, exemplar.getEpochNanos());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private NumberDataPointMarshaler(
}

@Override
@SuppressWarnings("ReferenceEquality")
public void writeTo(Serializer output) throws IOException {
output.serializeFixed64(NumberDataPoint.START_TIME_UNIX_NANO, startTimeUnixNano);
output.serializeFixed64(NumberDataPoint.TIME_UNIX_NANO, timeUnixNano);
Expand All @@ -80,6 +81,7 @@ public void writeTo(Serializer output) throws IOException {
output.serializeRepeatedMessage(NumberDataPoint.ATTRIBUTES, attributes);
}

@SuppressWarnings("ReferenceEquality")
private static int calculateSize(
long startTimeUnixNano,
long timeUnixNano,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final class NumberDataPointStatelessMarshaler implements StatelessMarshaler<Poin
private NumberDataPointStatelessMarshaler() {}

@Override
@SuppressWarnings("ReferenceEquality")
public void writeTo(Serializer output, PointData point, MarshalerContext context)
throws IOException {
output.serializeFixed64(NumberDataPoint.START_TIME_UNIX_NANO, point.getStartEpochNanos());
Expand All @@ -50,6 +51,7 @@ public void writeTo(Serializer output, PointData point, MarshalerContext context
}

@Override
@SuppressWarnings("ReferenceEquality")
public int getBinarySerializedSize(PointData point, MarshalerContext context) {
int size = 0;
size +=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public final class ProfilesRequestMarshaler extends MarshalerWithSize {
* Returns a {@link ProfilesRequestMarshaler} that can be used to convert the provided {@link
* ProfileData} into a serialized OTLP ExportProfilesServiceRequest.
*/
@SuppressWarnings("ReferenceEquality")
public static ProfilesRequestMarshaler create(Collection<ProfileData> profileList) {
// Verify all profiles in batch have identical dictionary
ProfilesDictionaryData profilesDictionaryData = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
class CollectorIntegrationTest {

private static final String COLLECTOR_IMAGE =
"otel/opentelemetry-collector-contrib:0.153.0@sha256:93aad750175cbf1a973ae1c5886c3371f4d800f61be25cdd26870b8441ffe9fa";
"otel/opentelemetry-collector-contrib:0.154.0@sha256:b3079f45e19bdb7326bf49cdddce6cf60dfd865138db39f2733ea48ab17bc4cb";

private static final Integer COLLECTOR_HEALTH_CHECK_PORT = 13133;

Expand Down
2 changes: 1 addition & 1 deletion extensions/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tasks {
withType(KotlinJvmCompile::class) {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
apiVersion.set(KotlinVersion.KOTLIN_1_9)
apiVersion.set(KotlinVersion.KOTLIN_2_2)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ abstract class OtlpExporterIntegrationTest {
private static final AttributeKey<String> SERVICE_NAME = AttributeKey.stringKey("service.name");

private static final String COLLECTOR_IMAGE =
"otel/opentelemetry-collector-contrib:0.153.0@sha256:93aad750175cbf1a973ae1c5886c3371f4d800f61be25cdd26870b8441ffe9fa";
"otel/opentelemetry-collector-contrib:0.154.0@sha256:b3079f45e19bdb7326bf49cdddce6cf60dfd865138db39f2733ea48ab17bc4cb";

private static final Integer COLLECTOR_OTLP_GRPC_PORT = 4317;
private static final Integer COLLECTOR_OTLP_HTTP_PORT = 4318;
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tools]

# Linters
"aqua:grafana/flint" = "0.22.4"
"aqua:grafana/flint" = "0.22.5"
lychee = "0.24.2"

[env]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ <C> SpanContextShim extractTextMap(Format<C> format, TextMapExtract carrier) {
}

// Visible for testing
@SuppressWarnings("ReferenceEquality")
<C> TextMapPropagator getPropagator(Format<C> format) {
if (format == Format.Builtin.HTTP_HEADERS) {
return httpPropagator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ final class ScopeManagerShim implements ScopeManager {

@Override
@Nullable
@SuppressWarnings("ReferenceEquality")
public Span activeSpan() {
SpanShim spanShim = SpanShim.current();
io.opentelemetry.api.trace.Span span = io.opentelemetry.api.trace.Span.current();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public SpanBuilder buildSpan(String operationName) {
}

@Override
@SuppressWarnings("ReferenceEquality")
public <C> void inject(SpanContext context, Format<C> format, C carrier) {
if (context == null) {
logger.log(Level.WARNING, "Cannot inject a null span context.");
Expand All @@ -99,6 +100,7 @@ public <C> void inject(SpanContext context, Format<C> format, C carrier) {

@Override
@Nullable
@SuppressWarnings("ReferenceEquality")
public <C> SpanContext extract(Format<C> format, C carrier) {
try {
if (format == Format.Builtin.TEXT_MAP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class OtlpPipelineStressTest {
public static final GenericContainer<?> collectorContainer =
new GenericContainer<>(
DockerImageName.parse(
"otel/opentelemetry-collector-contrib:0.153.0@sha256:93aad750175cbf1a973ae1c5886c3371f4d800f61be25cdd26870b8441ffe9fa"))
"otel/opentelemetry-collector-contrib:0.154.0@sha256:b3079f45e19bdb7326bf49cdddce6cf60dfd865138db39f2733ea48ab17bc4cb"))
.withImagePullPolicy(PullPolicy.alwaysPull())
.withNetwork(network)
.withNetworkAliases("otel-collector")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ default int order() {
static <T extends Ordered> List<T> loadOrderedList(
ComponentLoader componentLoader, Class<T> spiClass) {
List<T> result = new ArrayList<>(ComponentLoader.loadList(componentLoader, spiClass));
result.sort(Comparator.comparing(Ordered::order));
result.sort(Comparator.comparingInt(Ordered::order));
return Collections.unmodifiableList(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ final class LogRecordExporterConfiguration {
EXPORTER_ARTIFACT_ID_BY_NAME.put("otlp", "opentelemetry-exporter-otlp");
}

@SuppressWarnings("ReferenceEquality")
static Map<String, LogRecordExporter> configureLogRecordExporters(
ConfigProperties config,
SpiHelper spiHelper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ final class LoggerProviderConfiguration {
private static final List<String> simpleProcessorExporterNames =
Arrays.asList("console", "logging");

@SuppressWarnings("ReferenceEquality")
static void configureLoggerProvider(
SdkLoggerProviderBuilder loggerProviderBuilder,
ConfigProperties config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ final class MetricExporterConfiguration {
READER_ARTIFACT_ID_BY_NAME.put("prometheus", "opentelemetry-exporter-prometheus");
}

@SuppressWarnings("ReferenceEquality")
static MetricReader configureReader(
String name,
ConfigProperties config,
Expand Down
Loading
Loading