XRebel APM Quick Starts

In order to get XRebel APM up and running, you need to configure both XRebel Hub and XRebel Local agents for your environments.

XRebel Hub Quick Start

Account Signing up

  1. Try XRebel Hub for free.
  2. Open the trial account creation link in the email.
  3. Complete the signup at hub.xrebel.com.
  4. Next → Project

Project Creating a new project

  1. You will be asked to create your first Project.
  2. Specify a project title and press Create.
  3. Next → Agents

Good to know

You can create additional projects by clicking your project title in the top left corner. Simply type the name for the new project and click Create.

Agents Configuring XRebel Hub for your applications

  1. You will be prompted to download the XRebel Hub Agent as soon as you create a new project.
    The project’s agent file is tied to that project.
  2. Download and extract the archive to a location of your choice.
  3. Add the XRebel Hub Agent to you server startup parameters:
    -javaagent:[/path/to/]xrebel-hub-agent.jar
  4. Start your server!
  5. Next → Applications

Good to know

Microservices

In order to profile distributed applications or microservices, add agents to all connected applications.

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

  1. When the applications or services have the same name, the traces will be collected into one transaction using that name.
  2. When using different names, transactions are separately collected under each application.

Did this work?

A console banner is shown for a successful launch:
2016-03-03 15:59:14 XRebel Hub: ########################################################
2016-03-03 15:59:14 XRebel Hub: 
2016-03-03 15:59:14 XRebel Hub:  XRebel Hub Agent 1.4.1 (201602291430)
2016-03-03 15:59:14 XRebel Hub:  © Copyright ZeroTurnaround AS, Estonia, Tallinn.
2016-03-03 15:59:14 XRebel Hub: 
2016-03-03 15:59:14 XRebel Hub: ########################################################

Applications Adding multiple applications to a project

You can add multiple applications to a single project by downloading the project agent and adding a startup parameter to the application server.

  1. Add the startup parameter to the previously downloaded project agent to specify the application:
    -javaagent:[/path/to/]xrebel-hub-agent.jar -Dxrebel.hub.app.name=Application-01
  2. New application data is displayed following some app activity.
  3. Next → Dashboard

Good to know

The specified applications are displayed within the project for which the agent was originally downloaded.

Versions

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

  1. Using Maven. Use your pom.xml to specify custom build and version tags for XRebel Hub.
    <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>
    
  2. Using 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)
        }
    }
  3. Using 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>
    
  4. Using JVM arguments. Add the version or build 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 -Dxrebel.hub.app.build=YOUR_APP_BUILD

For more information, please head over to the XRebel Hub reference manual.

Dashboard Using XRebel Hub

  1. Click around in your web application.
  2. Open the XRebel Hub dashboard.

Advanced profiling

XRebel Hub Agents can be configured to use a customized profiling setup. 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 file.

XRebel Local Quick Start

Download Getting XRebel Local

  1. Download XRebel. Head over here for XRebel Local for Eclipse.
  2. Unpack the archive to a folder of your choice.
  3. Next → Startup

Startup Adding XRebel Local to your application server

  1. Add XRebel Local to your server startup parameters: -javaagent:[/path/to/]xrebel.jar
  2. Start your server!
  3. Next → Activation

Good to know

Did this work?

When the XRebel launch is successful, you will see the XRebel toolbar pop up in the bottom left corner of your webapp. A console banner is also shown for a successful launch:
XRebel: ################################################################
XRebel: 
XRebel:  XRebel 3.4.6 (201802201551)
XRebel:  (c) Copyright ZeroTurnaround AS, Estonia, Tallinn.
XRebel: 
XRebel:  For questions and support, contact xrebel@zeroturnaround.com
XRebel: 
XRebel: ################################################################

Activation Getting your license

  1. The activation dialog pops up automatically following XRebel launch.
  2. Fill out the form.
  3. Press Activate XRebel Local Trial.
  4. Next → XRebel Local experience

I have a license

Already have an XRebel license? Press I have a license to activate using an existing license.
  • Activation key. Paste your activation key if you have one already.
  • License file (xrebel.lic). Point to your license file. You get this file via email when you purchase XRebel.
  • License server. Enter your Group URL and email. You get the Group URL from your network administrator.

XRebel Local experience Using XRebel

  1. Click around in your application.
  2. Keep an eye on the XRebel Local toolbar in the lower left corner.
  3. Press the toolbar buttons to open the relevant views:

XRebel toolbar

Would you like to know more?
XRebel Hub Manual and XRebel Local Manual