Add optional OpenTelemetry Netty server instrumentation
All checks were successful
CI / build (push) Successful in 3m50s

- Update lys.version to 2026.04.14

- Add optional compileOnly dependency on opentelemetry-netty-4.1 in rbcs-server

- Add runtime guard to only activate instrumentation when OTel classes are on classpath

- Insert OTel combined handler after HttpServerCodec in the Netty pipeline

- Add requires-static JPMS directives for optional module support
This commit is contained in:
2026-04-29 02:50:55 +08:00
parent 5d190d81ab
commit 1d938b7ea3
24 changed files with 230 additions and 51 deletions

View File

@@ -18,10 +18,11 @@ import java.util.stream.Collectors;
public class Configuration {
String host;
int port;
String serverPath;
boolean proxyProtocolEnabled;
List<Cidr> trustedProxyIPs;
boolean enableTelemetry;
int incomingConnectionsBacklogSize;
String serverPath;
@NonNull
EventExecutor eventExecutor;
@NonNull
@@ -150,6 +151,7 @@ public class Configuration {
}
public static Configuration of(
boolean enableTelemetry,
String host,
int port,
boolean proxyProtocolEnabled,
@@ -168,10 +170,11 @@ public class Configuration {
return new Configuration(
host,
port,
serverPath != null && !serverPath.isEmpty() && !serverPath.equals("/") ? serverPath : null,
proxyProtocolEnabled,
trustedProxyIPs,
enableTelemetry,
incomingConnectionsBacklogSize,
serverPath != null && !serverPath.isEmpty() && !serverPath.equals("/") ? serverPath : null,
eventExecutor,
rateLimiter,
connection,