Skip to content

Commit

Permalink
Add Airlift JMX modules
Browse files Browse the repository at this point in the history
  • Loading branch information
andythsu committed Jan 11, 2025
1 parent 63471d4 commit 17ccb2f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
31 changes: 25 additions & 6 deletions trino-aws-proxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
<artifactId>jaxrs</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>jmx</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>jmx-http</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>json</artifactId>
Expand All @@ -94,11 +104,21 @@
<artifactId>log</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>log-manager</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>node</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>openmetrics</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>units</artifactId>
Expand Down Expand Up @@ -129,6 +149,11 @@
<artifactId>jersey-server</artifactId>
</dependency>

<dependency>
<groupId>org.weakref</groupId>
<artifactId>jmxutils</artifactId>
</dependency>

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>annotations</artifactId>
Expand Down Expand Up @@ -174,12 +199,6 @@
<artifactId>utils</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>log-manager</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
import io.airlift.bootstrap.Bootstrap;
import io.airlift.http.server.HttpServerModule;
import io.airlift.jaxrs.JaxrsModule;
import io.airlift.jmx.JmxHttpModule;
import io.airlift.jmx.JmxModule;
import io.airlift.json.JsonModule;
import io.airlift.log.LogJmxModule;
import io.airlift.log.Logger;
import io.airlift.node.NodeModule;
import io.airlift.openmetrics.JmxOpenMetricsModule;
import org.weakref.jmx.guice.MBeanModule;

public final class TrinoAwsProxyServer
{
Expand All @@ -35,7 +40,12 @@ public static void main(String[] args)
.add(new NodeModule())
.add(new HttpServerModule())
.add(new JsonModule())
.add(new JaxrsModule());
.add(new JaxrsModule())
.add(new JmxModule())
.add(new JmxHttpModule())
.add(new JmxOpenMetricsModule())
.add(new LogJmxModule())
.add(new MBeanModule());

Bootstrap app = new Bootstrap(modules.build());
app.initialize();
Expand Down

0 comments on commit 17ccb2f

Please sign in to comment.