Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8fd4935
feat: add java cli options for javaagent and jmx
tamassoltesz Sep 17, 2025
61477b5
fix: gitignore changes to allow resources jars
tamassoltesz Sep 22, 2025
583fd76
feat: add otel javaagent jars
tamassoltesz Sep 22, 2025
68f2de4
fix: loading agent from the agent dir
tamassoltesz Sep 22, 2025
d91318d
fix: changelog and build version
tamassoltesz Sep 22, 2025
29ec494
fix: proper agent attach command on unix-like systems
tamassoltesz Sep 22, 2025
c206103
feat: aspect for wrapping methods in otel span
tamassoltesz Sep 25, 2025
e4be070
fix: add exception records to spans
tamassoltesz Sep 26, 2025
f050dab
fix: use javaagent's otel if present
tamassoltesz Sep 26, 2025
a5609d0
fix: fixing agent loading at startup
tamassoltesz Sep 26, 2025
315ea7b
fix: add logging for the command that's being run
tamassoltesz Sep 30, 2025
0bf21f7
fix: pinpoint runner image version
tamassoltesz Oct 10, 2025
6a36676
fix: pinpoint runner image version
tamassoltesz Oct 10, 2025
55e5df0
fix: tell the core branch name for the workflow
tamassoltesz Oct 10, 2025
38c2b80
fix: build docker image with the right branches
tamassoltesz Oct 10, 2025
73fd8b6
fix: publish-dev-docker formatting
tamassoltesz Oct 10, 2025
31a546f
fix: using an other variable for deciding the current branch name
tamassoltesz Oct 10, 2025
2eae4fb
fix: using an other variable for deciding the current branch name
tamassoltesz Oct 10, 2025
966ef53
fix: update cli dependencies to make it the same version as core
tamassoltesz Oct 13, 2025
9d6821c
fix: update implementationDependencies.json with aspectjrt
tamassoltesz Oct 13, 2025
10fe09f
fix: update build version
tamassoltesz Oct 22, 2025
4ab96e6
Merge branch '11.1' into feat/otel_javaagent
tamassoltesz Oct 22, 2025
41be5ef
Merge branch '11.2' into feat/otel_javaagent
sattvikc Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gradle-app.setting
!cli/jar/**/*.jar
!downloader/jar/**/*.jar
!ee/jar/**/*.jar
!src/main/resources/**/*.jar

*target*
*.war
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [11.1.1]

- Adds opentelemetry-javaagent to the core distribution

## [11.1.0]

- Adds hikari logs to opentelemetry
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ java {
}
}

version = "11.1.0"
version = "11.1.1"

repositories {
mavenCentral()
Expand All @@ -47,7 +47,6 @@ dependencies {
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.18.2'


// https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core
api group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '11.0.8'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,38 @@ public void doCommand(String installationDir, boolean viaInstaller, String[] arg
String host = CLIOptionsParser.parseOption("--host", args);
boolean foreground = CLIOptionsParser.hasKey("--foreground", args);
boolean forceNoInMemDB = CLIOptionsParser.hasKey("--no-in-mem-db", args);
boolean javaagentEnabled = CLIOptionsParser.hasKey("--javaagent", args);
boolean jmxEnabled = CLIOptionsParser.hasKey("--jmx", args);
String jmxPort = CLIOptionsParser.parseOption("--jmx-port", args);
String jmxAuthenticate = CLIOptionsParser.parseOption("--jmx-authenticate", args);
String jmxSSL = CLIOptionsParser.parseOption("--jmx-ssl", args);

List<String> commands = new ArrayList<>();
if (OperatingSystem.getOS() == OperatingSystem.OS.WINDOWS) {
commands.add(installationDir + "jre\\bin\\java.exe");
commands.add("-classpath");
commands.add("\"" + installationDir + "core\\*\";\"" + installationDir + "plugin-interface\\*\"");
if (javaagentEnabled) {
commands.add("-javaagent:\"" + installationDir + "\\agent\\opentelemetry-javaagent.jar\"");
}
if (jmxEnabled) {
commands.add("-Dcom.sun.management.jmxremote");
if (jmxPort != null) {
commands.add("-Dcom.sun.management.jmxremote.port=" + jmxPort);
} else {
commands.add("-Dcom.sun.management.jmxremote.port=9010");
}
if (jmxAuthenticate != null) {
commands.add("-Dcom.sun.management.jmxremote.authenticate=" + jmxAuthenticate);
} else {
commands.add("-Dcom.sun.management.jmxremote.authenticate=false");
}
if (jmxSSL != null) {
commands.add("-Dcom.sun.management.jmxremote.ssl=" + jmxSSL);
} else {
commands.add("-Dcom.sun.management.jmxremote.ssl=false");
}
}
if (space != null) {
commands.add("-Xmx" + space + "M");
}
Expand Down Expand Up @@ -77,6 +103,27 @@ public void doCommand(String installationDir, boolean viaInstaller, String[] arg
commands.add("-classpath");
commands.add(
installationDir + "core/*:" + installationDir + "plugin-interface/*:" + installationDir + "ee/*");
if (javaagentEnabled) {
commands.add("-javaagent:\"" + installationDir + "/agent/opentelemetry-javaagent.jar\"");
}
if (jmxEnabled) {
commands.add("-Dcom.sun.management.jmxremote");
if (jmxPort != null) {
commands.add("-Dcom.sun.management.jmxremote.port=" + jmxPort);
} else {
commands.add("-Dcom.sun.management.jmxremote.port=9010");
}
if (jmxAuthenticate != null) {
commands.add("-Dcom.sun.management.jmxremote.authenticate=" + jmxAuthenticate);
} else {
commands.add("-Dcom.sun.management.jmxremote.authenticate=false");
}
if (jmxSSL != null) {
commands.add("-Dcom.sun.management.jmxremote.ssl=" + jmxSSL);
} else {
commands.add("-Dcom.sun.management.jmxremote.ssl=false");
}
}
if (space != null) {
commands.add("-Xmx" + space + "M");
}
Expand Down Expand Up @@ -181,6 +228,13 @@ protected List<Option> getOptionsAndDescription() {
new Option("--foreground", "Runs this instance of SuperTokens in the foreground (not as a daemon)"));
options.add(
new Option("--with-temp-dir", "Uses the passed dir as temp dir, instead of the internal default."));
options.add(new Option("--javaagent", "Enables the OpenTelemetry Javaagent for tracing and metrics."));
options.add(new Option("--jmx", "Enables JMX management and monitoring."));
options.add(new Option("--jmx-port", "Sets the port for JMX. Defaults to 9010 if --jmx is passed."));
options.add(new Option("--jmx-authenticate",
"Sets whether JMX authentication is enabled or not. Defaults to false if --jmx is passed."));
options.add(new Option("--jmx-ssl",
"Sets whether JMX SSL is enabled or not. Defaults to false if --jmx is passed."));
return options;
}

Expand Down
Binary file added src/main/resources/opentelemetry-javaagent.jar
Binary file not shown.
Binary file not shown.
Loading