Skip to content

Commit 712e0a7

Browse files
authored
Remove todo assignment (open-telemetry#12884)
1 parent ce01f00 commit 712e0a7

File tree

26 files changed

+37
-41
lines changed

26 files changed

+37
-41
lines changed

buildscripts/checkstyle.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
<!-- skip jflex generated files -->
406406
<module name="SuppressionSingleFilter">
407407
<property name="checks" value=".*"/>
408-
<!-- TODO(anuraaga): Fix path after https://github.com/jprante/gradle-plugin-jflex/issues/20 -->
408+
<!-- TODO: Fix path after https://github.com/jprante/gradle-plugin-jflex/issues/20 -->
409409
<property name="files"
410410
value="instrumentation-api[/\\]build[/\\]generated[/\\]sources[/\\]main"/>
411411
</module>

conventions/src/main/kotlin/io.opentelemetry.instrumentation.javaagent-testing.gradle.kts

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ afterEvaluate {
104104
val agentShadowJar = agentForTesting.resolve().first()
105105

106106
dependsOn(shadowJar)
107-
// TODO(anuraaga): Figure out why dependsOn override is still needed in otel.javaagent-testing
108-
// despite this dependency.
107+
// TODO: Figure out why dependsOn override is still needed in otel.javaagent-testing despite
108+
// this dependency.
109109
dependsOn(agentForTesting.buildDependencies)
110110

111111
jvmArgumentProviders.add(JavaagentTestArgumentsProvider(agentShadowJar, shadowJar.archiveFile.get().asFile))
@@ -119,8 +119,8 @@ afterEvaluate {
119119
return@filter false
120120
}
121121

122-
// TODO(anuraaga): Better not to have this naming constraint, we can likely use
123-
// plugin identification instead.
122+
// TODO: Better not to have this naming constraint, we can likely use plugin identification
123+
// instead.
124124

125125
val lib = it.absoluteFile
126126
if (lib.name.startsWith("opentelemetry-javaagent-")) {

conventions/src/main/kotlin/otel.errorprone-conventions.gradle.kts

+4-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ tasks {
9090
disable("TypeParameterNaming")
9191

9292
// In bytecode instrumentation it's very common to separate across onEnter / onExit
93-
// TODO(anuraaga): Only disable for javaagent instrumentation modules.
93+
// TODO: Only disable for javaagent instrumentation modules.
9494
disable("MustBeClosedChecker")
9595

9696
// Common to avoid an allocation. Revisit if it's worth opt-in suppressing instead of
@@ -101,16 +101,15 @@ tasks {
101101
disable("JdkObsolete")
102102
disable("JavaUtilDate")
103103

104-
// TODO(anuraaga): Remove this, we use this pattern in several tests and it will mean
105-
// some moving.
104+
// TODO: Remove this, we use this pattern in several tests and it will mean some moving.
106105
disable("DefaultPackage")
107106

108107
// we use modified Otel* checks which ignore *Advice classes
109108
disable("PrivateConstructorForUtilityClass")
110109
disable("CanIgnoreReturnValueSuggester")
111110

112-
// TODO(anuraaga): Remove this, probably after instrumenter API migration instead of dealing
113-
// with older APIs.
111+
// TODO: Remove this, probably after instrumenter API migration instead of dealing with
112+
// older APIs.
114113
disable("InconsistentOverloads")
115114

116115
// lots of low level APIs use arrays

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ tasks.withType<Test>().configureEach {
342342
// There's no real harm in setting this for all tests even if any happen to not be using context
343343
// propagation.
344344
jvmArgs("-Dio.opentelemetry.context.enableStrictContext=${rootProject.findProperty("enableStrictContext") ?: true}")
345-
// TODO(anuraaga): Have agent map unshaded to shaded.
345+
// TODO: Have agent map unshaded to shaded.
346346
if (project.findProperty("disableShadowRelocate") != "true") {
347347
jvmArgs("-Dio.opentelemetry.javaagent.shaded.io.opentelemetry.context.enableStrictContext=${rootProject.findProperty("enableStrictContext") ?: true}")
348348
} else {

examples/distro/smoke-tests/src/test/java/com/example/javaagent/smoketest/SmokeTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ protected Collection<ExportTraceServiceRequest> waitForTraces()
158158
.map(
159159
it -> {
160160
ExportTraceServiceRequest.Builder builder = ExportTraceServiceRequest.newBuilder();
161-
// TODO(anuraaga): Register parser into object mapper to avoid de -> re ->
162-
// deserialize.
161+
// TODO: Register parser into object mapper to avoid de -> re -> deserialize.
163162
try {
164163
JsonFormat.parser().merge(OBJECT_MAPPER.writeValueAsString(it), builder);
165164
} catch (InvalidProtocolBufferException | JsonProcessingException e) {

instrumentation/armeria/armeria-1.3/testing/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/AbstractArmeriaHttpServerTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ protected void configure(HttpServerTestOptions options) {
180180
options.setExpectedHttpRoute(
181181
(endpoint, method) -> {
182182
if (endpoint == ServerEndpoint.NOT_FOUND) {
183-
// TODO(anuraaga): Revisit this when applying instrumenters to more libraries, Armeria
184-
// currently reports '/*' which is a fallback route.
183+
// TODO: Revisit this when applying instrumenters to more libraries, Armeria currently
184+
// reports '/*' which is a fallback route.
185185
return "/*";
186186
}
187187
return expectedHttpRoute(endpoint, method);

instrumentation/aws-lambda/aws-lambda-core-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambdacore/v1_0/internal/ApiGatewayProxyRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public abstract class ApiGatewayProxyRequest {
2525

2626
private static final Logger logger = Logger.getLogger(ApiGatewayProxyRequest.class.getName());
2727

28-
// TODO(anuraaga): We should create a RequestFactory type of class instead of evaluating this
29-
// for every request.
28+
// TODO: We should create a RequestFactory type of class instead of evaluating this for every
29+
// request.
3030
private static boolean noHttpPropagationNeeded() {
3131
Collection<String> fields =
3232
GlobalOpenTelemetry.getPropagators().getTextMapPropagator().fields();

instrumentation/aws-lambda/aws-lambda-events-2.2/library/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies {
2828
// We need Jackson for wrappers to reproduce the serialization does when Lambda invokes a RequestHandler with event
2929
// since Lambda will only be able to invoke the wrapper itself with a generic Object.
3030
// Note that Lambda itself uses Jackson, but does not expose it to the function so we need to include it here.
31-
// TODO(anuraaga): Switch to aws-lambda-java-serialization to more robustly follow Lambda's serialization logic.
31+
// TODO: Switch to aws-lambda-java-serialization to more robustly follow Lambda's serialization logic.
3232
implementation("com.fasterxml.jackson.core:jackson-databind")
3333
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
3434

instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ abstract class AbstractAws2ClientTest extends AbstractAws2ClientCoreTest {
408408
"""
409409
}
410410

411-
// TODO(anuraaga): Without AOP instrumentation of the HTTP client, we cannot model retries as
411+
// TODO: Without AOP instrumentation of the HTTP client, we cannot model retries as
412412
// spans because of https://github.com/aws/aws-sdk-java-v2/issues/1741. We should at least tweak
413413
// the instrumentation to add Events for retries instead.
414414
def "timeout and retry errors not captured"() {

instrumentation/finatra-2.9/javaagent/build.gradle.kts

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ val finatraLatest by configurations.creating {
2828
}
2929

3030
dependencies {
31-
// TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
32-
// here.
31+
// TODO: Something about library configuration doesn't work well with scala compilation here.
3332
compileOnly("com.twitter:finatra-http_2.11:2.9.0")
3433

3534
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))

instrumentation/kubernetes-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kubernetesclient/RequestBuilderHeaderSetter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import okhttp3.Request;
1111

1212
/** Helper class to inject span context into request headers. */
13-
// TODO(anuraaga): Figure out a way to avoid copying this from okhttp instrumentation.
13+
// TODO: Figure out a way to avoid copying this from okhttp instrumentation.
1414
enum RequestBuilderHeaderSetter implements TextMapSetter<Request.Builder> {
1515
INSTANCE;
1616

instrumentation/lettuce/lettuce-5.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ protected RedisClient createClient(String uri) {
3838
return RedisClient.create(uri);
3939
}
4040

41-
// TODO(anuraaga): reactor library instrumentation doesn't seem to handle this case, figure out if
42-
// it should and if so move back to base class.
41+
// TODO: reactor library instrumentation doesn't seem to handle this case, figure out if it
42+
// should and if so move back to base class.
4343
@SuppressWarnings("deprecation") // using deprecated semconv
4444
@Test
4545
void testAsyncSubscriberWithSpecificThreadPool() {

instrumentation/netty/netty-3.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/netty/v3_8/client/Netty38ClientTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void sendRequestWithCallback(
112112

113113
// TODO: context is not automatically propagated into callbacks
114114
Context context = Context.current();
115-
// TODO(anuraaga): Do we also need to test ListenableFuture callback?
115+
// TODO: Do we also need to test ListenableFuture callback?
116116
client.executeRequest(
117117
request,
118118
new AsyncCompletionHandler<Void>() {

instrumentation/oshi/testing/src/main/java/io/opentelemetry/instrumentation/oshi/AbstractProcessMetricsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void test() {
3131
metric ->
3232
assertThat(metric)
3333
.hasUnit("By")
34-
// TODO(anuraaga): Provide fuzzy value matching
34+
// TODO: Provide fuzzy value matching
3535
.hasLongSumSatisfying(
3636
sum ->
3737
assertThat(metric.getLongSumData().getPoints())
@@ -46,7 +46,7 @@ void test() {
4646
metric ->
4747
assertThat(metric)
4848
.hasUnit("ms")
49-
// TODO(anuraaga): Provide fuzzy value matching
49+
// TODO: Provide fuzzy value matching
5050
.hasLongGaugeSatisfying(
5151
gauge ->
5252
assertThat(metric.getLongGaugeData().getPoints())

instrumentation/oshi/testing/src/main/java/io/opentelemetry/instrumentation/oshi/AbstractSystemMetricsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void test() {
3131
metric ->
3232
assertThat(metric)
3333
.hasUnit("By")
34-
// TODO(anuraaga): Provide fuzzy value matching
34+
// TODO: Provide fuzzy value matching
3535
.hasLongSumSatisfying(
3636
sum ->
3737
assertThat(metric.getLongSumData().getPoints())
@@ -46,7 +46,7 @@ public void test() {
4646
metric ->
4747
assertThat(metric)
4848
.hasUnit("1")
49-
// TODO(anuraaga): Provide fuzzy value matching
49+
// TODO: Provide fuzzy value matching
5050
.hasDoubleGaugeSatisfying(
5151
gauge ->
5252
assertThat(metric.getDoubleGaugeData().getPoints())

instrumentation/play/play-mvc/play-mvc-2.6/javaagent/build.gradle.kts

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ otelJava {
3535
}
3636

3737
dependencies {
38-
// TODO(anuraaga): Something about library configuration doesn't work well with scala compilation
39-
// here.
38+
// TODO: Something about library configuration doesn't work well with scala compilation here.
4039
compileOnly("com.typesafe.play:play_$scalaVersion:$playVersion")
4140

4241
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))

instrumentation/quartz-2.0/library/src/main/java/io/opentelemetry/instrumentation/quartz/v2_0/TracingJobListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public String getName() {
3131

3232
@Override
3333
public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {
34-
// TODO(anuraaga): Consider adding an attribute for vetoed jobs.
34+
// TODO: Consider adding an attribute for vetoed jobs.
3535
}
3636

3737
@Override

instrumentation/ratpack/ratpack-1.4/testing/src/main/java/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackHttpServerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public void onComplete() {
266266
});
267267
}
268268

269-
// TODO(anuraaga): The default Ratpack error handler also returns a 500 which is all we test, so
269+
// TODO: The default Ratpack error handler also returns a 500 which is all we test, so
270270
// we don't actually have test coverage ensuring our instrumentation correctly delegates to this
271271
// user registered handler.
272272
private static class TestErrorHandler implements ServerErrorHandler {

instrumentation/reactor/reactor-3.1/javaagent/src/testInitialization/java/io/opentelemetry/javaagent/instrumentation/reactor/v3_1/InitializationTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void contextPropagated() {
2323

2424
// If reactor augmentation of WithSpan is working correctly, we will end up with these
2525
// implementation details.
26-
// TODO(anuraaga): This should just check actual context propagation instead of implementation
26+
// TODO: This should just check actual context propagation instead of implementation
2727
// but couldn't figure out how.
2828
assertThat(((Scannable) mono).parents().collect(Collectors.toList()))
2929
.anySatisfy(

instrumentation/rxjava/rxjava-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/v2_0/RxJavaPluginsInstrumentation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void transform(TypeTransformer transformer) {
3030
@SuppressWarnings("unused")
3131
public static class MethodAdvice {
3232

33-
// TODO(anuraaga): Replace with adding a type initializer to RxJavaPlugins
33+
// TODO: Replace with adding a type initializer to RxJavaPlugins
3434
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/2685
3535
@Advice.OnMethodEnter(suppress = Throwable.class)
3636
public static void activateOncePerClassloader() {

instrumentation/rxjava/rxjava-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/v3_0/RxJavaPluginsInstrumentation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void transform(TypeTransformer transformer) {
3030
@SuppressWarnings("unused")
3131
public static class MethodAdvice {
3232

33-
// TODO(anuraaga): Replace with adding a type initializer to RxJavaPlugins
33+
// TODO: Replace with adding a type initializer to RxJavaPlugins
3434
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/2685
3535
@Advice.OnMethodEnter(suppress = Throwable.class)
3636
public static void activateOncePerClassloader() {

instrumentation/rxjava/rxjava-3.1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/v3_1_1/RxJavaPluginsInstrumentation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void transform(TypeTransformer transformer) {
3030
@SuppressWarnings("unused")
3131
public static class MethodAdvice {
3232

33-
// TODO(anuraaga): Replace with adding a type initializer to RxJavaPlugins
33+
// TODO: Replace with adding a type initializer to RxJavaPlugins
3434
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/2685
3535
@Advice.OnMethodEnter(suppress = Throwable.class)
3636
public static void activateOncePerClassloader() {

javaagent-tooling/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ tasks {
127127

128128
// Mockito inline mocking uses byte-buddy but agent tooling currently uses byte-buddy-dep, which cannot be on the same
129129
// classpath. Disable inline mocking to prevent conflicts.
130-
// TODO(anuraaga): Find a better solution
130+
// TODO: Find a better solution
131131
configurations {
132132
testRuntimeClasspath {
133133
dependencies {

smoke-tests/src/test/groovy/io/opentelemetry/smoketest/TelemetryRetriever.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TelemetryRetriever {
4747

4848
return OBJECT_MAPPER.readTree(content).collect {
4949
def builder = builderConstructor.get()
50-
// TODO(anuraaga): Register parser into object mapper to avoid de -> re -> deserialize.
50+
// TODO: Register parser into object mapper to avoid de -> re -> deserialize.
5151
JsonFormat.parser().merge(OBJECT_MAPPER.writeValueAsString(it), builder)
5252
return (T) builder.build()
5353
}

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/InstrumentationTestRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private <T extends Consumer<TraceAssert>> void waitAndAssertTraces(
131131
// Don't throw this failure since the stack is the awaitility thread, causing confusion.
132132
// Instead, just assert one more time on the test thread, which will fail with a better
133133
// stack trace.
134-
// TODO(anuraaga): There is probably a better way to do this.
134+
// TODO: There is probably a better way to do this.
135135
doAssertTraces(traceComparator, assertionsList, verifyScopeVersion);
136136
} else {
137137
throw t;

testing-common/src/main/java/io/opentelemetry/javaagent/testing/common/AgentTestingExporterAccess.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ private static MetricData createMetricData(
350350
metric.getName(),
351351
metric.getDescription(),
352352
metric.getUnit(),
353-
// TODO(anuraaga): Remove usages of internal types.
353+
// TODO: Remove usages of internal types.
354354
ImmutableGaugeData.create(
355355
getDoublePointDatas(metric.getGauge().getDataPointsList())));
356356
} else {

0 commit comments

Comments
 (0)