Advanced features

This chapter details advanced configuration options for XRebel Hub. Please head over to https://zeroturnaround.com/software/xrebel-hub/ for more information about XRebel Hub.


Microservices configuration

In order to profile distributed applications or microservices, add XRebel Hub Agents to all connected applications.

../_images/xrhub-microservices.png

Keep in mind that there are two methods to collect microservices transactions:

  1. Configuring all applications to share the same name. All traces will be collected into one application view on the dashboard using that name.
  2. Using separate names for all connected applications. Transactions are separately collected and displayed under each separate application. The top level applications will still display all transactions from connected applications.

Note

End-to-end transactions will be highlighted using the remote2icon icon.


Managing application versions

Use one of these methods to add versions to your applications.

Maven

Use your pom.xml to specify the application versions for XRebel Hub. Add Maven’s standard implementation or specification details to the manifest. The XRebel Hub Agent first tries to read the Implementation-Version entry. When that is not found, the agent falls back to the Specification-Version entry.

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
            <!-- or <artifactId>maven-war-plugin</artifactId> -->
        <version>2.1</version>
        ...
        <configuration>
            <warName>petclinic</warName>
            <archive>
                <manifestEntries>
                    <XRebel-Hub-App-Version>${project.version}</XRebel-Hub-App-Version>
                    <XRebel-Hub-App-Build>${maven.build.timestamp}</XRebel-Hub-App-Build>
                </manifestEntries>
            </archive>
        ...
      </plugin>
    </plugins>
  </build>
  ...
</project>

For more information: https://maven.apache.org/shared/maven-archiver/examples/manifest.html


Gradle

Include the following in your build.gradle file:

war { // or jar
    version = 'my-version-3.14'
    manifest {
        attributes("XRebel-Hub-App-Version": version)
        attributes("XRebel-Hub-App-Build": build)
    }
}

For more information: https://docs.gradle.org/current/userguide/java_plugin.html#sec:jar


Ant

Add the following to your jar or war task in build.xml:

<jar>
    <manifest>
        <attribute name="XRebel-Hub-App-Version" value="${version}"/>
        <attribute name="XRebel-Hub-App-Build" value="${version} ${TODAY}"/>
    </manifest>
</jar>

For more information: https://ant.apache.org/manual/Tasks/manifest.html


JVM arguments

Add the version parameter to your application startup. The JVM argument overrides all other version settings.

-javaagent:[/path/to/]xrebel-hub-agent.jar -Dxrebel.hub.app.version=YOUR_APP_VERSION

Custom profiling

XRebel Hub Agents can be configured to use a customized profiling setup. This is useful for adding requests that would normally not be picked up by XRebel Hub (e.g. desktop applications, non-HTTP requests). To do this:

  1. Download the customized configuration file.
  2. Edit the file to set up customized entry points. Detailed instructions are contained within.
  3. Save the file in the same location as the XRebel Hub Agent JAR file.
  4. Restart your application.