Class CirconusClient

java.lang.Object
com.arpnetworking.tsdcore.sinks.circonus.CirconusClient

public final class CirconusClient extends Object
Async Circonus API client. Hides the implementation of the HTTP calls.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot com)
  • Method Details

    • getBrokers

      public CompletionStage<BrokerListResponse> getBrokers()
      Gets the list of brokers from the Circonus API.
      Returns:
      Future with the results.
    • sendToHttpTrap

      public CompletionStage<play.libs.ws.StandaloneWSResponse> sendToHttpTrap(Map<String,Object> data, URI httptrapURI)
      Sends a request to store data to an http trap monitor. NOTE: This method is a bit odd to have on the client. The URI of the httptrap is likely not on the API broker host at all. However, it doesn't make sense to move this method to another utility class at this time. TODO(vkoskela): This method needs to be renamed since it is used only to send metrics. [ISSUE-?] Furthermore, the method should probably return the deserialized response instead of the ws response.
      Parameters:
      data - Json data to store.
      httptrapURI - Url of the httptrap.
      Returns:
      Future response.
    • getOrCreateCheckBundle

      public CompletionStage<CheckBundle> getOrCreateCheckBundle(CheckBundle request)
      Gets or creates a check bundle in Circonus.
      Parameters:
      request - Request details.
      Returns:
      Future with the results.
    • getCheckBundle

      public CompletionStage<CheckBundle> getCheckBundle(String cid)
      Gets a check bundle in Circonus.
      Parameters:
      cid - The check bundle's cid.
      Returns:
      Future with the results.
    • updateCheckBundle

      public CompletionStage<CheckBundle> updateCheckBundle(CheckBundle request)
      Updates a check bundle in Circonus.
      Parameters:
      request - Request details.
      Returns:
      Future with the results.
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object