Giter Club home page Giter Club logo

wavefront-spring-boot's Introduction

Wavefront Spring Boot Starter

This project provides a Spring Boot starter for Wavefront. Adding the starter to a project that uses the Actuator is all that is required to emit metrics, histograms, and traces to a Wavefront cluster. If you do not have a Wavefront account yet, the starter will auto-negotiate one for you and save the api token in your home directory at ~/.wavefront_token.

Table of Content

Prerequisites

  • Java 8 or above.
  • Spring Boot 2.3 or above

This starter reuses the existing Wavefront support in Spring Boot and thefore requires the Actuator (i.e. spring-boot-starter-actuator).

  • Add the following dependency to your pom.xml file, to introduce the latest wavefront-spring-boot-starter to your application.
    <dependency>
        <groupId>com.wavefront</groupId>
        <artifactId>wavefront-spring-boot-starter</artifactId>
        <version>2.0.0</version>
    </dependency>

Getting Started

At this time, there is no release of this starter yet and you will need to build the project first. Invoke the following in the root directory:

$ ./mvnw clean install

Then add the following dependency to your `pom.xml:

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

Or to your build.gradle if you are using Gradle:

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

Every time the application starts, either an account is auto-negotiated, or it is restored from ~/.wavefront_token. At the end of the startup phase, a message is logged with a single-use login URL. Use it to log in to the Wavefront service and access the data that has been collected so far.

Your existing Wavefront account information has been restored from disk.

To share this account, make sure the following is added to your configuration:

	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

Custom Configuration

Wavefront uses a secret token to ingest data. Once an account has been auto-negotiated it is restored from ~/.wavefront_token as long as you run the app from the same machine and user. If that file is removed, a new account will be created the next time you start the app. To prevent that from happening, create a login for your account (see the FAQ) and store the settings in your application.properties.

Every time the app starts, it logs the configuration you need to add to application.properties. If you copy that, the account management will stop and the application will simply use that configuration.

If you have more than one application, you may want to at least specify the names of the application and the service in application.properties. Here is simple example:

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

The cluster and shard can also be specified the same way. That information is used to tag metrics and traces out-of-the-box. If you want to take full control over the ApplicationTags, you can create your own @Bean. If you want to customize the instance that is auto-configured, consider adding an ApplicationTagsBuilderCustomizer bean.

For further customization of how metrics are exported, check the Spring Boot reference guide.

License

Open Source License

FAQ

What is the difference between the free cluster and a Wavefront trial?

The free cluster supports limited data ingestion throughput with a 5-day retention and no SLA guarantees. It allows developers to try out Wavefront without having to sign-up or provide an email address.

The Wavefront trial allows you to experience the full power of the Wavefront platform by bringing in data from your cloud environments (AWS/GCP/Azure/vSphere), Kubernetes, over 200 integrations, and large-scale service fleets into a single observability platform. We ask that you tell us more about yourself when signing up for a trial.

One you've signed up, you can retrieve an API token and configure it in your application.properties

What is the retention and Service Level Agreement (SLA) on the free cluster?

While this is subject to changes at any time, we currently retain 5 days of data and offer no SLA on the free Wavefront cluster. Production Wavefront clusters currently offer 18 months of full-resolution (no downsampling) data retention for metrics, 6 months for histograms, and 30 days for spans. We also have a 99.95% uptime guarantee, as well as High Availability (HA) and Disaster Recovery (DR) options.

Reach out to us on our public Slack channel for more information.

Why do I not see a link to access the Wavefront service on start-up?

  • You do not see a single-use login link if you are using a Wavefront cluster that does not support automatic account provisioning, which currently only applies to our free cluster. Therefore, make sure you log in to your cluster via the login page or SSO.
  • You have configured an API token explicitly in your application.properties. Make sure to create a login for your account first.

How do I make sure I send data to the same account all the time (across multiple machines and deployments)?

  • If you are just trying out Wavefront, see Manage Service Accounts to create a service account that has a static token for reporting. Once you have the token, add it to application.properties.
  • If you are using Wavefront in a larger deployment, sign-up for a Wavefront trial at www.wavefront.com and see Manage Service Accounts to learn how to create a service account. Next, add the token and URL to application.properties. We are more than happy to help you with sizing and designing large-scale collection architectures for metrics, histograms, and traces.

How do I setup an email/password login to the account?

When you sign-in to your account via the single-use link, click the gear icon on the top-right and select User Management. Next, you can invite yourself by email (a password setup link is sent to your email address, and you can use it to set up a password).

How do I get help?

We have a public Slack channel as well as in-product help, documentation, and chat.

wavefront-spring-boot's People

Contributors

ajayj89 avatar panghy avatar howardyoo avatar shavidissa avatar snicoll avatar sushantdewan123 avatar

Stargazers

Andriy Kalashnykov avatar

Watchers

James Cloos 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.