GithubHelp home page GithubHelp logo

sdeleuze / wavefront-spring-boot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wavefronthq/wavefront-spring-boot

0.0 2.0 0.0 268 KB

Spring Boot starter for Wavefront

License: Apache License 2.0

Java 100.00%

wavefront-spring-boot's Introduction

Wavefront for Spring Boot

This project provides a Spring Boot starter for Wavefront. Add the starter to a project to send metrics, histograms, and traces to a Wavefront cluster. If you don't have a Wavefront account, the starter will create a freemium account for you and save the API token in your home directory at ~/.wavefront_freemium.

Table of Content

Prerequisites

  • Spring Boot 2.3 or above
  • Java 8 or above
  • Maven 3.3+ or Gradle 6.3 or later
    See System Requirements in the Spring Boot documentation.

Note: This starter reuses the existing Wavefront support in Spring Boot and provides the Actuator (i.e., spring-boot-starter-actuator).

Getting Started

  • If you want to start from scratch, build the project first. Invoke the following command in the root directory:

    $ ./mvnw clean install
  • Start a sample web app on localhost:8080 to see the basic usage of the starter. Invoke the following command in the root directory:

    $ ./mvnw spring-boot:run -pl wavefront-spring-boot-sample
  • If you already have a Spring Boot application, be sure to use Spring Boot 2.3 or later and add the following dependency to your pom.xml file:

    <dependency>
      <groupId>com.wavefront</groupId>
      <artifactId>wavefront-spring-boot-starter</artifactId>
      <version>2.0.0-RC1</version>
    </dependency>

    If you are using Gradle, add the following dependency to your build.gradle file:

    dependencies {
      ...
      implementation 'com.wavefront:wavefront-spring-boot-starter:2.0.0-RC1'
      
    }
    

    The example below uses the correct dependency versions.

    <dependencies>
      <dependency>
        <groupId>com.wavefront</groupId>
        <artifactId>wavefront-spring-boot-starter</artifactId>
      </dependency>
    </dependencies>
    
    <dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>com.wavefront</groupId>
          <artifactId>wavefront-spring-boot</artifactId>
          <version>2.0.0-RC1</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
      </dependencies>
    </dependencyManagement>
  • Each time you restart your application, it either creates a new freemium account, or it restores from ~/.wavefront_freemium. At the end of the startup phase, the console displays a message with a login URL. Use it to log in to the Wavefront service and access the data that has been collected so far.

    Here is an example message when an existing account is restored from ~/.wavefront_freemium:

      Your existing Wavefront account information has been restored from disk.
    
      management.metrics.export.wavefront.api-token=2c96d63a-abcd-efgh-ijhk-841611451e07
      management.metrics.export.wavefront.uri=https://wavefront.surf
    
      Connect to your Wavefront dashboard using this one-time use link:
      https://wavefront.surf/us/example
    
  • Add the following dependency to send traces to Wavefront using Spring Cloud Sleuth or OpenTracing.

    • Spring Cloud Sleuth:

      Add the following dependency to your pom.xml file:

      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-sleuth</artifactId>
        <version>2.2.2.RELEASE</version>
      </dependency>

      If you are using Gradle, add the following dependency to the build.gradle file:

      dependencies {
        ...
        implementation 'org.springframework.cloud:spring-cloud-starter-sleuth:2.2.3.RELEASE'
      
      }
      
    • OpenTracing

      Add the following dependencies to your pom.xml file:

        <dependency>
          <groupId>io.opentracing.contrib</groupId>
          <artifactId>opentracing-spring-cloud-starter</artifactId>
          <version>0.5.3</version>
        </dependency>

      If you are using Gradle, add the following dependencies to the build.gradle file:

      dependencies {
        ...
        implementation 'io.opentracing.contrib:opentracing-spring-cloud-starter:0.5.3'
      
      }
      

Documentation

License

Open Source License

Getting Support

  • Reach out to us on Slack and join the #springboot public channel.
  • If you run into any issues, let us know by creating a GitHub issue.
  • If you didn't find the information you are looking for in our Wavefront Documentation create a GitHub issue or PR in our docs repository.

wavefront-spring-boot's People

Contributors

adriancole avatar ajayj89 avatar hanwavefront avatar haosong avatar howardyoo avatar jbau avatar panghy avatar shavidissa avatar snicoll avatar sushantdewan123 avatar wf-jenkins avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.