Skip to content

Commit

Permalink
Updated spotless klint and ran spotless (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaurushGarg authored Aug 21, 2023
1 parent 9652f01 commit 72f8dfb
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private AutoConfiguredOpenTelemetrySdkBuilder createSdkBuilder() {
.addPropertiesSupplier(() -> singletonMap("otel.traces.exporter", "none"))
.addPropertiesSupplier(() -> singletonMap("otel.logs.exporter", "none"));
}

// The probability of this passing once without correct IDs is low, 20 times is inconceivable.
@RepeatedTest(20)
void providerGeneratesXrayIds() {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ allprojects {

spotless {
kotlinGradle {
ktlint("0.40.0").userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2"))
ktlint("0.48.0").userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2"))

// Doesn't support pluginManagement block
targetExclude("settings.gradle.kts")
Expand Down Expand Up @@ -184,7 +184,7 @@ allprojects {
relocate("io.opentelemetry.extension.aws", "io.opentelemetry.javaagent.shaded.io.opentelemetry.extension.aws")
relocate(
"io.opentelemetry.extension.kotlin",
"io.opentelemetry.javaagent.shaded.io.opentelemetry.extension.kotlin"
"io.opentelemetry.javaagent.shaded.io.opentelemetry.extension.kotlin",
)
}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ allprojects {
pom {
name.set("AWS Distro for OpenTelemetry Java Agent")
description.set(
"The Amazon Web Services distribution of the OpenTelemetry Java Instrumentation."
"The Amazon Web Services distribution of the OpenTelemetry Java Instrumentation.",
)
url.set("https:/github.com/aws-observability/aws-otel-java-instrumentation")

Expand Down
14 changes: 7 additions & 7 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ val DEPENDENCY_BOMS = listOf(
"org.junit:junit-bom:5.10.0",
"org.springframework.boot:spring-boot-dependencies:2.7.14",
"org.testcontainers:testcontainers-bom:1.18.3",
"software.amazon.awssdk:bom:2.20.122"
"software.amazon.awssdk:bom:2.20.122",
)

val DEPENDENCY_SETS = listOf(
DependencySet(
"org.assertj",
"3.24.2",
listOf("assertj-core")
listOf("assertj-core"),
),
DependencySet(
"org.curioswitch.curiostack",
"2.2.0",
listOf("protobuf-jackson")
listOf("protobuf-jackson"),
),
DependencySet(
"org.slf4j",
"1.7.36",
listOf(
"slf4j-api",
"slf4j-simple"
)
)
"slf4j-simple",
),
),
)

val DEPENDENCIES = listOf(
Expand All @@ -77,7 +77,7 @@ val DEPENDENCIES = listOf(
"io.opentelemetry.contrib:opentelemetry-aws-resources:1.28.0-alpha",
"io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha",
"io.opentelemetry.javaagent:opentelemetry-javaagent:$otelJavaAgentVersion",
"net.bytebuddy:byte-buddy:1.14.6"
"net.bytebuddy:byte-buddy:1.14.6",
)

javaPlatform {
Expand Down
4 changes: 2 additions & 2 deletions otelagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ jib {
"gcr.io/distroless/java17-debian11:debug",
"public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha",
localDocker = false,
multiPlatform = !rootProject.property("localDocker")!!.equals("true")
multiPlatform = !rootProject.property("localDocker")!!.equals("true"),
)

container {
appRoot = "/aws-observability"
setEntrypoint("INHERIT")
environment = mapOf(
"JAVA_TOOL_OPTIONS" to "-javaagent:/aws-observability/classpath/aws-opentelemetry-agent-$version.jar"
"JAVA_TOOL_OPTIONS" to "-javaagent:/aws-observability/classpath/aws-opentelemetry-agent-$version.jar",
)
}
containerizingMode = "packaged"
Expand Down
2 changes: 1 addition & 1 deletion sample-apps/spark-awssdkv1/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jib {
"public.ecr.aws/aws-otel-test/aws-otel-java-spark-awssdkv1",
localDocker = rootProject.property("localDocker")!!.equals("true"),
multiPlatform = !rootProject.property("localDocker")!!.equals("true"),
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}")
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}"),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void updateLastLatencyMetric(Long returnTime, String apiName, String stat
apiNameValue = apiName;
statusCodeValue = statusCode;
}

/**
* update actual queue size, it will be collected by UpDownSumObserver
*
Expand Down
4 changes: 2 additions & 2 deletions sample-apps/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jib {
"public.ecr.aws/aws-otel-test/aws-otel-java-spark",
localDocker = rootProject.property("localDocker")!!.equals("true"),
multiPlatform = !rootProject.property("localDocker")!!.equals("true"),
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}")
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}"),
)
}

Expand All @@ -49,7 +49,7 @@ tasks {
"public.ecr.aws/aws-otel-test/aws-otel-java-spark-without-auto-instrumentation-agent",
localDocker = false,
multiPlatform = !rootProject.property("localDocker")!!.equals("true"),
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}")
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}"),
)
setJibExtension(j)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void updateLastLatencyMetric(Long returnTime, String apiName, String stat
apiNameValue = apiName;
statusCodeValue = statusCode;
}

/**
* update actual queue size, it will be collected by UpDownSumObserver
*
Expand Down
2 changes: 1 addition & 1 deletion sample-apps/springboot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jib {
"public.ecr.aws/aws-otel-test/aws-otel-java-springboot",
rootProject.property("localDocker")!!.equals("true"),
!rootProject.property("localDocker")!!.equals("true"),
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}")
tags = setOf("latest", "${System.getenv("COMMIT_HASH")}"),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void updateLastLatencyMetric(Long returnTime, String apiName, String stat
apiNameValue = apiName;
statusCodeValue = statusCode;
}

/**
* update actual queue size, it will be collected by UpDownSumObserver
*
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

pluginManagement {
plugins {
id("com.diffplug.spotless") version "6.13.0"
id("com.diffplug.spotless") version "6.20.0"
id("com.github.ben-manes.versions") version "0.47.0"
id("com.github.jk1.dependency-license-report") version "2.5"
id("com.github.johnrengelman.shadow") version "8.1.1"
Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/runner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tasks {

jvmArgs(
"-Dio.awsobservability.instrumentation.smoketests.runner.agentPath=${otelAgentJarTask.get().archiveFile.get()
.getAsFile().absolutePath}"
.getAsFile().absolutePath}",
)
}

Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/spring-boot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jib {
"public.ecr.aws/aws-otel-test/aws-opentelemetry-java-base:alpha",
"public.ecr.aws/aws-otel-test/aws-otel-java-smoketests-springboot",
localDocker = rootProject.property("localDocker")!!.equals("true"),
multiPlatform = false
multiPlatform = false,
)
}

Expand Down

0 comments on commit 72f8dfb

Please sign in to comment.