Skip to content

Commit 6c736c4

Browse files
authored
Merge branch 'main' into remove-more-deprecated-props
2 parents 5a5530f + 9a274e8 commit 6c736c4

55 files changed

Lines changed: 103 additions & 80 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

instrumentation/gwt-2.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/gwt/v2_0/GwtTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void setup() throws Exception {
8080
Testcontainers.exposeHostPorts(port);
8181

8282
browser =
83-
new BrowserWebDriverContainer("selenium/standalone-chrome")
83+
new BrowserWebDriverContainer("selenium/standalone-chrome:4.43.0")
8484
.withLogConsumer(new Slf4jLogConsumer(logger));
8585
cleanup.deferAfterAll(browser::stop);
8686
browser.start();

instrumentation/jms/jms-1.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jms/v1_1/AbstractJms1Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ abstract class AbstractJms1Test {
6464
@BeforeAll
6565
static void setUp() throws JMSException {
6666
broker =
67-
new GenericContainer<>("rmohr/activemq:latest")
67+
new GenericContainer<>("apache/activemq-classic:5.19.2")
6868
.withExposedPorts(61616, 8161)
6969
.withLogConsumer(new Slf4jLogConsumer(logger));
7070
broker.start();

instrumentation/jsf/jsf-common-jakarta/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/common/jakarta/JsfRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public class JsfRequest {
1515
@Nullable private final String spanName;
1616

1717
public JsfRequest(ActionEvent event) {
18-
this.spanName = getSpanName(event);
18+
this.spanName = extractSpanName(event);
1919
}
2020

21-
public String spanName() {
21+
public String getSpanName() {
2222
return requireNonNull(spanName);
2323
}
2424

@@ -27,7 +27,7 @@ public boolean shouldStartSpan() {
2727
}
2828

2929
@Nullable
30-
private static String getSpanName(ActionEvent event) {
30+
private static String extractSpanName(ActionEvent event) {
3131
// https://jakarta.ee/specifications/faces/3.0/apidocs/jakarta/faces/component/actionsource2
3232
// ActionSource2 was added in JSF 1.2 and is implemented by components that have an action
3333
// attribute such as a button or a link

instrumentation/jsf/jsf-common-jakarta/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/common/jakarta/BaseJsfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
public abstract class BaseJsfTest extends AbstractHttpServerUsingTest<Server> {
5151

5252
@RegisterExtension
53-
public static final InstrumentationExtension testing =
53+
private static final InstrumentationExtension testing =
5454
HttpServerInstrumentationExtension.forAgent();
5555

5656
@BeforeAll

instrumentation/jsf/jsf-mojarra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/mojarra/v3_0/MojarraSingletons.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class MojarraSingletons {
1919
static {
2020
instrumenter =
2121
Instrumenter.<JsfRequest, Void>builder(
22-
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, JsfRequest::spanName)
22+
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, JsfRequest::getSpanName)
2323
.setErrorCauseExtractor(new JsfErrorCauseExtractor())
2424
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
2525
.buildInstrumenter();

instrumentation/jsf/jsf-myfaces-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/myfaces/v3_0/MyFacesSingletons.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MyFacesSingletons {
1818
static {
1919
instrumenter =
2020
Instrumenter.<JsfRequest, Void>builder(
21-
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, JsfRequest::spanName)
21+
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, JsfRequest::getSpanName)
2222
.setErrorCauseExtractor(new MyFacesErrorCauseExtractor())
2323
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
2424
.buildInstrumenter();

instrumentation/netty/netty-4.1/testing/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/AbstractNetty41ClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private static int getPort(URI uri) {
159159
}
160160

161161
@Test
162-
void closeChannel() throws ExecutionException, InterruptedException {
162+
void closeChannel() throws InterruptedException {
163163
String method = "GET";
164164
URI uri = resolveAddress("/read-timeout");
165165
DefaultFullHttpRequest request = buildRequest(method, uri, emptyMap());
@@ -170,7 +170,7 @@ void closeChannel() throws ExecutionException, InterruptedException {
170170
CompletableFuture<Integer> result = new CompletableFuture<>();
171171
channel.pipeline().addLast(new ClientHandler(result));
172172
channel.pipeline().addLast(new ReadTimeoutHandler(READ_TIMEOUT.toMillis(), MILLISECONDS));
173-
channel.writeAndFlush(request).get();
173+
channel.writeAndFlush(request).sync();
174174
Thread.sleep(1_000);
175175
channel.close();
176176

instrumentation/netty/netty-4.1/testing/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/AbstractNetty41ServerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
public abstract class AbstractNetty41ServerTest extends AbstractHttpServerTest<EventLoopGroup> {
5252

53-
static final LoggingHandler LOGGING_HANDLER =
53+
static final LoggingHandler loggingHandler =
5454
new LoggingHandler(AbstractNetty41ServerTest.class, LogLevel.DEBUG);
5555

5656
protected abstract void configurePipeline(ChannelPipeline channelPipeline);
@@ -69,13 +69,13 @@ protected EventLoopGroup setupServer() {
6969
ServerBootstrap bootstrap =
7070
new ServerBootstrap()
7171
.group(eventLoopGroup)
72-
.handler(LOGGING_HANDLER)
72+
.handler(loggingHandler)
7373
.childHandler(
7474
new ChannelInitializer<SocketChannel>() {
7575
@Override
7676
protected void initChannel(SocketChannel socketChannel) {
7777
ChannelPipeline pipeline = socketChannel.pipeline();
78-
pipeline.addFirst("logger", LOGGING_HANDLER);
78+
pipeline.addFirst("logger", loggingHandler);
7979
pipeline.addLast(new HttpServerCodec());
8080
pipeline.addLast(new HttpObjectAggregator(65536));
8181
pipeline.addLast(new HttpHandler());

instrumentation/netty/netty-common-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/netty/common/v4_0/NettyScope.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import io.opentelemetry.instrumentation.netty.common.internal.NettyConnectionRequest;
1212
import io.opentelemetry.instrumentation.netty.common.v4_0.internal.client.ConnectionCompleteListener;
1313
import io.opentelemetry.instrumentation.netty.common.v4_0.internal.client.NettyConnectionInstrumenter;
14+
import javax.annotation.Nullable;
1415

1516
/** Container used to carry state between enter and exit advices */
1617
public class NettyScope {
@@ -34,10 +35,10 @@ public static NettyScope startNew(
3435
}
3536

3637
public static void end(
37-
NettyScope nettyScope,
38+
@Nullable NettyScope nettyScope,
3839
NettyConnectionInstrumenter instrumenter,
3940
ChannelPromise channelPromise,
40-
Throwable throwable) {
41+
@Nullable Throwable throwable) {
4142

4243
if (nettyScope == null) {
4344
return;

instrumentation/netty/netty-common-4.0/library/src/main/java/io/opentelemetry/instrumentation/netty/common/v4_0/internal/client/NettyHttpClientAttributesGetter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public String getUrlFull(NettyCommonRequest requestAndChannel) {
2929
String hostHeader = getHost(requestAndChannel);
3030
String target = requestAndChannel.getRequest().getUri();
3131
URI uri = new URI(target);
32-
if ((uri.getHost() == null || uri.getHost().equals("")) && hostHeader != null) {
32+
if ((uri.getHost() == null || uri.getHost().isEmpty()) && hostHeader != null) {
3333
return getScheme(requestAndChannel) + "://" + hostHeader + target;
3434
}
3535
return uri.toString();

0 commit comments

Comments
 (0)