XRebel Hub

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.


Adding XRebel Hub agents to your server

XRebel Hub Agents need to be added to your application servers exactly like regular XRebel. Refer to adding XRebel to your server for more information.


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

XRebel Hub automatically detects the default Implementation-Version and Specification-Version manifest entries where possible. In case of possible manifest conflicts, use the configurations provided below.

Maven

Use your pom.xml to specify the application versions for XRebel Hub. Add a JAR or WAR build plugin to your configuration:

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

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)
    }
}

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}"/>
    </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=314

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.

Troubleshooting

If the XRebel Hub dashboard does not display the correct application version, contact support at hub@xrebel.com.