Examine Spring Boot 3 data in VMware Aria Operations for Applications (formerly known as Tanzu Observability by Wavefront) dashboards and charts

Wavefront for Spring Boot allows you to quickly configure your environment, so Spring Boot 3 components send metrics, histograms, and traces or spans to our service.

Features

If you use Wavefront for Spring Boot:

  • A large number of metrics are exposed by default. See the Spring Boot documentation on Supported Metrics for details.
  • You have tracing support for all the common Spring Boot components, such as Spring MVC, Spring Web, Spring Async, Feign, Hysterix, JMS, JDBC, Mongo, Zuul, Reactor, RxJava, Redis, Logging, Spring Messaging, and RabbitMQ.
  • The distributed tracing spans in your applications are automatically converted to our span format.

Sending Data from Spring Boot into Our Service

You can send data from your Spring Boot applications into our service using the Wavefront for Spring Boot Starter (all users) or the Wavefront Spring Boot integration (customers and free trial users).

  • Wavefront for Spring Boot Starter
    If you configure your application with the Wavefront for Spring Boot starter, you can send metrics, histograms, and traces/spans to our service. Once the data is in our service, you can view your data, find hotspots, and gather more data.
    • Freemium: All users can run the Spring Boot Starter with the default settings to view their data in the freemium instance. Certain limitations apply, for example, alerts are not available.
    • Customer or Free Trial User: Customers or free trial users can modify the default Wavefront Spring Boot Starter to send data to their cluster. You can sign up for a free 30-day trial here.
  • Wavefront Spring Boot Integration: Customers and free trial users can access the Wavefront Spring Boot integration directly from their clusters.

Dashboards

After you complete the setup, you can examine the data in our dashboards.

The Spring Boot Inventory dashboard provides real-time visibility into your Spring Boot environment.
  • This is the default dashboard you see when you run the Spring Boot initializer.
  • You can also access this dashboard from the Spring Boot integration Dashboards tab.
screenshot of spring boot dashboard
The Traces Browser allows you to examine traces for your applications. You can access this browser if you have trace data flowing:
  • From the Spring Boot Inventory dashboard.
  • From the Spring Boot integration Dashboards tab.
Tracing section has link to Application Dashboard
screenshot of the traces browser

Getting Started

Getting started is easy. Here are some things to know before you start:

Prerequisites for Wavefront Spring Boot Starter

  • Spring Boot 3.0.0 or above
    Spring Boot VersionWavefront for Spring Boot Version
    3.0.x 3.0.x
    3.2.x 3.2.x
  • Java 17 or above
  • Maven 3.5+ or Gradle 7.5 or later
    See theSystem Requirements in the Spring Boot documentation.

Step 1: Initialize and Configure Your Project

Initialize a new project using the Spring Initializer or add the required dependencies to an existing Spring project to send data to our service.

Follow these steps:

  1. Navigate to https://start.spring.io.
  2. Select 3.0.0 or later as the Spring Boot version and define the other parameters for your project.
    Spring Initializr
  3. Click Add dependency and select Wavefront from the dependency list.
    Wavefront dependency
  4. Optionally, add Distributed Tracing as a dependency to send trace data to our service.
    Distributed Tracing dependency
  5. Click Generate to download the project as a Zip file.
  6. Open the project, add the application logic, and start the project.

Follow these steps if you don't have an Operations for Applications account and need to use the freemium account.

  1. Add the Wavefront dependency.

    Open your application and add the following code to your pom.xml file.

    <dependency>
      <groupId>com.wavefront</groupId>
      <artifactId>wavefront-spring-boot-starter</artifactId>
      <scope>runtime</scope>
    </dependency>
                  

    Open your application and add the following code to your build.gradle file.

    dependencies {
      ...
      runtimeOnly 'com.wavefront:wavefront-spring-boot-starter'
    }
                 
  2. Import the Wavefront for Spring Boot Bill of Materials (BOM) to your project.
    
    <dependencyManagement>
      <dependencies>
      .....
        <dependency>
          <groupId>com.wavefront</groupId>
          <artifactId>wavefront-spring-boot-bom</artifactId>
          <version>$releaseVersion</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
      .....
      </dependencies>
    </dependencyManagement>
                  
    dependencyManagement {
      imports {
        mavenBom "com.wavefront:wavefront-spring-boot-bom:$releaseVersion"
      }
    }
                
  3. If you want to send trace data to our service using Micrometer Tracing, add the following dependencies.
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-bridge-brave</artifactId>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-reporter-wavefront</artifactId>
      <scope>runtime</scope>
    </dependency>
                  
    dependencies {
      ...
      implementation 'io.micrometer:micrometer-tracing-bridge-brave'
      runtimeOnly 'io.micrometer:micrometer-tracing-reporter-wavefront'
    }
                  

Follow these steps if you already have an Operations for Applications account.

  1. Import the Wavefront for Spring Boot Bill of Materials (BOM) to your project.
    
    <dependencyManagement>
      <dependencies>
      .....
        <dependency>
          <groupId>com.wavefront</groupId>
          <artifactId>wavefront-spring-boot-bom</artifactId>
          <version>$releaseVersion</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
      .....
      </dependencies>
    </dependencyManagement>
                  
    dependencyManagement {
      imports {
        mavenBom "com.wavefront:wavefront-spring-boot-bom:$releaseVersion"
      }
    }
                
  2. If you want to send trace data to our service using Micrometer Tracing, add the following dependencies.
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-bridge-brave</artifactId>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-reporter-wavefront</artifactId>
      <scope>runtime</scope>
    </dependency>
                  
    dependencies {
      ...
      implementation 'io.micrometer:micrometer-tracing-bridge-brave'
      runtimeOnly 'io.micrometer:micrometer-tracing-reporter-wavefront'
    }
                  
  3. You need to Specify the VMware Cloud Services account instance or the Operations for Applications instance, as explained in Step 2 below. Otherwise, you run into errors because the freemium account settings do not support the configurations in this section.

Step 2 (Optional): Specify Your Operations for Applications Instance

By default, the Wavefront Spring Boot Starter creates an account for you and sends data to the Freemium instance. If you already have a VMware Cloud Services account or an Operations for Applications account, you can send data there instead by specifying the properties shown below:

Add these properties to authenticate with the ID and Secret of a Server to Server OAuth App in VMware Cloud Services:

management.wavefront.api-token-type=CSP_CLIENT_CREDENTIALS
management.wavefront.uri={ENTER_WAVEFRONT_INSTANCE_URL}
management.wavefront.api-token=clientId={ENTER_CLIENT-ID},clientSecret={ENTER_SECRET},orgId={OPTIONAL_ORG_ID}
wavefront.freemium-account = false
      
  • Replace {ENTER_WAVEFRONT_INSTANCE_URL} with the name of your Operations for Applications instance, for example, https://example.wavefront.com.
  • Replace {ENTER_CLIENT-ID} and {ENTER_SECRET} with the credentials (client ID and client secret) of an existing server-to-server OAuth app which has the Direct Data Ingestion service role assigned and is added to the VMware Cloud organization running the Operations for Applications service.
  • The {OPTIONAL_ORG_ID} parameter is optional, and you can replace it with the long ID of the VMware Cloud organization running the service.
  • Set wavefront.freemium-account as false. Because you have an Operations for Applications instance, you do not need a freemium account.
  • VMware Cloud Services API Token:
    If you have a VMware Cloud Service account, add the following properties to authenticate with a VMware Cloud Services API Token.
    management.wavefront.api-token-type=CSP_API_TOKEN
    management.wavefront.uri={ENTER_WAVEFRONT_INSTANCE_URL}
    management.wavefront.api-token={ENTER_CSP_API_TOKEN}
    wavefront.freemium-account = false
              
    • Replace {ENTER_WAVEFRONT_INSTANCE_URL} with the name of your Operations for Applications instance, for example, https://example.wavefront.com.
    • Replace {ENTER_CSP_API_TOKEN} with your VMware Cloud Services API token. The API token must be generated in the VMware Cloud Services Console by an active user account and must be assigned the Direct Data Ingestionservice role.
    • Set wavefront.freemium-account as false. Because you have an Operations for Applications instance, you do not need a freemium account.
  • Operations for Applications API Token:
    If you have an Operations for Applications account, add the following properties to authenticate with the API Token (legacy).
    management.wavefront.api-token = {ENTER_API_TOKEN}
    management.wavefront.uri = {ENTER_WAVEFRONT_INSTANCE_URL}
    wavefront.freemium-account = false
              
    • Replace {ENTER_WAVEFRONT_INSTANCE_URL} with the name of your Operations for Applications instance, for example, https://example.wavefront.com.
    • Replace {WAVEFRONT_INSTANCE_URL} with the name of your Operations for Applications instance, for example, https://example.wavefront.com.
    • Set wavefront.freemium-account as false. Because you have an Operations for Applications instance, you do not need a freemium account.

Step 3: View Your Data in Our Service

To view your data, you first run your project from the command line, and then click the link that directs you to our service. Follow these steps:

  1. Run your project.
    ./mvnw spring-boot:run
             
    ./gradlew bootRun
             

    You see the following printed on your console:
    The following example shows what you see if you’re using the Freemium instance:

         To share this account, make sure the following is added to your configuration:
    
          management.wavefront.api-token=44444-34this-45is-123a-sampletoken
          management.wavefront.uri=https://wavefront.surf
    
         Connect to your Wavefront dashboard using this one-time use link:
         https://wavefront.surf/us/example
    
  2. Add data to your application before you start to view the data in our service.
  3. Click the link (for example, https://wavefront.surf/us/<name>) and you are taken to the Wavefront Spring Boot Inventory dashboard where you can examine the data sent by your application.
    Example: Spring Boot metrics dashboard If your application uses trace data, click the link in the Tracing section of the dashboard to be directed to the Traces Browser.
    Example: Spring Boot traces browser

Custom Configurations

Add the following custom configurations to the application.properties file.

Invite Users

You can invite users and let them send data to the same cluster:

  1. Click the link that was printed on your console and navigate to the Wavefront for Spring Boot Dashboard:
    1. Click the gear icon and select Accounts.
    2. Click Invite New Users and specify a comma-separated list of email addresses.
      Invite Users The users get an email with a link to reset their password. They can then access your dashboard.
  2. Information about the token and URL are displayed on your terminal. Add them to your project’s application.properties file.
     management.wavefront.api-token=<Enter_Token>
     management.wavefront.uri=https://wavefront.surf
    
  3. If you are using the freemium account and want the single-use login URL to show on the terminal each time you start the application, add wavefront.freemium-account to the application.properties file and set it to true.
      wavefront.freemium-account=true
    
  4. Restart your application.

Use the Wavefront Proxy

The Wavefront proxy ingests data and forwards it to our service in a secure, fast, and reliable manner. It prevents data loss, simplifies firewall configuration, and allows you to filter or enrich data before it is sent to our service.

Copy and paste the following property to the application.properties file.

management.wavefront.uri=proxy://<Proxy_Host>:2878

Specify Application and Service Names

If you have more than one Spring Boot application, you can specify the names of the application and the service in the application.properties file.


Example:

management.wavefront.application.name=my-application
management.wavefront.application.service-name=my-service

Example: If you are using a YAML file.

management:
  wavefront:
    application:
      name: my-application
      service-name: my-service

Optionally:

  • If you configured spring.application.name in your application, it is automatically used as the service name.

You can configure the cluster and shard names under the management.wavefront.application namespace as well. This information is used to tag metrics and traces.

  • If you want to take full control over ApplicationTags, you can create a @Bean.
  • If you want to customize the instance that is auto-configured, add an ApplicationTagsBuilderCustomizer bean.

Wavefront Spring Boot Integration

If you already have an Operations for Applications account, you can start the setup and examine the dashboards from the Wavefront Spring Boot integration. This is supported for free trial accounts.

  1. Click Integrations on the toolbar, search for Spring Boot, and click the Spring Boot integration.
  2. Use the information displayed on the Setup tab to set up the integration.
  3. When setup is complete, click the Dashboard tab to examine your data.

Next Steps