Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into split-ratpack
Browse files Browse the repository at this point in the history
trask committed Dec 11, 2024
2 parents cd4d8cd + 4cc4e1c commit 829fd47
Showing 26 changed files with 217 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -23,8 +23,10 @@
@AutoService(BugChecker.class)
@BugPattern(
summary =
"This public internal class doesn't end with the javadoc disclaimer: \""
+ OtelInternalJavadoc.EXPECTED_INTERNAL_COMMENT
"This public internal class doesn't end with any of the applicable javadoc disclaimers: \""
+ OtelInternalJavadoc.EXPECTED_INTERNAL_COMMENT_V1
+ "\", or \""
+ OtelInternalJavadoc.EXPECTED_INTERNAL_COMMENT_V2
+ "\"",
severity = WARNING)
public class OtelInternalJavadoc extends BugChecker implements BugChecker.ClassTreeMatcher {
@@ -36,17 +38,24 @@ public class OtelInternalJavadoc extends BugChecker implements BugChecker.ClassT
private static final Pattern EXCLUDE_PACKAGE_PATTERN =
Pattern.compile("^io\\.opentelemetry\\.javaagent\\.instrumentation\\.internal\\.");

static final String EXPECTED_INTERNAL_COMMENT =
static final String EXPECTED_INTERNAL_COMMENT_V1 =
"This class is internal and is hence not for public use."
+ " Its APIs are unstable and can change at any time.";

static final String EXPECTED_INTERNAL_COMMENT_V2 =
"This class is internal and experimental. Its APIs are unstable and can change at any time."
+ " Its APIs (or a version of them) may be promoted to the public stable API in the"
+ " future, but no guarantees are made.";

@Override
public Description matchClass(ClassTree tree, VisitorState state) {
if (!isPublic(tree) || !isInternal(state) || tree.getSimpleName().toString().endsWith("Test")) {
return Description.NO_MATCH;
}
String javadoc = getJavadoc(state);
if (javadoc != null && javadoc.endsWith(EXPECTED_INTERNAL_COMMENT)) {
if (javadoc != null
&& (javadoc.contains(EXPECTED_INTERNAL_COMMENT_V1)
|| javadoc.contains(EXPECTED_INTERNAL_COMMENT_V2))) {
return Description.NO_MATCH;
}
return describeMatch(tree);
Original file line number Diff line number Diff line change
@@ -5,13 +5,13 @@

package io.opentelemetry.javaagent.customchecks.internal;

// BUG: Diagnostic contains: doesn't end with the javadoc disclaimer
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public class InternalJavadocPositiveCases {

// BUG: Diagnostic contains: doesn't end with the javadoc disclaimer
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public static class One {}

/** Doesn't have the disclaimer. */
// BUG: Diagnostic contains: doesn't end with the javadoc disclaimer
// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers
public static class Two {}
}
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ public static <REQUEST, RESPONSE> DefaultHttpClientInstrumenterBuilder<REQUEST,
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*/
@CanIgnoreReturnValue
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> addAttributeExtractor(
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> addAttributesExtractor(
AttributesExtractor<? super REQUEST, ? super RESPONSE> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
@@ -190,15 +190,15 @@ public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setSpanNameExtrac
@CanIgnoreReturnValue
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setPeerServiceResolver(
PeerServiceResolver peerServiceResolver) {
return addAttributeExtractor(
return addAttributesExtractor(
HttpClientPeerServiceAttributesExtractor.create(attributesGetter, peerServiceResolver));
}

/** Sets the {@code peer.service} attribute for http client spans. */
@CanIgnoreReturnValue
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setPeerService(
String peerService) {
return addAttributeExtractor(AttributesExtractor.constant(PEER_SERVICE, peerService));
return addAttributesExtractor(AttributesExtractor.constant(PEER_SERVICE, peerService));
}

@CanIgnoreReturnValue
Original file line number Diff line number Diff line change
@@ -33,12 +33,27 @@ public final class ApacheHttpClientTelemetryBuilder {
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public ApacheHttpClientTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super ApacheHttpClientRequest, ? super HttpResponse>
attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*/
@CanIgnoreReturnValue
public ApacheHttpClientTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super ApacheHttpClientRequest, ? super HttpResponse>
attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public final class ApacheHttpClient5TelemetryBuilder {
public ApacheHttpClient5TelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super ApacheHttpClient5Request, ? super HttpResponse>
attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ public ArmeriaTelemetryBuilder setServerStatusExtractor(
@CanIgnoreReturnValue
public ArmeriaTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super RequestContext, ? super RequestLog> attributesExtractor) {
clientBuilder.addAttributeExtractor(attributesExtractor);
clientBuilder.addAttributesExtractor(attributesExtractor);
serverBuilder.addAttributesExtractor(attributesExtractor);
return this;
}
@@ -108,7 +108,7 @@ public ArmeriaTelemetryBuilder addAttributeExtractor(
@CanIgnoreReturnValue
public ArmeriaTelemetryBuilder addClientAttributeExtractor(
AttributesExtractor<? super ClientRequestContext, ? super RequestLog> attributesExtractor) {
clientBuilder.addAttributeExtractor(attributesExtractor);
clientBuilder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -44,6 +44,18 @@ class CouchbaseClient31Test {

@BeforeAll
static void setup() {
// wait and retry in the hope that it will help against test flakiness
await()
.atMost(Duration.ofMinutes(5))
.ignoreException(UnambiguousTimeoutException.class)
.until(
() -> {
startCouchbase();
return true;
});
}

private static void startCouchbase() {
couchbase =
new CouchbaseContainer("couchbase/server:7.6.0")
.withExposedPorts(8091)
@@ -65,18 +77,11 @@ static void setup() {
ClusterOptions.clusterOptions(couchbase.getUsername(), couchbase.getPassword())
.environment(environment));

// wait and retry in the hope that it will help against test flakiness
await()
.atMost(Duration.ofMinutes(2))
.ignoreException(UnambiguousTimeoutException.class)
.until(
() -> {
Bucket bucket = cluster.bucket("test");
collection = bucket.defaultCollection();
Bucket bucket = cluster.bucket("test");
collection = bucket.defaultCollection();

bucket.waitUntilReady(Duration.ofSeconds(30));
return true;
});
// Wait 1 minute due to slow startup contributing to flakiness
bucket.waitUntilReady(Duration.ofMinutes(1));
}

@AfterAll
Original file line number Diff line number Diff line change
@@ -31,6 +31,8 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Stream;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
@@ -47,28 +49,51 @@ public abstract class AbstractCouchbaseAsyncClientTest extends AbstractCouchbase

@RegisterExtension static final AutoCleanupExtension cleanup = AutoCleanupExtension.create();

private CouchbaseEnvironment environmentCouchbase;
private CouchbaseEnvironment environmentMemcache;
private CouchbaseAsyncCluster clusterCouchbase;
private CouchbaseAsyncCluster clusterMemcache;

private static Stream<Arguments> bucketSettings() {
return Stream.of(
Arguments.of(named(bucketCouchbase.type().name(), bucketCouchbase)),
Arguments.of(named(bucketMemcache.type().name(), bucketMemcache)));
}

private CouchbaseAsyncCluster prepareCluster(BucketSettings bucketSettings) {
CouchbaseEnvironment environment = envBuilder(bucketSettings).build();
CouchbaseAsyncCluster cluster =
CouchbaseAsyncCluster.create(environment, Collections.singletonList("127.0.0.1"));
cleanup.deferCleanup(
() -> cluster.disconnect().timeout(10, TimeUnit.SECONDS).toBlocking().single());
cleanup.deferCleanup(environment::shutdown);
@BeforeAll
void setUpClusters() {
environmentCouchbase = envBuilder(bucketCouchbase).build();
clusterCouchbase =
CouchbaseAsyncCluster.create(environmentCouchbase, Collections.singletonList("127.0.0.1"));

environmentMemcache = envBuilder(bucketMemcache).build();
clusterMemcache =
CouchbaseAsyncCluster.create(environmentMemcache, Collections.singletonList("127.0.0.1"));
}

@AfterAll
void cleanUpClusters() {
clusterCouchbase.disconnect().timeout(10, TimeUnit.SECONDS).toBlocking().single();
environmentCouchbase.shutdown();

clusterMemcache.disconnect().timeout(10, TimeUnit.SECONDS).toBlocking().single();
environmentMemcache.shutdown();
}

return cluster;
private CouchbaseAsyncCluster getCluster(BucketSettings bucketSettings) {
if (bucketSettings == bucketCouchbase) {
return clusterCouchbase;
} else if (bucketSettings == bucketMemcache) {
return clusterMemcache;
}
throw new IllegalArgumentException("unknown setting " + bucketSettings.name());
}

@ParameterizedTest
@MethodSource("bucketSettings")
void hasBucket(BucketSettings bucketSettings)
throws ExecutionException, InterruptedException, TimeoutException {
CouchbaseAsyncCluster cluster = prepareCluster(bucketSettings);
CouchbaseAsyncCluster cluster = getCluster(bucketSettings);
AsyncClusterManager manager = cluster.clusterManager(USERNAME, PASSWORD).toBlocking().single();

testing.waitForTraces(1);
@@ -103,7 +128,7 @@ void hasBucket(BucketSettings bucketSettings)
@MethodSource("bucketSettings")
void upsert(BucketSettings bucketSettings)
throws ExecutionException, InterruptedException, TimeoutException {
CouchbaseAsyncCluster cluster = prepareCluster(bucketSettings);
CouchbaseAsyncCluster cluster = getCluster(bucketSettings);

JsonObject content = JsonObject.create().put("hello", "world");
CompletableFuture<JsonDocument> inserted = new CompletableFuture<>();
@@ -144,7 +169,7 @@ void upsert(BucketSettings bucketSettings)
@MethodSource("bucketSettings")
void upsertAndGet(BucketSettings bucketSettings)
throws ExecutionException, InterruptedException, TimeoutException {
CouchbaseAsyncCluster cluster = prepareCluster(bucketSettings);
CouchbaseAsyncCluster cluster = getCluster(bucketSettings);

JsonObject content = JsonObject.create().put("hello", "world");
CompletableFuture<JsonDocument> inserted = new CompletableFuture<>();
@@ -194,7 +219,7 @@ void upsertAndGet(BucketSettings bucketSettings)
@Test
void query() throws ExecutionException, InterruptedException, TimeoutException {
// Only couchbase buckets support queries.
CouchbaseAsyncCluster cluster = prepareCluster(bucketCouchbase);
CouchbaseAsyncCluster cluster = getCluster(bucketCouchbase);

CompletableFuture<JsonObject> queryResult = new CompletableFuture<>();
// Mock expects this specific query.
Original file line number Diff line number Diff line change
@@ -59,14 +59,28 @@ public final class GrpcTelemetryBuilder {
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public GrpcTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super GrpcRequest, ? super Status> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*/
@CanIgnoreReturnValue
public GrpcTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super GrpcRequest, ? super Status> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
}

/**
* Adds an extra client-only {@link AttributesExtractor} to invoke to set attributes to
* instrumented items. The {@link AttributesExtractor} will be executed after all default
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public void sayHello(
.addService(greeter)
.intercept(
GrpcTelemetry.builder(testing.getOpenTelemetry())
.addAttributeExtractor(new CustomAttributesExtractor())
.addAttributesExtractor(new CustomAttributesExtractor())
.addServerAttributeExtractor(new CustomAttributesExtractorV2("serverSideValue"))
.build()
.newServerInterceptor())
@@ -103,7 +103,7 @@ public void sayHello(
ManagedChannelBuilder.forAddress("localhost", server.getPort())
.intercept(
GrpcTelemetry.builder(testing.getOpenTelemetry())
.addAttributeExtractor(new CustomAttributesExtractor())
.addAttributesExtractor(new CustomAttributesExtractor())
.addClientAttributeExtractor(
new CustomAttributesExtractorV2("clientSideValue"))
.build()
Original file line number Diff line number Diff line change
@@ -32,11 +32,25 @@ public final class JavaHttpClientTelemetryBuilder {
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public JavaHttpClientTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super HttpRequest, ? super HttpResponse<?>> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*/
@CanIgnoreReturnValue
public JavaHttpClientTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super HttpRequest, ? super HttpResponse<?>> attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ tasks {
// needed for java 11 to avoid org.jboss.modules.ModuleNotFoundException: java.se
jvmArgs("--add-modules=java.se")
// add offset to default port values
jvmArgs("-Djboss.socket.binding.port-offset=200")
jvmArgs("-Djboss.socket.binding.port-offset=400")

// remove logback-classic from classpath
classpath = classpath.filter {
Original file line number Diff line number Diff line change
@@ -47,11 +47,25 @@ public JettyClientTelemetryBuilder setSslContextFactory(
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public JettyClientTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super Request, ? super Response> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*/
@CanIgnoreReturnValue
public JettyClientTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super Request, ? super Response> attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -47,11 +47,25 @@ public JettyClientTelemetryBuilder setSslContextFactory(SslContextFactory sslCon
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public JettyClientTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super Request, ? super Response> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*/
@CanIgnoreReturnValue
public JettyClientTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super Request, ? super Response> attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ abstract class AbstractKtorClientTracingBuilder(

fun attributeExtractor(extractorBuilder: ExtractorBuilder.() -> Unit = {}) {
val builder = ExtractorBuilder().apply(extractorBuilder).build()
this.clientBuilder.addAttributeExtractor(
this.clientBuilder.addAttributesExtractor(
object : AttributesExtractor<HttpRequestData, HttpResponse> {
override fun onStart(attributes: AttributesBuilder, parentContext: Context, request: HttpRequestData) {
builder.onStart(OnStartData(attributes, parentContext, request))
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ public NettyClientTelemetryBuilder setCapturedResponseHeaders(
@CanIgnoreReturnValue
public NettyClientTelemetryBuilder addAttributesExtractor(
AttributesExtractor<HttpRequestAndChannel, HttpResponse> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -32,11 +32,25 @@ public final class OkHttpTelemetryBuilder {
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public OkHttpTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super Interceptor.Chain, ? super Response> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*/
@CanIgnoreReturnValue
public OkHttpTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super Interceptor.Chain, ? super Response> attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -38,14 +38,28 @@ public final class QuartzTelemetryBuilder {
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public QuartzTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super JobExecutionContext, ? super Void> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items. The {@link AttributesExtractor} will be executed after all default extractors.
*/
@CanIgnoreReturnValue
public QuartzTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super JobExecutionContext, ? super Void> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
}

/**
* Sets whether experimental attributes should be set to spans. These attributes may be changed or
* removed in the future, so only enable this if you know you do not require attributes filled by
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public final class R2dbcSingletons {
.getBoolean(
"otel.instrumentation.r2dbc.statement-sanitizer.enabled",
AgentCommonConfig.get().isStatementSanitizationEnabled()))
.addAttributeExtractor(
.addAttributesExtractor(
PeerServiceAttributesExtractor.create(
R2dbcNetAttributesGetter.INSTANCE,
AgentCommonConfig.get().getPeerServiceResolver()))
Original file line number Diff line number Diff line change
@@ -25,10 +25,21 @@ public final class R2dbcTelemetryBuilder {
instrumenterBuilder = new R2dbcInstrumenterBuilder(openTelemetry);
}

/**
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public R2dbcTelemetryBuilder addAttributeExtractor(
AttributesExtractor<DbExecution, Void> attributesExtractor) {
instrumenterBuilder.addAttributeExtractor(attributesExtractor);
instrumenterBuilder.addAttributesExtractor(attributesExtractor);
return this;
}

@CanIgnoreReturnValue
public R2dbcTelemetryBuilder addAttributesExtractor(
AttributesExtractor<DbExecution, Void> attributesExtractor) {
instrumenterBuilder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ public R2dbcInstrumenterBuilder(OpenTelemetry openTelemetry) {
}

@CanIgnoreReturnValue
public R2dbcInstrumenterBuilder addAttributeExtractor(
public R2dbcInstrumenterBuilder addAttributesExtractor(
AttributesExtractor<DbExecution, Void> attributesExtractor) {
additionalExtractors.add(attributesExtractor);
return this;
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ public RatpackTelemetryBuilder addAttributeExtractor(
@CanIgnoreReturnValue
public RatpackTelemetryBuilder addClientAttributeExtractor(
AttributesExtractor<? super RequestSpec, ? super HttpResponse> attributesExtractor) {
clientBuilder.addAttributeExtractor(attributesExtractor);
clientBuilder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -43,11 +43,25 @@ private DefaultHttpClientInstrumenterBuilder<HttpRequest, ClientHttpResponse> ge
/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*
* @deprecated Use {@link #addAttributesExtractor(AttributesExtractor)} instead.
*/
@Deprecated
@CanIgnoreReturnValue
public SpringWebTelemetryBuilder addAttributeExtractor(
AttributesExtractor<? super HttpRequest, ? super ClientHttpResponse> attributesExtractor) {
builder.addAttributeExtractor(attributesExtractor);
builder.addAttributesExtractor(attributesExtractor);
return this;
}

/**
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*/
@CanIgnoreReturnValue
public SpringWebTelemetryBuilder addAttributesExtractor(
AttributesExtractor<? super HttpRequest, ? super ClientHttpResponse> attributesExtractor) {
builder.addAttributesExtractor(attributesExtractor);
return this;
}

Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public final class SpringWebfluxTelemetryBuilder {
@CanIgnoreReturnValue
public SpringWebfluxTelemetryBuilder addClientAttributesExtractor(
AttributesExtractor<ClientRequest, ClientResponse> attributesExtractor) {
clientBuilder.addAttributeExtractor(attributesExtractor);
clientBuilder.addAttributesExtractor(attributesExtractor);
return this;
}

2 changes: 1 addition & 1 deletion smoke-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ dependencies {
api("org.spockframework:spock-core")
api(project(":testing-common"))

implementation(platform("io.grpc:grpc-bom:1.68.2"))
implementation(platform("io.grpc:grpc-bom:1.69.0"))
implementation("org.slf4j:slf4j-api")
implementation("io.opentelemetry:opentelemetry-api")
implementation("io.opentelemetry.proto:opentelemetry-proto")
2 changes: 1 addition & 1 deletion smoke-tests/images/grpc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ plugins {
}

dependencies {
implementation(platform("io.grpc:grpc-bom:1.68.2"))
implementation(platform("io.grpc:grpc-bom:1.69.0"))
implementation(platform("io.opentelemetry:opentelemetry-bom:1.0.0"))
implementation(platform("io.opentelemetry:opentelemetry-bom-alpha:1.0.0-alpha"))
implementation(platform("org.apache.logging.log4j:log4j-bom:2.24.2"))

0 comments on commit 829fd47

Please sign in to comment.